GPU mesh handle (+ optional CPU morph targets). 更多...
#include <Mesh.h>
Public 成员函数 | |
| bool | hasBounds () const |
| True when a valid bounding sphere is available for culling. | |
| void | computeBounds (const float *posXYZ, int vertexCount) |
| Compute the bounding sphere (centroid + max radius) from positions. | |
| void | draw (Graphics *, const glm::mat4 &) const override |
| Draws the object with the specified transformation matrix. | |
| void | drawOcclusion (Graphics *gfx, const glm::mat4 &matrix) const override |
| Screen-space black proxy for volumetric occlusion. Interprets matrix as 2D affine (translation + scale) and fills a solid rect — callers should pass a pixel-space placement (e.g. projected AABB). | |
| void | clearMorphData () |
| void | initMorphBase (int vertexCount, const float *posXYZ, const float *nrmXYZ=nullptr, const float *uvST=nullptr) |
| Capture base pose (xyz packed). Optional normals/uvs (same vertex count). | |
| bool | addMorphTarget (const std::string &name, const float *deltaPosXYZ) |
| bool | addMorphTargetAbsolute (const std::string &name, const float *absPosXYZ) |
| Absolute morph (Assimp aiAnimMesh style): stored as delta from base. | |
| int | getVertexCount () const |
| int | getMorphCount () const |
| std::string | getMorphName (int index) const |
| bool | hasMorph (const std::string &name) const |
| bool | setMorphWeight (const std::string &name, float weight) |
| float | getMorphWeight (const std::string &name) const |
| void | clearMorphWeights () |
| bool | isMorphDirty () const |
| void | markMorphClean () |
| bool | hasMorphData () const |
| void | computeMorphedPositions (std::vector< float > &outPos, std::vector< float > &outNrm) const |
| Bake current weights into outPos / outNrm (xyz packed). | |
| const std::vector< float > & | baseUv () const |
Public 成员函数 继承自 eve::graphics::Drawable | |
| virtual | ~Drawable () |
| bool | getCastOcclusion () const |
| When false, skipped by Graphics::drawOcclusion / volumetric occluder passes. | |
| void | setCastOcclusion (bool cast) |
Public 属性 | |
| int | indexCount = 0 |
| void * | gpuHandle = nullptr |
| float | boundsCx = 0.f |
| Model-space bounding sphere used for view/cascade frustum culling. Computed from vertex positions at upload time (see computeBounds). boundsRadius <= 0 means unknown — callers must treat the mesh as always visible (no culling). | |
| float | boundsCy = 0.f |
| float | boundsCz = 0.f |
| float | boundsRadius = 0.f |
详细描述
GPU mesh handle (+ optional CPU morph targets).
Morph pipeline: initMorphBase / addMorphTarget* → setMorphWeight → Graphics::bakeMeshMorph (uploads blended positions to the host-visible VBO).
成员函数说明
◆ addMorphTarget()
| bool eve::graphics::Mesh::addMorphTarget | ( | const std::string & | name, |
| const float * | deltaPosXYZ | ||
| ) |
◆ addMorphTargetAbsolute()
| bool eve::graphics::Mesh::addMorphTargetAbsolute | ( | const std::string & | name, |
| const float * | absPosXYZ | ||
| ) |
Absolute morph (Assimp aiAnimMesh style): stored as delta from base.
引用了 hasMorph() , 以及 name.
◆ baseUv()
◆ clearMorphData()
| void eve::graphics::Mesh::clearMorphData | ( | ) |
被这些函数引用 initMorphBase().
◆ clearMorphWeights()
◆ computeBounds()
| void eve::graphics::Mesh::computeBounds | ( | const float * | posXYZ, |
| int | vertexCount | ||
| ) |
◆ computeMorphedPositions()
| void eve::graphics::Mesh::computeMorphedPositions | ( | std::vector< float > & | outPos, |
| std::vector< float > & | outNrm | ||
| ) | const |
Bake current weights into outPos / outNrm (xyz packed).
引用了 w.
◆ draw()
|
inlineoverridevirtual |
Draws the object with the specified transformation matrix.
◆ drawOcclusion()
|
overridevirtual |
Screen-space black proxy for volumetric occlusion. Interprets matrix as 2D affine (translation + scale) and fills a solid rect — callers should pass a pixel-space placement (e.g. projected AABB).
引用了 eve::graphics::Graphics::drawOcclusionSolid(), eve::graphics::Drawable::getCastOcclusion(), h, w, x , 以及 y.
◆ getMorphCount()
| int eve::graphics::Mesh::getMorphCount | ( | ) | const |
◆ getMorphName()
| std::string eve::graphics::Mesh::getMorphName | ( | int | index | ) | const |
◆ getMorphWeight()
| float eve::graphics::Mesh::getMorphWeight | ( | const std::string & | name | ) | const |
◆ getVertexCount()
◆ hasBounds()
|
inline |
True when a valid bounding sphere is available for culling.
引用了 boundsRadius.
◆ hasMorph()
| bool eve::graphics::Mesh::hasMorph | ( | const std::string & | name | ) | const |
引用了 name.
被这些函数引用 addMorphTarget(), addMorphTargetAbsolute() , 以及 eve::avatar::AvatarInstance::setParameter().
◆ hasMorphData()
|
inline |
◆ initMorphBase()
| void eve::graphics::Mesh::initMorphBase | ( | int | vertexCount, |
| const float * | posXYZ, | ||
| const float * | nrmXYZ = nullptr, |
||
| const float * | uvST = nullptr |
||
| ) |
Capture base pose (xyz packed). Optional normals/uvs (same vertex count).
引用了 clearMorphData() , 以及 n.
◆ isMorphDirty()
|
inline |
◆ markMorphClean()
◆ setMorphWeight()
| bool eve::graphics::Mesh::setMorphWeight | ( | const std::string & | name, |
| float | weight | ||
| ) |
类成员变量说明
◆ boundsCx
| float eve::graphics::Mesh::boundsCx = 0.f |
Model-space bounding sphere used for view/cascade frustum culling. Computed from vertex positions at upload time (see computeBounds). boundsRadius <= 0 means unknown — callers must treat the mesh as always visible (no culling).
被这些函数引用 computeBounds() , 以及 eve::graphics::RenderSystem3D::render().
◆ boundsCy
| float eve::graphics::Mesh::boundsCy = 0.f |
被这些函数引用 computeBounds() , 以及 eve::graphics::RenderSystem3D::render().
◆ boundsCz
| float eve::graphics::Mesh::boundsCz = 0.f |
被这些函数引用 computeBounds() , 以及 eve::graphics::RenderSystem3D::render().
◆ boundsRadius
| float eve::graphics::Mesh::boundsRadius = 0.f |
被这些函数引用 computeBounds(), hasBounds() , 以及 eve::graphics::RenderSystem3D::render().
◆ gpuHandle
◆ indexCount
该类的文档由以下文件生成:
Public 成员函数 继承自