载入中...
搜索中...
未找到
eve::physics::GeometryCollectionRenderer类 参考final

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]

eve::physics::GeometryCollectionRenderer::GeometryCollectionRenderer ( GeometryCollectionInstance *  instance)
explicitnoexcept

Construct a renderer that borrows an instance.

参数
instanceBorrowed 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]

eve::physics::GeometryCollectionRenderer::GeometryCollectionRenderer ( const GeometryCollectionRenderer &  )
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.

参数
graphicsBorrowed 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()

GeometryCollectionInstance * eve::physics::GeometryCollectionRenderer::getInstance ( ) const
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()

int eve::physics::GeometryCollectionRenderer::lastActiveDrawCount ( ) const
inlinenoexcept

Number of bones drawn individually on the last successful draw.

在文件 GeometryCollectionRenderer.h 第 74 行定义.

◆ lastSleepBatchCount()

int eve::physics::GeometryCollectionRenderer::lastSleepBatchCount ( ) const
inlinenoexcept

Number of bones included in the sleeping batch on the last draw.

在文件 GeometryCollectionRenderer.h 第 76 行定义.

◆ operator=()

GeometryCollectionRenderer & eve::physics::GeometryCollectionRenderer::operator= ( const GeometryCollectionRenderer &  )
delete

◆ setExteriorColor()

void eve::physics::GeometryCollectionRenderer::setExteriorColor ( float  r,
float  g,
float  b,
float  a 
)

Exterior RGBA for Attached bones.

在文件 GeometryCollectionRenderer.cpp 第 74 行定义.

引用了 a, b, g , 以及 r.

◆ 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 
)

Interior RGBA for Detached bones (broken-face stand-in).

在文件 GeometryCollectionRenderer.cpp 第 82 行定义.

引用了 a, b, g , 以及 r.

◆ setSleepColor()

void eve::physics::GeometryCollectionRenderer::setSleepColor ( float  r,
float  g,
float  b,
float  a 
)

Sleeping-batch RGBA.

在文件 GeometryCollectionRenderer.cpp 第 90 行定义.

引用了 a, b, g , 以及 r.


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