Owning registry that atomically couples dynamic Element state to a scene GPU runtime. Imported Elements remain immutable. Dynamic slots use generation-qualified handles and stable slot order. The registry and GPU runtime are graphics-thread affine; no callback is invoked while state is changing. 更多...
#include <VegetationSceneLiveElements.h>
Public 成员函数 | |
| std::uint64_t | revision () const noexcept |
| Current successful mutation revision; begins at one. | |
| Result< LoadedVegetationScene > | snapshot () const |
| Detached scene containing imported Elements followed by live slots in stable index order. | |
| Result< VegetationSceneElementPublication > | registerElement (std::uint64_t expectedRevision, std::uint64_t expectedGpuRevision, const VegetationSceneElement &element, VegetationSceneGpuRuntime &runtime, const graphics::PbrSurface &baseSurface, const graphics::VegetationMotion &baseMotion, const std::map< std::string, graphics::VegetationMask > &masks, const VegetationSceneGpuBuild &build) |
| Register and publish one Element as an atomic registry/GPU transaction. | |
| Result< VegetationSceneElementPublication > | withdrawElement (std::uint64_t expectedRevision, std::uint64_t expectedGpuRevision, VegetationSceneElementHandle handle, VegetationSceneGpuRuntime &runtime, const graphics::PbrSurface &baseSurface, const graphics::VegetationMotion &baseMotion, const std::map< std::string, graphics::VegetationMask > &masks, const VegetationSceneGpuBuild &build) |
| Withdraw and publish one live Element as an atomic registry/GPU transaction. Foreign, stale and already withdrawn handles are rejected without mutation. @thread Graphics thread only; synchronous and non-reentrant. | |
静态 Public 成员函数 | |
| static Result< std::unique_ptr< VegetationSceneLiveElements > > | create (LoadedVegetationScene baseScene, std::uint64_t owner) |
| Create a registry from one validated imported scene. | |
详细描述
Owning registry that atomically couples dynamic Element state to a scene GPU runtime. Imported Elements remain immutable. Dynamic slots use generation-qualified handles and stable slot order. The registry and GPU runtime are graphics-thread affine; no callback is invoked while state is changing.
在文件 VegetationSceneLiveElements.h 第 60 行定义.
成员函数说明
◆ create()
|
static |
Create a registry from one validated imported scene.
- 参数
-
baseScene Detached owning scene whose imported Elements remain the stable prefix. owner Nonzero instance identity used to reject foreign handles.
- 返回
- Owning registry, or InvalidArgument/Failed without publication.
在文件 VegetationSceneLiveElements.cpp 第 71 行定义.
引用了 element, eve::asset_graphics::LoadedVegetationScene::elements, eve::Diagnostic::error(), eve::Failed , 以及 eve::InvalidArgument.
被这些函数引用 eve::asset_graphics::VegetationSceneInstance::create().
◆ registerElement()
| Result< VegetationSceneElementPublication > eve::asset_graphics::VegetationSceneLiveElements::registerElement | ( | std::uint64_t | expectedRevision, |
| std::uint64_t | expectedGpuRevision, | ||
| const VegetationSceneElement & | element, | ||
| VegetationSceneGpuRuntime & | runtime, | ||
| const graphics::PbrSurface & | baseSurface, | ||
| const graphics::VegetationMotion & | baseMotion, | ||
| const std::map< std::string, graphics::VegetationMask > & | masks, | ||
| const VegetationSceneGpuBuild & | build | ||
| ) |
Register and publish one Element as an atomic registry/GPU transaction.
- 参数
-
expectedRevision Registry revision observed by the caller. expectedGpuRevision GPU runtime revision observed by the caller. element Detached Element candidate; copied before GPU work and owned after success.
- 返回
- New handle and revisions, or failure with registry and GPU runtime unchanged. @thread Graphics thread only; synchronous and non-reentrant.
在文件 VegetationSceneLiveElements.cpp 第 107 行定义.
引用了 eve::Conflict, element, eve::asset_graphics::LoadedVegetationScene::elements, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::InvalidArgument, snapshot() , 以及 eve::Result< T >::success().
◆ revision()
|
inlinenoexcept |
Current successful mutation revision; begins at one.
在文件 VegetationSceneLiveElements.h 第 72 行定义.
◆ snapshot()
| Result< LoadedVegetationScene > eve::asset_graphics::VegetationSceneLiveElements::snapshot | ( | ) | const |
Detached scene containing imported Elements followed by live slots in stable index order.
在文件 VegetationSceneLiveElements.cpp 第 93 行定义.
引用了 eve::asset_graphics::LoadedVegetationScene::elements, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure() , 以及 eve::Result< T >::success().
被这些函数引用 registerElement() , 以及 withdrawElement().
◆ withdrawElement()
| Result< VegetationSceneElementPublication > eve::asset_graphics::VegetationSceneLiveElements::withdrawElement | ( | std::uint64_t | expectedRevision, |
| std::uint64_t | expectedGpuRevision, | ||
| VegetationSceneElementHandle | handle, | ||
| VegetationSceneGpuRuntime & | runtime, | ||
| const graphics::PbrSurface & | baseSurface, | ||
| const graphics::VegetationMotion & | baseMotion, | ||
| const std::map< std::string, graphics::VegetationMask > & | masks, | ||
| const VegetationSceneGpuBuild & | build | ||
| ) |
Withdraw and publish one live Element as an atomic registry/GPU transaction. Foreign, stale and already withdrawn handles are rejected without mutation. @thread Graphics thread only; synchronous and non-reentrant.
在文件 VegetationSceneLiveElements.cpp 第 150 行定义.
引用了 eve::Conflict, element, eve::asset_graphics::LoadedVegetationScene::elements, eve::Diagnostic::error(), eve::Result< T >::failure(), handle, index, eve::InvalidArgument, eve::RuntimeHandle< VegetationSceneElementHandleTag >::nextGeneration(), eve::NotFound, snapshot() , 以及 eve::Result< T >::success().
该类的文档由以下文件生成:
- src/modules/asset/graphics/VegetationSceneLiveElements.h
- src/modules/asset/graphics/VegetationSceneLiveElements.cpp