载入中...
搜索中...
未找到
eve::asset_graphics::VegetationAsset类 参考

Owning decoded TVE rest geometry, independent of archive and GPU resource lifetimes. Immutable after construction. CPU evaluation permits concurrent readers; GPU calls require the graphics owner thread. No callbacks or external pointers are retained. 更多...

#include <VegetationAsset.h>

类

struct  Impl
 

Public 成员函数

 ~VegetationAsset ()
 Vegetation asset.
 
 VegetationAsset (const VegetationAsset &)=delete
 
VegetationAsset & operator= (const VegetationAsset &)=delete
 
std::uint32_t vertexCount () const noexcept
 Return the immutable rest vertex count.
 
Result< graphics::VegetationGeometry > evaluate (const graphics::VegetationField &field, const graphics::VegetationMotion &motion) const
 Evaluate owning world-space geometry with explicit field/time/transform inputs. Worker-safe with immutable inputs; caller inputs are immediate borrows.
 
Result< graphics::Mesh * > createMesh (graphics::Graphics &graphics, const graphics::VegetationField &field, const graphics::VegetationMotion &motion) const
 Create a backend-owned animated mesh; caller must release it through graphics. Graphics-thread only. Returned borrow lasts until release, device loss or graphics shutdown.
 
Result< graphics::Mesh * > createGpuFieldMesh (graphics::Graphics &graphics) const
 Create an object-space rest mesh with owning GPU-deformation factors. Graphics-thread only. The returned backend mesh contains immutable rest positions plus shading and nine-float TVE deformation streams. Caller must release it through graphics. No field, clock, or transform is read.
 
Result< void > updateMesh (graphics::Graphics &graphics, graphics::Mesh &mesh, const graphics::VegetationField &field, const graphics::VegetationMotion &motion) const
 Update an existing mesh from immutable rest data, without accumulating deformation. Graphics-thread only. Mesh and graphics are borrowed for the call, never retained. Draw the resulting world-space mesh with an identity model transform.
 

静态 Public 成员函数

static Result< std::unique_ptr< VegetationAsset > > fromCanonical (const asset::CanonicalMeshData &mesh)
 Admit explicit TVE-packed Unity canonical streams as native rest geometry.
 
static Result< std::unique_ptr< VegetationAsset > > load (const asset::EvpackResourceReader &reader, const AssetRef &ref, const asset::EvpackCapabilities &capabilities, const asset::CanonicalMeshLimits &limits)
 Read one canonical runtime mesh and decode its TVE authoring streams. Reader, identity, capabilities and limits are borrowed only for this synchronous call.
 

详细描述

Owning decoded TVE rest geometry, independent of archive and GPU resource lifetimes. Immutable after construction. CPU evaluation permits concurrent readers; GPU calls require the graphics owner thread. No callbacks or external pointers are retained.

在文件 VegetationAsset.h 第 27 行定义.

构造及析构函数说明

◆ ~VegetationAsset()

eve::asset_graphics::VegetationAsset::~VegetationAsset ( )
default

Vegetation asset.

◆ VegetationAsset()

eve::asset_graphics::VegetationAsset::VegetationAsset ( const VegetationAsset &  )
delete

成员函数说明

◆ createGpuFieldMesh()

Result< graphics::Mesh * > eve::asset_graphics::VegetationAsset::createGpuFieldMesh ( graphics::Graphics &  graphics) const

Create an object-space rest mesh with owning GPU-deformation factors. Graphics-thread only. The returned backend mesh contains immutable rest positions plus shading and nine-float TVE deformation streams. Caller must release it through graphics. No field, clock, or transform is read.

返回
Complete mesh or checked upload/attachment failure with rollback.

在文件 VegetationAsset.cpp 第 170 行定义.

引用了 eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), mesh, eve::graphics::Graphics::newMeshFromArrays(), normal, normals, positions, eve::graphics::Graphics::releaseMesh(), status, eve::Result< T >::success() , 以及 tangent.

◆ createMesh()

