Support Forum       G3D Web Page     
Public Member Functions | Public Attributes | Friends | List of all members
G3D::ArticulatedModel::Mesh Class Reference

A set of primitives (e.g., triangles) that share a material. More...

Public Member Functions

 ~Mesh ()
 
void clearIndexStream ()
 If you modify cpuIndexArray, invoke this method to force the GPU arrays to update on the next ArticulatedMode::pose() More...
 
bool hasBones () const
 
int triangleCount () const
 

Public Attributes

AABox boxBounds
 Object Space. More...
 
Array< Part * > contributingJoints
 Joints that affect this Mesh. More...
 
Array< int > cpuIndexArray
 If you modify cpuIndexArray, invoke clearIndexStream() to force gpuIndexArray to update on the next ArticulatedMode::pose() More...
 
Geometrygeometry
 The geometry used by this Mesh. More...
 
shared_ptr< UniversalSurface::GPUGeomgpuGeom
 Written by copyToGPU. More...
 
IndexStream gpuIndexArray
 If you modify cpuIndexArray, invoke clearIndexStream() to force gpuIndexArray to update on the next ArticulatedMode::pose() More...
 
PartlogicalPart = nullptr
 If not nullptr, the logicalParts form a rigid body hierarchy ("scene graph") that dictates the position of this mesh relative to its parent and the root. More...
 
shared_ptr< UniversalMaterialmaterial
 
String name
 
PrimitiveType primitive
 
Sphere sphereBounds
 Object Space. More...
 
shared_ptr< TriTreetriTree
 May be nullptr. More...
 
bool twoSided = false
 
int uniqueID = 0
 

Friends

class ArticulatedModel
 

Detailed Description

A set of primitives (e.g., triangles) that share a material.

Constructor & Destructor Documentation

◆ ~Mesh()

G3D::ArticulatedModel::Mesh::~Mesh ( )
inline

Member Function Documentation

◆ clearIndexStream()

void G3D::ArticulatedModel::Mesh::clearIndexStream ( )

If you modify cpuIndexArray, invoke this method to force the GPU arrays to update on the next ArticulatedMode::pose()

◆ hasBones()

bool G3D::ArticulatedModel::Mesh::hasBones ( ) const
inline

◆ triangleCount()

int G3D::ArticulatedModel::Mesh::triangleCount ( ) const
inline

Friends And Related Function Documentation

◆ ArticulatedModel

friend class ArticulatedModel
friend

Member Data Documentation

◆ boxBounds

AABox G3D::ArticulatedModel::Mesh::boxBounds

Object Space.

◆ contributingJoints

Array<Part*> G3D::ArticulatedModel::Mesh::contributingJoints

Joints that affect this Mesh.

For rigid body animation, this is equal to logicalPart.

For skinned (bone) animation when gpuGeom->hasBones() is true, this is an array of all bones referenced by index in the CPUVertexArray. The logicalPart does not appear in contributingJoints in this case.

Referenced by hasBones().

◆ cpuIndexArray

Array<int> G3D::ArticulatedModel::Mesh::cpuIndexArray

If you modify cpuIndexArray, invoke clearIndexStream() to force gpuIndexArray to update on the next ArticulatedMode::pose()

Referenced by triangleCount().

◆ geometry

Geometry* G3D::ArticulatedModel::Mesh::geometry

The geometry used by this Mesh.

nullptr if no geometry specified. Multiple meshes may share geometry.

Referenced by hasBones().

◆ gpuGeom

shared_ptr<UniversalSurface::GPUGeom> G3D::ArticulatedModel::Mesh::gpuGeom

Written by copyToGPU.

Multiple meshes may share geometry.

◆ gpuIndexArray

IndexStream G3D::ArticulatedModel::Mesh::gpuIndexArray

If you modify cpuIndexArray, invoke clearIndexStream() to force gpuIndexArray to update on the next ArticulatedMode::pose()

Written by ArticulatedModel::Mesh::copyToGPU

◆ logicalPart

Part* G3D::ArticulatedModel::Mesh::logicalPart = nullptr

If not nullptr, the logicalParts form a rigid body hierarchy ("scene graph") that dictates the position of this mesh relative to its parent and the root.

If gpuGeom->hasBones() is true, this is ignored for vertex positioning but may still be stored for inspection purposes as it indicates the logical hierarchy of the model as loaded from a file.

◆ material

shared_ptr<UniversalMaterial> G3D::ArticulatedModel::Mesh::material

◆ name

String G3D::ArticulatedModel::Mesh::name

◆ primitive

PrimitiveType G3D::ArticulatedModel::Mesh::primitive

Referenced by triangleCount().

◆ sphereBounds

Sphere G3D::ArticulatedModel::Mesh::sphereBounds

Object Space.

◆ triTree

shared_ptr<TriTree> G3D::ArticulatedModel::Mesh::triTree

May be nullptr.

Used for intersect()

◆ twoSided

bool G3D::ArticulatedModel::Mesh::twoSided = false

◆ uniqueID

int G3D::ArticulatedModel::Mesh::uniqueID = 0

documentation generated on Wed Nov 24 2021 08:01:53 using doxygen 1.8.15