Prepared dynamic mesh presentation over an owned deformation player. @ownership Owns immutable asset and CPU buffers only; the caller owns playback state. Never retains Graphics, Mesh, ECS or source simulation pointers. @thread Render-owner thread, exclusive use; no callbacks. Caller owns graphics-resource lifecycle. 更多...
#include <DeformMeshPresentation.h>
类 | |
| struct | Impl |
Public 成员函数 | |
| ~DeformMeshPresentation () | |
| DeformMeshPresentation (const DeformMeshPresentation &)=delete | |
| DeformMeshPresentation & | operator= (const DeformMeshPresentation &)=delete |
| Result< graphics::Mesh * > | createMesh (DeformPlayback &player, graphics::Graphics &graphics) |
| Sample the player and create one Graphics-owned mesh with current topology. @ownership Returned pointer is borrowed from Graphics; caller manages its release and must not outlive Graphics. @lifetime Graphics and mesh are not retained. Successful Graphics::releaseMesh transfers facade deletion to caller. @cost Linear CPU preparation and GPU allocation/upload, once per mesh before repeated uploads. | |
| Result< void > | upload (DeformPlayback &player, graphics::Graphics &graphics, graphics::Mesh &mesh) |
| Sample and upload all prepared streams to a live mesh owned by the supplied Graphics. @ownership Borrows both objects only for this call; no pointers survive return. @cost Linear in output vertices and indices, reusing CPU buffers; GPU backend may grow buffers if needed. | |
静态 Public 成员函数 | |
| static Result< std::unique_ptr< DeformMeshPresentation > > | prepare (DeformTrack track, float ropeRadius) |
| Prepare double-sided triangles or capped eight-sided tubes from a metre-space clip. | |
详细描述
Prepared dynamic mesh presentation over an owned deformation player. @ownership Owns immutable asset and CPU buffers only; the caller owns playback state. Never retains Graphics, Mesh, ECS or source simulation pointers. @thread Render-owner thread, exclusive use; no callbacks. Caller owns graphics-resource lifecycle.
在文件 DeformMeshPresentation.h 第 17 行定义.
构造及析构函数说明
◆ ~DeformMeshPresentation()
|
default |
◆ DeformMeshPresentation()
|
delete |
成员函数说明
◆ createMesh()
| Result< graphics::Mesh * > eve::physics::DeformMeshPresentation::createMesh | ( | DeformPlayback & | player, |
| graphics::Graphics & | graphics | ||
| ) |
Sample the player and create one Graphics-owned mesh with current topology. @ownership Returned pointer is borrowed from Graphics; caller manages its release and must not outlive Graphics. @lifetime Graphics and mesh are not retained. Successful Graphics::releaseMesh transfers facade deletion to caller. @cost Linear CPU preparation and GPU allocation/upload, once per mesh before repeated uploads.
- 返回
- Borrowed mesh or checked sampling/backend failure; no partially registered adapter state.
在文件 DeformMeshPresentation.cpp 第 140 行定义.
引用了 eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), graphics, mesh , 以及 eve::Result< T >::success().
◆ operator=()
|
delete |
◆ prepare()
|
static |
Prepare double-sided triangles or capped eight-sided tubes from a metre-space clip.
- 参数
-
ropeRadius Positive finite tube radius in metres, used only for segment topology.
- 返回
- Owning CPU presentation or invalid coordinate/budget/allocation diagnostic. @cost Linear in output vertices and indices, allocating once per presentation instance outside playback.
在文件 DeformMeshPresentation.cpp 第 28 行定义.
引用了 count, eve::Diagnostic::error(), eve::Failed, impl, index, indexCount, eve::physics::force_detail::invalid(), eve::physics::MetresRightHandedYUp, offset, eve::physics::DeformTopology::primitive(), eve::physics::DeformTrack::recipe(), topology, eve::physics::DeformTrack::topology(), eve::physics::Triangles, triangles , 以及 value.
◆ upload()
| Result< void > eve::physics::DeformMeshPresentation::upload | ( | DeformPlayback & | player, |
| graphics::Graphics & | graphics, | ||
| graphics::Mesh & | mesh | ||
| ) |
Sample and upload all prepared streams to a live mesh owned by the supplied Graphics. @ownership Borrows both objects only for this call; no pointers survive return. @cost Linear in output vertices and indices, reusing CPU buffers; GPU backend may grow buffers if needed.
- 返回
- Success or sampling/foreign-mesh/backend failure. Sampling failure performs no GPU write. Backend failure does not promise GPU rollback; caller must skip drawing until a successful upload.
在文件 DeformMeshPresentation.cpp 第 151 行定义.
引用了 eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), graphics, eve::physics::force_detail::invalid(), mesh , 以及 eve::Result< T >::success().
该类的文档由以下文件生成:
- src/modules/physics/bake_graphics/DeformMeshPresentation.h
- src/modules/physics/bake_graphics/DeformMeshPresentation.cpp