载入中...
搜索中...
未找到
eve::graphics::Mesh类 参考

GPU mesh handle (+ optional CPU morph targets). 更多...

#include <Mesh.h>

类 eve::graphics::Mesh 继承关系图:
eve::graphics::Drawable

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

在文件 Mesh.h18 行定义.

成员函数说明

◆ addMorphTarget()

bool eve::graphics::Mesh::addMorphTarget ( const std::string &  name,
const float *  deltaPosXYZ 
)

Delta morph: target = base + delta * weight.

在文件 Mesh.cpp77 行定义.

引用了 hasMorph() , 以及 name.

◆ addMorphTargetAbsolute()

bool eve::graphics::Mesh::addMorphTargetAbsolute ( const std::string &  name,
const float *  absPosXYZ 
)

Absolute morph (Assimp aiAnimMesh style): stored as delta from base.

在文件 Mesh.cpp89 行定义.

引用了 hasMorph() , 以及 name.

◆ baseUv()

const std::vector< float > & eve::graphics::Mesh::baseUv ( ) const
inline

在文件 Mesh.h72 行定义.

◆ clearMorphData()

void eve::graphics::Mesh::clearMorphData ( )

在文件 Mesh.cpp52 行定义.

被这些函数引用 initMorphBase().

◆ clearMorphWeights()

void eve::graphics::Mesh::clearMorphWeights ( )

在文件 Mesh.cpp133 行定义.

◆ computeBounds()

void eve::graphics::Mesh::computeBounds ( const float *  posXYZ,
int  vertexCount 
)

Compute the bounding sphere (centroid + max radius) from positions.

在文件 Mesh.cpp10 行定义.

引用了 boundsCx, boundsCy, boundsCz, boundsRadius, c, d, n , 以及 u.

被这些函数引用 eve::graphics::vulkan::Graphics::newMeshFromArrays().

◆ computeMorphedPositions()

void eve::graphics::Mesh::computeMorphedPositions ( std::vector< float > &  outPos,
std::vector< float > &  outNrm 
) const

Bake current weights into outPos / outNrm (xyz packed).

在文件 Mesh.cpp142 行定义.

引用了 w.

被这些函数引用 eve::graphics::vulkan::Graphics::bakeMeshMorph().

◆ draw()

void eve::graphics::Mesh::draw ( Graphics gfx,
const glm::mat4 &  matrix 
) const
inlineoverridevirtual

Draws the object with the specified transformation matrix.

实现了 eve::graphics::Drawable.

在文件 Mesh.h40 行定义.

◆ drawOcclusion()

void eve::graphics::Mesh::drawOcclusion ( Graphics gfx,
const glm::mat4 &  matrix 
) const
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::Drawable .

在文件 Mesh.cpp42 行定义.

引用了 eve::graphics::Graphics::drawOcclusionSolid(), eve::graphics::Drawable::getCastOcclusion(), h, w, x , 以及 y.

◆ getMorphCount()

int eve::graphics::Mesh::getMorphCount ( ) const

在文件 Mesh.cpp105 行定义.

被这些函数引用 eve::avatar::AvatarInstance::setExpression().

◆ getMorphName()

std::string eve::graphics::Mesh::getMorphName ( int  index) const

在文件 Mesh.cpp107 行定义.

被这些函数引用 eve::avatar::AvatarInstance::setExpression().

◆ getMorphWeight()

float eve::graphics::Mesh::getMorphWeight ( const std::string &  name) const

在文件 Mesh.cpp128 行定义.

引用了 name.

◆ getVertexCount()

int eve::graphics::Mesh::getVertexCount ( ) const

在文件 Mesh.cpp103 行定义.

◆ hasBounds()

bool eve::graphics::Mesh::hasBounds ( ) const
inline

True when a valid bounding sphere is available for culling.

在文件 Mesh.h35 行定义.

引用了 boundsRadius.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ hasMorph()

bool eve::graphics::Mesh::hasMorph ( const std::string &  name) const

在文件 Mesh.cpp112 行定义.

引用了 name.

被这些函数引用 addMorphTarget(), addMorphTargetAbsolute() , 以及 eve::avatar::AvatarInstance::setParameter().

◆ hasMorphData()

bool eve::graphics::Mesh::hasMorphData ( ) const
inline

在文件 Mesh.h67 行定义.

被这些函数引用 eve::avatar::AvatarInstance::setExpression().

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

在文件 Mesh.cpp61 行定义.

引用了 clearMorphData() , 以及 n.

◆ isMorphDirty()

bool eve::graphics::Mesh::isMorphDirty ( ) const
inline

在文件 Mesh.h65 行定义.

被这些函数引用 eve::avatar::AvatarInstance::bakeMorphs().

◆ markMorphClean()

void eve::graphics::Mesh::markMorphClean ( )
inline

在文件 Mesh.h66 行定义.

◆ setMorphWeight()

bool eve::graphics::Mesh::setMorphWeight ( const std::string &  name,
float  weight 
)

在文件 Mesh.cpp116 行定义.

引用了 name.

被这些函数引用 eve::avatar::AvatarInstance::setParameter().

类成员变量说明

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

在文件 Mesh.h29 行定义.

被这些函数引用 computeBounds() , 以及 eve::graphics::RenderSystem3D::render().

◆ boundsCy

float eve::graphics::Mesh::boundsCy = 0.f

在文件 Mesh.h30 行定义.

被这些函数引用 computeBounds() , 以及 eve::graphics::RenderSystem3D::render().

◆ boundsCz

float eve::graphics::Mesh::boundsCz = 0.f

在文件 Mesh.h31 行定义.

被这些函数引用 computeBounds() , 以及 eve::graphics::RenderSystem3D::render().

◆ boundsRadius

float eve::graphics::Mesh::boundsRadius = 0.f

在文件 Mesh.h32 行定义.

被这些函数引用 computeBounds(), hasBounds() , 以及 eve::graphics::RenderSystem3D::render().

◆ gpuHandle

void* eve::graphics::Mesh::gpuHandle = nullptr

在文件 Mesh.h21 行定义.

◆ indexCount

int eve::graphics::Mesh::indexCount = 0

在文件 Mesh.h20 行定义.


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