Result< graphics::Mesh * > eve::asset_graphics::VegetationAsset::createMesh ( graphics::Graphics &  graphics,
const graphics::VegetationField &  field,
const graphics::VegetationMotion &  motion 
) const

Create a backend-owned animated mesh; caller must release it through graphics. Graphics-thread only. Returned borrow lasts until release, device loss or graphics shutdown.

返回
Complete mesh or checked failure. No mesh is retained by this asset.

在文件 VegetationAsset.cpp 第 135 行定义.

引用了 eve::Diagnostic::error(), evaluate(), eve::Failed, eve::Result< T >::failure(), mesh, eve::graphics::Graphics::newMeshFromArrays(), eve::graphics::Graphics::releaseMesh() , 以及 eve::Result< T >::success().

◆ evaluate()

Result< graphics::VegetationGeometry > eve::asset_graphics::VegetationAsset::evaluate ( const graphics::VegetationField &  field,
const graphics::VegetationMotion &  motion 
) const

Evaluate owning world-space geometry with explicit field/time/transform inputs. Worker-safe with immutable inputs; caller inputs are immediate borrows.

在文件 VegetationAsset.cpp 第 131 行定义.

引用了 eve::graphics::deformVegetation().

被这些函数引用 createMesh().

◆ fromCanonical()

Result< std::unique_ptr< VegetationAsset > > eve::asset_graphics::VegetationAsset::fromCanonical ( const asset::CanonicalMeshData &  mesh)
static

Admit explicit TVE-packed Unity canonical streams as native rest geometry.

返回
Owning asset or checked missing-channel/validation failure, without partial publication.

在文件 VegetationAsset.cpp 第 23 行定义.

引用了 a, at, color, eve::asset::CanonicalMeshAttribute::components, count, eve::graphics::decodeTveVegetationVertices(), eve::Diagnostic::error(), f, eve::Failed, eve::Result< T >::failure(), found, impl, index, eve::InvalidArgument, length, mesh, name, p, eve::Result< T >::success(), t, tangent, eve::Unsupported , 以及 v.

被这些函数引用 load().

◆ load()

Result< std::unique_ptr< VegetationAsset > > eve::asset_graphics::VegetationAsset::load ( const asset::EvpackResourceReader &  reader,
const AssetRef &  ref,
const asset::EvpackCapabilities &  capabilities,
const asset::CanonicalMeshLimits &  limits 
)
static

Read one canonical runtime mesh and decode its TVE authoring streams. Reader, identity, capabilities and limits are borrowed only for this synchronous call.

返回
Owning asset with no retained archive references or GPU allocations.

在文件 VegetationAsset.cpp 第 108 行定义.

引用了 eve::asset::Bulk, eve::asset::RuntimeAssetChunk::bytes, eve::asset::decodeCanonicalMesh(), eve::Diagnostic::error(), eve::Result< T >::failure(), fromCanonical(), limits, eve::NotFound, eve::ParseError, payload , 以及 eve::asset::EvpackResourceReader::read().

◆ operator=()

VegetationAsset & eve::asset_graphics::VegetationAsset::operator= ( const VegetationAsset &  )
delete

◆ updateMesh()

Result< void > eve::asset_graphics::VegetationAsset::updateMesh ( graphics::Graphics &  graphics,
graphics::Mesh &  mesh,
const graphics::VegetationField &  field,
const graphics::VegetationMotion &  motion 
) const

Update an existing mesh from immutable rest data, without accumulating deformation. Graphics-thread only. Mesh and graphics are borrowed for the call, never retained. Draw the resulting world-space mesh with an identity model transform.

返回
Checked validation/backend failure or complete updated geometry and bounds.

在文件 VegetationAsset.cpp 第 224 行定义.

引用了 mesh , 以及 eve::graphics::updateVegetationMesh().

◆ vertexCount()

uint32_t eve::asset_graphics::VegetationAsset::vertexCount ( ) const
noexcept

Return the immutable rest vertex count.

在文件 VegetationAsset.cpp 第 22 行定义.


该类的文档由以下文件生成: