Class TriangleMesh

Class Documentation

class SPH::TriangleMesh

Data structure for a triangle mesh with normals and vertex normals.

Public Types

typedef std::vector<unsigned int> Faces
typedef std::vector<Vector3r> Normals
typedef std::vector<Vector3r> Vertices

Public Functions

TriangleMesh()
~TriangleMesh()
void release()
void initMesh(const unsigned int nPoints, const unsigned int nFaces)
void addFace(const unsigned int *const indices)

Add a new face.

void addFace(const int *const indices)

Add a new face.

void addVertex(const Vector3r &vertex)

Add new vertex.

const Faces &getFaces() const
Faces &getFaces()
const Normals &getFaceNormals() const
Normals &getFaceNormals()
const Normals &getVertexNormals() const
Normals &getVertexNormals()
const Vertices &getVertices() const
Vertices &getVertices()
unsigned int numVertices() const
unsigned int numFaces() const
void updateNormals()
void updateVertexNormals()

Protected Attributes

Vertices m_x
Faces m_indices
Normals m_normals
Normals m_vertexNormals