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()
|
static |
Resolve and publish the manager automatically from a Scene Template asset.
- 参数
-
reader Borrowed only during creation; no package views survive. factory Borrowed graphics factory which must outlive the returned instance and explicit release. sceneTemplate Scene Template whose source GUID selects the manager. capabilities Runtime variant capabilities. baseSurface Owning parameter snapshot; referenced textures remain borrowed. baseMotion Detached explicit-time motion state. build Owning atlas values plus call-scoped raster spans and initial nonzero GPU revision. owner Nonzero 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()
|
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()
|
inline |
Invalidate surface borrows and release manager GPU resources.
在文件 VegetationSceneInstance.h 第 78 行定义.
◆ scene()
|
inlinenoexcept |
Borrow the associated declarative scene for this instance lifetime.
在文件 VegetationSceneInstance.h 第 63 行定义.
◆ surface()
|
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.
该类的文档由以下文件生成:
- src/modules/asset/graphics/VegetationSceneInstance.h
- src/modules/asset/graphics/VegetationSceneInstance.cpp