Class IndexedFaceMesh

Nested Relationships

Class Documentation

class IndexedFaceMesh

Public Types

typedef std::vector<unsigned int> Faces
typedef std::vector<Vector3r> FaceNormals
typedef std::vector<Vector3r> VertexNormals
typedef std::vector<std::vector<unsigned int>> FacesEdges
typedef std::vector<Edge> Edges
typedef std::vector<std::vector<unsigned int>> VerticesEdges
typedef std::vector<std::vector<unsigned int>> VerticesFaces
typedef std::vector<unsigned int> UVIndices
typedef std::vector<Vector2r> UVs

Public Functions

IndexedFaceMesh()
IndexedFaceMesh(IndexedFaceMesh const &other)
IndexedFaceMesh &operator=(IndexedFaceMesh const &other)
~IndexedFaceMesh()
void release()
bool isClosed() const
inline bool getFlatShading() const
inline void setFlatShading(const bool v)
void initMesh(const unsigned int nPoints, const unsigned int nEdges, const unsigned int nFaces)
void addFace(const unsigned int *const indices)

Add a new face. Indices must be an array of size m_verticesPerFace.

void addFace(const int *const indices)

Add a new face. Indices must be an array of size m_verticesPerFace.

void addUV(const Real u, const Real v)
void addUVIndex(const unsigned int index)
inline const Faces &getFaces() const
inline Faces &getFaces()
inline const FaceNormals &getFaceNormals() const
inline FaceNormals &getFaceNormals()
inline const VertexNormals &getVertexNormals() const
inline VertexNormals &getVertexNormals()
inline Edges &getEdges()
inline const Edges &getEdges() const
inline const FacesEdges &getFacesEdges() const
inline const UVIndices &getUVIndices() const
inline const UVs &getUVs() const
inline const VerticesFaces &getVertexFaces() const
inline const VerticesEdges &getVertexEdges() const
inline unsigned int numVertices() const
inline unsigned int numFaces() const
inline unsigned int numEdges() const
inline unsigned int numUVs() const
void copyUVs(const UVIndices &uvIndices, const UVs &uvs)
void buildNeighbors()
template<class PositionData>
void updateNormals(const PositionData &pd, const unsigned int offset)
template<class PositionData>
void updateVertexNormals(const PositionData &pd)
unsigned int getVerticesPerFace() const

Protected Attributes

unsigned int m_numPoints
Faces m_indices
Edges m_edges
FacesEdges m_facesEdges
bool m_closed
UVIndices m_uvIndices
UVs m_uvs
VerticesFaces m_verticesFaces
VerticesEdges m_verticesEdges
const unsigned int m_verticesPerFace = 3u
FaceNormals m_normals
VertexNormals m_vertexNormals
bool m_flatShading
struct Edge

Public Members

std::array<unsigned int, 2> m_face
std::array<unsigned int, 2> m_vert