Assimp  v3.1.1 (June 2014)
Assimp::VertexTriangleAdjacency Class Reference

The VertexTriangleAdjacency class computes a vertex-triangle adjacency map from a given index buffer. More...

Public Member Functions

unsigned int * GetAdjacentTriangles (unsigned int iVertIndex) const
 Get all triangles adjacent to a vertex. More...
 
unsigned int & GetNumTrianglesPtr (unsigned int iVertIndex)
 Get the number of triangles that are referenced by a vertex. More...
 
 VertexTriangleAdjacency (aiFace *pcFaces, unsigned int iNumFaces, unsigned int iNumVertices=0, bool bComputeNumTriangles=true)
 Construction from an existing index buffer. More...
 
 ~VertexTriangleAdjacency ()
 Destructor. More...
 

Public Attributes

unsigned int iNumVertices
 Debug: Number of referenced vertices. More...
 
unsigned int * mAdjacencyTable
 Adjacency table. More...
 
unsigned int * mLiveTriangles
 Table containing the number of referenced triangles per vertex. More...
 
unsigned int * mOffsetTable
 Offset table. More...
 

Detailed Description

The VertexTriangleAdjacency class computes a vertex-triangle adjacency map from a given index buffer.

Note
Although it is called VertexTriangleAdjacency, the current version does also support arbitrary polygons.

Constructor & Destructor Documentation

◆ VertexTriangleAdjacency()

VertexTriangleAdjacency::VertexTriangleAdjacency ( aiFace pcFaces,
unsigned int  iNumFaces,
unsigned int  iNumVertices = 0,
bool  bComputeNumTriangles = true 
)

Construction from an existing index buffer.

Parameters
pcFacesIndex buffer
iNumFacesNumber of faces in the buffer
iNumVerticesNumber of referenced vertices. This value is computed automatically if 0 is specified.
bComputeNumTrianglesIf you want the class to compute a list containing the number of referenced triangles per vertex per vertex - pass true.

◆ ~VertexTriangleAdjacency()

VertexTriangleAdjacency::~VertexTriangleAdjacency ( )

Destructor.

Member Function Documentation

◆ GetAdjacentTriangles()

unsigned int* Assimp::VertexTriangleAdjacency::GetAdjacentTriangles ( unsigned int  iVertIndex) const
inline

Get all triangles adjacent to a vertex.

Parameters
iVertIndexIndex of the vertex
Returns
A pointer to the adjacency list.

◆ GetNumTrianglesPtr()

unsigned int& Assimp::VertexTriangleAdjacency::GetNumTrianglesPtr ( unsigned int  iVertIndex)
inline

Get the number of triangles that are referenced by a vertex.

This function returns a reference that can be modified

Parameters
iVertIndexIndex of the vertex
Returns
Number of referenced triangles

Member Data Documentation

◆ iNumVertices

unsigned int Assimp::VertexTriangleAdjacency::iNumVertices

Debug: Number of referenced vertices.

◆ mAdjacencyTable

unsigned int* Assimp::VertexTriangleAdjacency::mAdjacencyTable

Adjacency table.

◆ mLiveTriangles

unsigned int* Assimp::VertexTriangleAdjacency::mLiveTriangles

Table containing the number of referenced triangles per vertex.

◆ mOffsetTable

unsigned int* Assimp::VertexTriangleAdjacency::mOffsetTable

Offset table.


The documentation for this class was generated from the following files: