Support Forum G3D Web Page |
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... | |
Geometry * | geometry |
The geometry used by this Mesh. More... | |
shared_ptr< UniversalSurface::GPUGeom > | gpuGeom |
Written by copyToGPU. More... | |
IndexStream | gpuIndexArray |
If you modify cpuIndexArray, invoke clearIndexStream() to force gpuIndexArray to update on the next ArticulatedMode::pose() More... | |
Part * | 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. More... | |
shared_ptr< UniversalMaterial > | material |
String | name |
PrimitiveType | primitive |
Sphere | sphereBounds |
Object Space. More... | |
shared_ptr< TriTree > | triTree |
May be nullptr. More... | |
bool | twoSided = false |
int | uniqueID = 0 |
Friends | |
class | ArticulatedModel |
A set of primitives (e.g., triangles) that share a material.
|
inline |
void G3D::ArticulatedModel::Mesh::clearIndexStream | ( | ) |
If you modify cpuIndexArray, invoke this method to force the GPU arrays to update on the next ArticulatedMode::pose()
|
inline |
|
inline |
|
friend |
AABox G3D::ArticulatedModel::Mesh::boxBounds |
Object Space.
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().
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* G3D::ArticulatedModel::Mesh::geometry |
The geometry used by this Mesh.
nullptr if no geometry specified. Multiple meshes may share geometry.
Referenced by hasBones().
shared_ptr<UniversalSurface::GPUGeom> G3D::ArticulatedModel::Mesh::gpuGeom |
Written by copyToGPU.
Multiple meshes may share geometry.
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
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.
shared_ptr<UniversalMaterial> G3D::ArticulatedModel::Mesh::material |
String G3D::ArticulatedModel::Mesh::name |
PrimitiveType G3D::ArticulatedModel::Mesh::primitive |
Referenced by triangleCount().
Sphere G3D::ArticulatedModel::Mesh::sphereBounds |
Object Space.
shared_ptr<TriTree> G3D::ArticulatedModel::Mesh::triTree |
May be nullptr.
Used for intersect()
bool G3D::ArticulatedModel::Mesh::twoSided = false |
int G3D::ArticulatedModel::Mesh::uniqueID = 0 |