Presentation bridge for a borrowed geometry-collection instance. 更多...
#include <GeometryCollectionRenderer.h>
Public 成员函数 | |
| GeometryCollectionRenderer (GeometryCollectionInstance *instance) noexcept | |
| Construct a renderer that borrows an instance. | |
| GeometryCollectionRenderer (const GeometryCollectionRenderer &)=delete | |
| GeometryCollectionRenderer & | operator= (const GeometryCollectionRenderer &)=delete |
| ~GeometryCollectionRenderer () | |
| Geometry collection renderer. | |
| void | setInstance (GeometryCollectionInstance *instance) |
| Replace the borrowed instance; null disables drawing. @ownership Does not take ownership of instance. @lifetime instance must outlive subsequent draws, or be cleared again. | |
| GeometryCollectionInstance * | getInstance () const noexcept |
| Return the currently borrowed instance. @ownership Borrowed; caller must not delete through this pointer. @lifetime Valid until setInstance or renderer destruction. | |
| void | setExteriorColor (float r, float g, float b, float a) |
| Exterior RGBA for Attached bones. | |
| void | setInteriorColor (float r, float g, float b, float a) |
| Interior RGBA for Detached bones (broken-face stand-in). | |
| void | setSleepColor (float r, float g, float b, float a) |
| Sleeping-batch RGBA. | |
| eve::Result< void > | draw (graphics::Graphics *graphics) |
| Synchronize caches and draw all bones into the current 3D frame. | |
| int | lastActiveDrawCount () const noexcept |
| Number of bones drawn individually on the last successful draw. | |
| int | lastSleepBatchCount () const noexcept |
| Number of bones included in the sleeping batch on the last draw. | |
详细描述
Presentation bridge for a borrowed geometry-collection instance.
Draws box-proxy bones. Attached bones use the exterior color; Detached bones use the interior color as a broken-face stand-in. Sleeping bones are merged into one batched mesh rebuilt when sleepBatchRevision() changes.
@ownership Never owns Instance, Graphics, or Body3D. Mesh caches are produced through Graphics and not retained as exclusive ownership. @lifetime Borrows Instance and Graphics only for each call; do not call draw after Instance or its World3D is destroyed.
在文件 GeometryCollectionRenderer.h 第 29 行定义.
构造及析构函数说明
◆ GeometryCollectionRenderer() [1/2]
|
explicitnoexcept |
Construct a renderer that borrows an instance.
- 参数
-
instance Borrowed instance, or null to disable drawing. @ownership Does not take ownership of instance. @lifetime instance must outlive draws, or be cleared via setInstance(null).
在文件 GeometryCollectionRenderer.cpp 第 64 行定义.
◆ GeometryCollectionRenderer() [2/2]
|
delete |
◆ ~GeometryCollectionRenderer()
| eve::physics::GeometryCollectionRenderer::~GeometryCollectionRenderer | ( | ) |
Geometry collection renderer.
在文件 GeometryCollectionRenderer.cpp 第 67 行定义.
成员函数说明
◆ draw()
| eve::Result< void > eve::physics::GeometryCollectionRenderer::draw | ( | graphics::Graphics * | graphics | ) |
Synchronize caches and draw all bones into the current 3D frame.
- 参数
-
graphics Borrowed Graphics used for mesh allocation and drawMesh.
- 返回
- Success, or StaleHandle/InvalidArgument when the instance/world is gone. @ownership Does not take ownership of graphics. @lifetime graphics must remain live for the duration of this call.
在文件 GeometryCollectionRenderer.cpp 第 168 行定义.
引用了 bone, eve::physics::GeometryCollectionInstance::boneCount(), eve::physics::GeometryCollectionInstance::bonePresentation(), eve::physics::Detached, eve::graphics::Graphics::drawMesh(), eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::physics::GeometryCollectionInstance::hasLiveWorld(), eve::InvalidArgument, model, eve::physics::GeometryCollectionInstance::sleepBatchRevision(), eve::physics::Sleeping, eve::StaleHandle, eve::Result< T >::success() , 以及 tint.
◆ getInstance()
|
inlinenoexcept |
Return the currently borrowed instance. @ownership Borrowed; caller must not delete through this pointer. @lifetime Valid until setInstance or renderer destruction.
在文件 GeometryCollectionRenderer.h 第 55 行定义.
◆ lastActiveDrawCount()
|
inlinenoexcept |
Number of bones drawn individually on the last successful draw.
在文件 GeometryCollectionRenderer.h 第 74 行定义.
◆ lastSleepBatchCount()
|
inlinenoexcept |
Number of bones included in the sleeping batch on the last draw.
在文件 GeometryCollectionRenderer.h 第 76 行定义.
◆ operator=()
|
delete |
◆ setExteriorColor()
| void eve::physics::GeometryCollectionRenderer::setExteriorColor | ( | float | r, |
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) |
◆ setInstance()
| void eve::physics::GeometryCollectionRenderer::setInstance | ( | GeometryCollectionInstance * | instance | ) |
Replace the borrowed instance; null disables drawing. @ownership Does not take ownership of instance. @lifetime instance must outlive subsequent draws, or be cleared again.
在文件 GeometryCollectionRenderer.cpp 第 69 行定义.
◆ setInteriorColor()
| void eve::physics::GeometryCollectionRenderer::setInteriorColor | ( | float | r, |
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) |
◆ setSleepColor()
| void eve::physics::GeometryCollectionRenderer::setSleepColor | ( | float | r, |
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) |
该类的文档由以下文件生成:
- src/modules/physics/destruction/graphics/GeometryCollectionRenderer.h
- src/modules/physics/destruction/graphics/GeometryCollectionRenderer.cpp