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

Vertex information without an index array connecting them into triangles. More...

Classes

class  Face
 Used by cleanGeometry. More...
 

Public Member Functions

void buildFaceArray (Array< Face > &faceArray, Face::AdjacentFaceTable &adjacentFaceTable, const Array< Mesh *> &meshes)
 
void cleanGeometry (const CleanGeometrySettings &settings, const Array< Mesh *> &meshes)
 
Cleans the geometric data in response to changes, or after load. More...
 
void clearAttributeArrays ()
 If you modify cpuVertexArray, invoke this method to force the GPU arrays to update on the next ArticulatedMode::pose() More...
 
void computeBounds (const Array< Mesh *> &affectedMeshes)
 
void computeMissingTangents (const Array< Mesh *> affectedMeshes)
 
void computeMissingVertexNormals (Array< Face > &faceArray, const Face::AdjacentFaceTable &adjacentFaceTable, const float maximumSmoothAngle)
 
void determineCleaningNeeds (bool &computeSomeNormals, bool &computeSomeTangents)
 
void getAffectedMeshes (const Array< Mesh *> &fullMeshArray, Array< Mesh *> &affectedMeshes)
 
bool hasBones () const
 
void mergeVertices (const Array< Face > &faceArray, float maxNormalWeldAngle, const Array< Mesh *> affectedMeshes)
 
void subdivideUntilThresholdEdgeLength (const Array< Mesh *> &affectedMeshes, const float edgeLengthThreshold=0.1f, const float positionEpsilon=0.001f, const float normalAngleEpsilon=0.01f, const float texCoordEpsilon=0.01f)
 Subdivides all triangles using an ad-hoc algorithm to be described until each edge of every triangle is less than edgeLengthThreshold. More...
 

Public Attributes

AABox boxBounds
 
CPUVertexArray cpuVertexArray
 The CPU-side geometry. More...
 
AttributeArray gpuBoneIndicesArray
 
AttributeArray gpuBoneWeightsArray
 
AttributeArray gpuNormalArray
 
AttributeArray gpuPositionArray
 
AttributeArray gpuTangentArray
 
AttributeArray gpuTexCoord0Array
 
AttributeArray gpuTexCoord1Array
 
AttributeArray gpuVertexColorArray
 
String name
 
Sphere sphereBounds
 

Friends

class ArticulatedModel
 

Detailed Description

Vertex information without an index array connecting them into triangles.

See also
Mesh

Member Function Documentation

◆ buildFaceArray()

void G3D::ArticulatedModel::Geometry::buildFaceArray ( Array< Face > &  faceArray,
Face::AdjacentFaceTable adjacentFaceTable,
const Array< Mesh *> &  meshes 
)

◆ cleanGeometry()

void G3D::ArticulatedModel::Geometry::cleanGeometry ( const CleanGeometrySettings settings,
const Array< Mesh *> &  meshes 
)


Cleans the geometric data in response to changes, or after load.

  • Wipes out the GPU vertex attribute data.
  • Computes a vertex normal for every element whose normal.x is fnan() (or if the normal array is empty).
  • If there are texture coordinates, computes a tangent for every element whose tangent.x is fnan() (or if the tangent array is empty).
  • Merges all vertices with identical indices.
  • Updates all Mesh indices accordingly.
  • Recomputes the bounding sphere and box.

Does not upload to the GPU.

Note that this invokes clearVertexRanges() and computeBounds().

◆ clearAttributeArrays()

void G3D::ArticulatedModel::Geometry::clearAttributeArrays ( )

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

◆ computeBounds()

void G3D::ArticulatedModel::Geometry::computeBounds ( const Array< Mesh *> &  affectedMeshes)

◆ computeMissingTangents()

void G3D::ArticulatedModel::Geometry::computeMissingTangents ( const Array< Mesh *>  affectedMeshes)

◆ computeMissingVertexNormals()

void G3D::ArticulatedModel::Geometry::computeMissingVertexNormals ( Array< Face > &  faceArray,
const Face::AdjacentFaceTable adjacentFaceTable,
const float  maximumSmoothAngle 
)

◆ determineCleaningNeeds()

void G3D::ArticulatedModel::Geometry::determineCleaningNeeds ( bool &  computeSomeNormals,
bool &  computeSomeTangents 
)

◆ getAffectedMeshes()

void G3D::ArticulatedModel::Geometry::getAffectedMeshes ( const Array< Mesh *> &  fullMeshArray,
Array< Mesh *> &  affectedMeshes 
)

◆ hasBones()

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

◆ mergeVertices()

void G3D::ArticulatedModel::Geometry::mergeVertices ( const Array< Face > &  faceArray,
float  maxNormalWeldAngle,
const Array< Mesh *>  affectedMeshes 
)

◆ subdivideUntilThresholdEdgeLength()

void G3D::ArticulatedModel::Geometry::subdivideUntilThresholdEdgeLength ( const Array< Mesh *> &  affectedMeshes,
const float  edgeLengthThreshold = 0.1f,
const float  positionEpsilon = 0.001f,
const float  normalAngleEpsilon = 0.01f,
const float  texCoordEpsilon = 0.01f 
)

Subdivides all triangles using an ad-hoc algorithm to be described until each edge of every triangle is less than edgeLengthThreshold.

Then merges vertices

Friends And Related Function Documentation

◆ ArticulatedModel

friend class ArticulatedModel
friend

Member Data Documentation

◆ boxBounds

AABox G3D::ArticulatedModel::Geometry::boxBounds

◆ cpuVertexArray

CPUVertexArray G3D::ArticulatedModel::Geometry::cpuVertexArray

The CPU-side geometry.

If you modify cpuVertexArray, invoke clearAttributeArrays() to force the GPU arrays to update on the next ArticulatedMode::pose()

Referenced by hasBones().

◆ gpuBoneIndicesArray

AttributeArray G3D::ArticulatedModel::Geometry::gpuBoneIndicesArray

◆ gpuBoneWeightsArray

AttributeArray G3D::ArticulatedModel::Geometry::gpuBoneWeightsArray

◆ gpuNormalArray

AttributeArray G3D::ArticulatedModel::Geometry::gpuNormalArray

◆ gpuPositionArray

AttributeArray G3D::ArticulatedModel::Geometry::gpuPositionArray

◆ gpuTangentArray

AttributeArray G3D::ArticulatedModel::Geometry::gpuTangentArray

◆ gpuTexCoord0Array

AttributeArray G3D::ArticulatedModel::Geometry::gpuTexCoord0Array

◆ gpuTexCoord1Array

AttributeArray G3D::ArticulatedModel::Geometry::gpuTexCoord1Array

◆ gpuVertexColorArray

AttributeArray G3D::ArticulatedModel::Geometry::gpuVertexColorArray

◆ name

String G3D::ArticulatedModel::Geometry::name

◆ sphereBounds

Sphere G3D::ArticulatedModel::Geometry::sphereBounds

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