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

Owning executable instance coupling one Scene Template, its manager fields and live Element registry. GPU resources are graphics-thread affine. Base material texture pointers remain borrowed and must outlive this instance. 更多...

#include <VegetationSceneInstance.h>

Public 成员函数

const asset_scene::LoadedSceneTemplate & scene () const noexcept
 Borrow the associated declarative scene for this instance lifetime.
 
const graphics::PbrSurface & surface () const noexcept
 Borrow the currently bound manager material snapshot.
 
const VegetationSceneLiveElements & liveElements () const noexcept
 Borrow the dynamic Element registry.
 
Result< VegetationSceneElementPublication > registerElement (std::uint64_t expectedRevision, const VegetationSceneElement &element, const VegetationSceneGpuBuild &build)
 Register one live Element and republish this associated instance atomically.
 
Result< VegetationSceneElementPublication > withdrawElement (std::uint64_t expectedRevision, VegetationSceneElementHandle handle, const VegetationSceneGpuBuild &build)
 Withdraw one live Element and republish this associated instance atomically.
 
Result< void > release ()
 Invalidate surface borrows and release manager GPU resources.
 

静态 Public 成员函数

static Result< std::unique_ptr< VegetationSceneInstance > > create (const asset::EvpackResourceReader &reader, graphics::IResourceFactory &factory, const AssetRef &sceneTemplate, const asset::EvpackCapabilities &capabilities, graphics::PbrSurface baseSurface, graphics::VegetationMotion baseMotion, const VegetationSceneGpuBuild &build, std::uint64_t owner)
 Resolve and publish the manager automatically from a Scene Template asset.
 

详细描述

Owning executable instance coupling one Scene Template, its manager fields and live Element registry. GPU resources are graphics-thread affine. Base material texture pointers remain borrowed and must outlive this instance.

在文件 VegetationSceneInstance.h 第 41 行定义.

成员函数说明

◆ create()

Result< std::unique_ptr< VegetationSceneInstance > > eve::asset_graphics::VegetationSceneInstance::create ( const asset::EvpackResourceReader &  reader,
graphics::IResourceFactory &  factory,
const AssetRef &  sceneTemplate,
const asset::EvpackCapabilities &  capabilities,
graphics::PbrSurface  baseSurface,
graphics::VegetationMotion  baseMotion,
const VegetationSceneGpuBuild &  build,
std::uint64_t  owner 
)
static

Resolve and publish the manager automatically from a Scene Template asset.

参数
readerBorrowed only during creation; no package views survive.
factoryBorrowed graphics factory which must outlive the returned instance and explicit release.
sceneTemplateScene Template whose source GUID selects the manager.
capabilitiesRuntime variant capabilities.
baseSurfaceOwning parameter snapshot; referenced textures remain borrowed.
baseMotionDetached explicit-time motion state.
buildOwning atlas values plus call-scoped raster spans and initial nonzero GPU revision.
ownerNonzero live-Element registry identity.
返回
Complete owning instance, or failure after candidate GPU cleanup. @thread Graphics thread only; synchronous and non-reentrant.

在文件 VegetationSceneInstance.cpp 第 47 行定义.

引用了 eve::asset_graphics::VegetationSceneGpuRuntime::create(), eve::asset_graphics::VegetationSceneLiveElements::create(), eve::Diagnostic::error(), eve::Failed , 以及 eve::asset_graphics::VegetationSceneAssociationLoader::load().

◆ liveElements()

const VegetationSceneLiveElements & eve::asset_graphics::VegetationSceneInstance::liveElements ( ) const
inlinenoexcept

Borrow the dynamic Element registry.

在文件 VegetationSceneInstance.h 第 67 行定义.

◆ registerElement()

Result< VegetationSceneElementPublication > eve::asset_graphics::VegetationSceneInstance::registerElement ( std::uint64_t  expectedRevision,
const VegetationSceneElement &  element,
const VegetationSceneGpuBuild &  build 
)

Register one live Element and republish this associated instance atomically.

在文件 VegetationSceneInstance.cpp 第 71 行定义.

引用了 element , 以及 eve::asset_graphics::VegetationSceneAssociation::masks.

◆ release()

Result< void > eve::asset_graphics::VegetationSceneInstance::release ( )
inline

Invalidate surface borrows and release manager GPU resources.

在文件 VegetationSceneInstance.h 第 78 行定义.

◆ scene()

const asset_scene::LoadedSceneTemplate & eve::asset_graphics::VegetationSceneInstance::scene ( ) const
inlinenoexcept

Borrow the associated declarative scene for this instance lifetime.

在文件 VegetationSceneInstance.h 第 63 行定义.

◆ surface()

const graphics::PbrSurface & eve::asset_graphics::VegetationSceneInstance::surface ( ) const
inlinenoexcept

Borrow the currently bound manager material snapshot.

在文件 VegetationSceneInstance.h 第 65 行定义.

◆ withdrawElement()

Result< VegetationSceneElementPublication > eve::asset_graphics::VegetationSceneInstance::withdrawElement ( std::uint64_t  expectedRevision,
VegetationSceneElementHandle  handle,
const VegetationSceneGpuBuild &  build 
)

Withdraw one live Element and republish this associated instance atomically.

在文件 VegetationSceneInstance.cpp 第 78 行定义.

引用了 handle , 以及 eve::asset_graphics::VegetationSceneAssociation::masks.


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