Presentation-only renderer for a borrowed volumetric soft body. 更多...
#include <SoftBody3DRenderer.h>
Public 成员函数 | |
| SoftBody3DRenderer (SoftBody3D *body) noexcept | |
| Construct a renderer observing a nullable soft-body runtime. | |
| SoftBody3DRenderer (const SoftBody3DRenderer &)=delete | |
| SoftBody3DRenderer & | operator= (const SoftBody3DRenderer &)=delete |
| void | setBody (SoftBody3D *body) |
| Replace the borrowed runtime; null disables drawing. | |
| SoftBody3D * | getBody () const |
| Return the currently borrowed runtime. | |
| void | setColor (float r, float g, float b, float a) |
| Set the clamped RGBA presentation color. | |
| void | draw (graphics::Graphics *graphics) |
| Update the surface cache and draw it in the current 3D frame. | |
详细描述
Presentation-only renderer for a borrowed volumetric soft body.
Color and mesh-cache state belong to this renderer. The simulation and Graphics objects are borrowed, thread-affine, and are never retained by a callback.
在文件 SoftBody3DRenderer.h 第 21 行定义.
构造及析构函数说明
◆ SoftBody3DRenderer() [1/2]
|
inlineexplicitnoexcept |
Construct a renderer observing a nullable soft-body runtime.
在文件 SoftBody3DRenderer.h 第 24 行定义.
◆ SoftBody3DRenderer() [2/2]
|
delete |
成员函数说明
◆ draw()
| void eve::physics::SoftBody3DRenderer::draw | ( | graphics::Graphics * | graphics | ) |
Update the surface cache and draw it in the current 3D frame.
在文件 SoftBody3DGraphics.cpp 第 29 行定义.
引用了 a, b, c, cols, d, eve::graphics::Graphics::drawMesh(), eve::physics::SoftBody3D::getCols(), eve::physics::SoftBody3D::getLayers(), eve::physics::SoftBody3D::getParticleCount(), eve::physics::SoftBody3D::getParticleX(), eve::physics::SoftBody3D::getParticleY(), eve::physics::SoftBody3D::getParticleZ(), eve::physics::SoftBody3D::getRows(), indexCount, indices, eve::physics::SoftBody3D::isDestroyed(), eve::graphics::Graphics::newMeshFromArrays(), normal, normals, p, positions, rows, eve::graphics::Graphics::updateMeshVertices(), uv, vertexCount, vertices, x, y , 以及 z.
◆ getBody()
|
inline |
Return the currently borrowed runtime.
在文件 SoftBody3DRenderer.h 第 32 行定义.
◆ operator=()
|
delete |
◆ setBody()
| void eve::physics::SoftBody3DRenderer::setBody | ( | SoftBody3D * | body | ) |
◆ setColor()
| void eve::physics::SoftBody3DRenderer::setColor | ( | float | r, |
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) |
该类的文档由以下文件生成:
- src/modules/physics/softbody/graphics/SoftBody3DRenderer.h
- src/modules/physics/softbody/graphics/SoftBody3DGraphics.cpp