Public Member Functions | |
TMesh () | |
virtual | ~TMesh () |
void | BuildMesh (const FacetMesh *facetMesh) |
void | BuildMesh (const TFaceSet *faceSet) |
void | CreateFacetMesh (FacetMesh **outMesh, boolean needsUV, boolean needsFacetColors, boolean needsVertexColors) |
void | TriangulateMesh () |
void | GenerateNormals () |
void | HarmonizePolygonsUVs () |
void | HarmonizeQuadsUVs () |
virtual void | AllocateVertices (uint32 vertexCount, boolean allocateEdges, boolean allocatePolygons, boolean allocateUVs, boolean allocateNormals) |
void | AllocateVertexColors () |
virtual void | CopyVertices (const TMesh &fromMesh) |
void | AllocateBarycentricCoordinates (boolean allocate) |
Adds barycentric coordinates for each vertex. | |
boolean | HasBarycentricCoordinates () const |
void | AllocateEdges (int32 edgeCount) |
virtual void | AllocatePolygons (int32 polygonCount) |
void | AddPolygon (const TMCArray< TVertexUV > &vertices, const TMCArray< boolean > &edgeCrease, const int32 shadingDomainID, const boolean hidden) |
void | AddPolygon (const TMCArray< TVertexUV > &vertices, const int32 shadingDomainID, const boolean hidden) |
void | AddPolygon (const TMCArray< TVertexUV > &vertices, const TMCArray< int32 > &edges, const int32 shadingDomainID, const boolean hidden) |
void | AddQuad (const TMCArray< TVertexUV > &verticesUV, const TMCArray< boolean > &edgeCrease, const int32 shadingDomainID, const boolean hidden) |
int32 | AddEdgeLowLevel (TIndex2 &vertices, const boolean creased) |
int32 | AddEdge (const int32 vertexIndex0, const int32 vertexIndex1, boolean creased) |
void | RemovePolygon (const int32 polygonIndex) |
void | RemoveEdge (const int32 edgeIndex) |
void | CreaseEdges (const real smoothingAngle) |
void | InvalidateNormals () |
void | SwapPolygonArray () |
void | SetEdgeCount (int32 edgeCount) |
int32 | GetPolygonCount () const |
TPolygon & | GetPolygon (uint32 polygonIndex) |
TMCClassArray< TPolygon > & | GetPolygons () |
const TPolygon & | GetPolygon (uint32 polygonIndex) const |
int32 | GetQuadCount () const |
TQuad & | GetQuad (uint32 quadIndex) |
TMCClassArray< TQuad > & | GetQuads () |
const TQuad & | GetQuad (uint32 quadIndex) const |
int32 | GetEdgeCount () const |
const TEdge & | GetEdge (uint32 edgeIndex) const |
TEdge & | GetEdge (uint32 edgeIndex) |
int32 | GetVertexCount () const |
TVertex | GetVertex (uint32 vertexIndex) |
TConstVertex | GetVertex (uint32 vertexIndex) const |
void | SetWrapping (boolean wrapU, boolean wrapV) |
void | SetVertex (int32 index, const TVector3 &position, const TMCClassArray< TVector2 > &uv, int32 edgeCount) |
TVertexArray & | GetVertices () |
const TVertexArray & | GetVertices () const |
TMCClassArray< TEdge > & | GetEdges () |
const TMCClassArray< TEdge > & | GetEdges () const |
TMCArray< boolean > & | GetWrapping () |
Protected Member Functions | |
int32 | AddPolygonLowLevel (const TMCArray< TVertexUV > &vertices, const int32 shadingDomainID, const boolean hidden) |
virtual void | AddOnePolygon () |
Protected Attributes | |
TVertexArray | fVertices |
TMCClassArray< TEdge > | fEdges |
TMCClassArray< TPolygon > | fPolygons |
TMCClassArray< TQuad > | fQuads |
TMCArray< int32 > | fDeletedEdges |
TMCArray< int32 > | fDeletedPolygons |
TMCArray< boolean > | fWrapping |
boolean | fNormalsValid |
MeshDataStructure::TMesh::TMesh | ( | ) |
virtual MeshDataStructure::TMesh::~TMesh | ( | ) | [virtual] |
int32 MeshDataStructure::TMesh::AddEdge | ( | const int32 | vertexIndex0, | |
const int32 | vertexIndex1, | |||
boolean | creased | |||
) |
virtual void MeshDataStructure::TMesh::AddOnePolygon | ( | ) | [protected, virtual] |
void MeshDataStructure::TMesh::AddPolygon | ( | const TMCArray< TVertexUV > & | vertices, | |
const TMCArray< int32 > & | edges, | |||
const int32 | shadingDomainID, | |||
const boolean | hidden | |||
) |
void MeshDataStructure::TMesh::AddPolygon | ( | const TMCArray< TVertexUV > & | vertices, | |
const int32 | shadingDomainID, | |||
const boolean | hidden | |||
) |
void MeshDataStructure::TMesh::AddPolygon | ( | const TMCArray< TVertexUV > & | vertices, | |
const TMCArray< boolean > & | edgeCrease, | |||
const int32 | shadingDomainID, | |||
const boolean | hidden | |||
) |
int32 MeshDataStructure::TMesh::AddPolygonLowLevel | ( | const TMCArray< TVertexUV > & | vertices, | |
const int32 | shadingDomainID, | |||
const boolean | hidden | |||
) | [protected] |
void MeshDataStructure::TMesh::AddQuad | ( | const TMCArray< TVertexUV > & | verticesUV, | |
const TMCArray< boolean > & | edgeCrease, | |||
const int32 | shadingDomainID, | |||
const boolean | hidden | |||
) |
void MeshDataStructure::TMesh::AllocateBarycentricCoordinates | ( | boolean | allocate | ) |
Adds barycentric coordinates for each vertex.
void MeshDataStructure::TMesh::AllocateEdges | ( | int32 | edgeCount | ) |
virtual void MeshDataStructure::TMesh::AllocatePolygons | ( | int32 | polygonCount | ) | [virtual] |
void MeshDataStructure::TMesh::AllocateVertexColors | ( | ) |
virtual void MeshDataStructure::TMesh::AllocateVertices | ( | uint32 | vertexCount, | |
boolean | allocateEdges, | |||
boolean | allocatePolygons, | |||
boolean | allocateUVs, | |||
boolean | allocateNormals | |||
) | [virtual] |
void MeshDataStructure::TMesh::BuildMesh | ( | const TFaceSet * | faceSet | ) |
Create a mesh object from a face set.
faceSet | The face set |
void MeshDataStructure::TMesh::BuildMesh | ( | const FacetMesh * | facetMesh | ) |
Create a mesh object from a facet mesh. Note that edges are not built
facetMesh | The facet mesh |
virtual void MeshDataStructure::TMesh::CopyVertices | ( | const TMesh & | fromMesh | ) | [virtual] |
Copy all the vertices of a mesh into the current mesh
fromMesh | The mesh whose vertices are copied |
void MeshDataStructure::TMesh::CreaseEdges | ( | const real | smoothingAngle | ) |
void MeshDataStructure::TMesh::CreateFacetMesh | ( | FacetMesh ** | outMesh, | |
boolean | needsUV, | |||
boolean | needsFacetColors, | |||
boolean | needsVertexColors | |||
) |
Creates a new facet mesh that corresponds to this mesh
outMesh | The facet mesh that is created | |
needsUV | true if the UV in the facet mesh need to be filled | |
needsFacetColors | true if the face colors are used | |
needsVertexColors | true if the vertex colors are used (only if it is available) |
void MeshDataStructure::TMesh::GenerateNormals | ( | ) |
Calculates the normal of the mesh
int32 MeshDataStructure::TMesh::GetEdgeCount | ( | ) | const [inline] |
const TMCClassArray<TEdge>& MeshDataStructure::TMesh::GetEdges | ( | ) | const [inline] |
TMCClassArray<TEdge>& MeshDataStructure::TMesh::GetEdges | ( | ) | [inline] |
int32 MeshDataStructure::TMesh::GetPolygonCount | ( | ) | const [inline] |
TMCClassArray<TPolygon>& MeshDataStructure::TMesh::GetPolygons | ( | ) | [inline] |
int32 MeshDataStructure::TMesh::GetQuadCount | ( | ) | const [inline] |
TMCClassArray<TQuad>& MeshDataStructure::TMesh::GetQuads | ( | ) | [inline] |
TConstVertex MeshDataStructure::TMesh::GetVertex | ( | uint32 | vertexIndex | ) | const [inline] |
int32 MeshDataStructure::TMesh::GetVertexCount | ( | ) | const [inline] |
const TVertexArray& MeshDataStructure::TMesh::GetVertices | ( | ) | const [inline] |
TVertexArray& MeshDataStructure::TMesh::GetVertices | ( | ) | [inline] |
void MeshDataStructure::TMesh::HarmonizePolygonsUVs | ( | ) |
Make sure that the uv are coherent on all the polygons of the mesh
void MeshDataStructure::TMesh::HarmonizeQuadsUVs | ( | ) |
boolean MeshDataStructure::TMesh::HasBarycentricCoordinates | ( | ) | const [inline] |
void MeshDataStructure::TMesh::InvalidateNormals | ( | ) |
void MeshDataStructure::TMesh::RemoveEdge | ( | const int32 | edgeIndex | ) |
void MeshDataStructure::TMesh::RemovePolygon | ( | const int32 | polygonIndex | ) |
void MeshDataStructure::TMesh::SetEdgeCount | ( | int32 | edgeCount | ) | [inline] |
void MeshDataStructure::TMesh::SetVertex | ( | int32 | index, | |
const TVector3 & | position, | |||
const TMCClassArray< TVector2 > & | uv, | |||
int32 | edgeCount | |||
) |
void MeshDataStructure::TMesh::SwapPolygonArray | ( | ) |
void MeshDataStructure::TMesh::TriangulateMesh | ( | ) |
Triangulates a mesh. Only implemented for quads right now.
TMCArray<int32> MeshDataStructure::TMesh::fDeletedEdges [protected] |
TMCArray<int32> MeshDataStructure::TMesh::fDeletedPolygons [protected] |
TMCClassArray<TEdge> MeshDataStructure::TMesh::fEdges [protected] |
boolean MeshDataStructure::TMesh::fNormalsValid [protected] |
TMCClassArray<TPolygon> MeshDataStructure::TMesh::fPolygons [protected] |
TMCClassArray<TQuad> MeshDataStructure::TMesh::fQuads [protected] |
TVertexArray MeshDataStructure::TMesh::fVertices [protected] |
TMCArray<boolean> MeshDataStructure::TMesh::fWrapping [protected] |