A face in a half edge mesh. More...
#include <HalfEdgeFace.hpp>
Public Member Functions | |
HalfEdgeFace () | |
Constructs an empty face. | |
HalfEdgeFace (const HalfEdgeFace< VertexT, NormalT > &o) | |
Copy constructor. | |
void | calc_normal () |
Calculates a face normal. | |
void | interpolate_normal () |
Calculates an interpolated normal (mean of three face normals). | |
void | getVertexNormals (vector< NormalT > &n) |
Delivers the three vertex normals of the face. | |
void | getVertices (vector< VertexT > &v) |
Delivers the three vertices of the face. | |
void | getAdjacentFaces (vector< HalfEdgeFace< VertexT, NormalT > * > &adj) |
Returns the adjacent face of this face. | |
NormalT | getFaceNormal () |
Returns the face normal. | |
NormalT | getInterpolatedNormal () |
Returns an interpolated normal (mean of the three vertex normals). | |
VertexT | getCentroid () |
Returns the centroid of the face. | |
float | getArea () |
Returns the size of the face. | |
Public Attributes | |
HalfEdge< HalfEdgeVertex < VertexT, NormalT > , HalfEdgeFace< VertexT, NormalT > > * | m_edge |
A pointer to a surrounding half edge. | |
bool | m_used |
Used for clustering. True, if the face was already visited. | |
vector< int > | m_indices |
A vector containing the indices of face vertices (currently redundant). | |
int | m_index [3] |
A three pointers to the face vertices. | |
int | m_texture_index |
The index of the face's texture. | |
size_t | m_face_index |
The number of the face in the half edge mesh (convenience only, will be removed soon). | |
NormalT | m_normal |
The face normal. |
A face in a half edge mesh.
Besides the classical linking, this class stores some additional information that becomes handy when implementin optimization algorithms
Definition at line 30 of file HalfEdgeFace.hpp.
lssr::HalfEdgeFace< VertexT, NormalT >::HalfEdgeFace | ( | ) | [inline] |
Constructs an empty face.
Definition at line 37 of file HalfEdgeFace.hpp.
lssr::HalfEdgeFace< VertexT, NormalT >::HalfEdgeFace | ( | const HalfEdgeFace< VertexT, NormalT > & | o | ) |
Copy constructor.
o | The mesh to copy |
void lssr::HalfEdgeFace< VertexT, NormalT >::calc_normal | ( | ) |
Calculates a face normal.
void lssr::HalfEdgeFace< VertexT, NormalT >::getAdjacentFaces | ( | vector< HalfEdgeFace< VertexT, NormalT > * > & | adj | ) |
Returns the adjacent face of this face.
adj | A vector to store the adjacent vertices |
float lssr::HalfEdgeFace< VertexT, NormalT >::getArea | ( | ) |
Returns the size of the face.
VertexT lssr::HalfEdgeFace< VertexT, NormalT >::getCentroid | ( | ) |
Returns the centroid of the face.
NormalT lssr::HalfEdgeFace< VertexT, NormalT >::getFaceNormal | ( | ) |
Returns the face normal.
NormalT lssr::HalfEdgeFace< VertexT, NormalT >::getInterpolatedNormal | ( | ) |
Returns an interpolated normal (mean of the three vertex normals).
void lssr::HalfEdgeFace< VertexT, NormalT >::getVertexNormals | ( | vector< NormalT > & | n | ) |
Delivers the three vertex normals of the face.
n | A vector to store the vertex normals |
void lssr::HalfEdgeFace< VertexT, NormalT >::getVertices | ( | vector< VertexT > & | v | ) |
Delivers the three vertices of the face.
v | A vector to store the vertices |
void lssr::HalfEdgeFace< VertexT, NormalT >::interpolate_normal | ( | ) |
Calculates an interpolated normal (mean of three face normals).
HalfEdge<HalfEdgeVertex<VertexT, NormalT>, HalfEdgeFace<VertexT, NormalT> >* lssr::HalfEdgeFace< VertexT, NormalT >::m_edge |
A pointer to a surrounding half edge.
Definition at line 97 of file HalfEdgeFace.hpp.
size_t lssr::HalfEdgeFace< VertexT, NormalT >::m_face_index |
The number of the face in the half edge mesh (convenience only, will be removed soon).
Definition at line 112 of file HalfEdgeFace.hpp.
int lssr::HalfEdgeFace< VertexT, NormalT >::m_index[3] |
A three pointers to the face vertices.
Definition at line 106 of file HalfEdgeFace.hpp.
vector<int> lssr::HalfEdgeFace< VertexT, NormalT >::m_indices |
A vector containing the indices of face vertices (currently redundant).
Definition at line 103 of file HalfEdgeFace.hpp.
NormalT lssr::HalfEdgeFace< VertexT, NormalT >::m_normal |
The face normal.
Definition at line 115 of file HalfEdgeFace.hpp.
int lssr::HalfEdgeFace< VertexT, NormalT >::m_texture_index |
The index of the face's texture.
Definition at line 109 of file HalfEdgeFace.hpp.
bool lssr::HalfEdgeFace< VertexT, NormalT >::m_used |
Used for clustering. True, if the face was already visited.
Definition at line 100 of file HalfEdgeFace.hpp.