Public Member Functions | Public Attributes

lssr::HalfEdgeFace< VertexT, NormalT > Class Template Reference

A face in a half edge mesh. More...

#include <HalfEdgeFace.hpp>

Collaboration diagram for lssr::HalfEdgeFace< VertexT, NormalT >:
Collaboration graph
[legend]

List of all members.

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.

Detailed Description

template<typename VertexT, typename NormalT>
class lssr::HalfEdgeFace< VertexT, NormalT >

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.


Constructor & Destructor Documentation

template<typename VertexT , typename NormalT >
lssr::HalfEdgeFace< VertexT, NormalT >::HalfEdgeFace (  )  [inline]

Constructs an empty face.

Definition at line 37 of file HalfEdgeFace.hpp.

template<typename VertexT , typename NormalT >
lssr::HalfEdgeFace< VertexT, NormalT >::HalfEdgeFace ( const HalfEdgeFace< VertexT, NormalT > &  o  ) 

Copy constructor.

Parameters:
o The mesh to copy

Member Function Documentation

template<typename VertexT , typename NormalT >
void lssr::HalfEdgeFace< VertexT, NormalT >::calc_normal (  ) 

Calculates a face normal.

template<typename VertexT , typename NormalT >
void lssr::HalfEdgeFace< VertexT, NormalT >::getAdjacentFaces ( vector< HalfEdgeFace< VertexT, NormalT > * > &  adj  ) 

Returns the adjacent face of this face.

Parameters:
adj A vector to store the adjacent vertices
template<typename VertexT , typename NormalT >
float lssr::HalfEdgeFace< VertexT, NormalT >::getArea (  ) 

Returns the size of the face.

template<typename VertexT , typename NormalT >
VertexT lssr::HalfEdgeFace< VertexT, NormalT >::getCentroid (  ) 

Returns the centroid of the face.

template<typename VertexT , typename NormalT >
NormalT lssr::HalfEdgeFace< VertexT, NormalT >::getFaceNormal (  ) 

Returns the face normal.

template<typename VertexT , typename NormalT >
NormalT lssr::HalfEdgeFace< VertexT, NormalT >::getInterpolatedNormal (  ) 

Returns an interpolated normal (mean of the three vertex normals).

template<typename VertexT , typename NormalT >
void lssr::HalfEdgeFace< VertexT, NormalT >::getVertexNormals ( vector< NormalT > &  n  ) 

Delivers the three vertex normals of the face.

Parameters:
n A vector to store the vertex normals
template<typename VertexT , typename NormalT >
void lssr::HalfEdgeFace< VertexT, NormalT >::getVertices ( vector< VertexT > &  v  ) 

Delivers the three vertices of the face.

Parameters:
v A vector to store the vertices
template<typename VertexT , typename NormalT >
void lssr::HalfEdgeFace< VertexT, NormalT >::interpolate_normal (  ) 

Calculates an interpolated normal (mean of three face normals).


Member Data Documentation

template<typename VertexT , typename NormalT >
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.

template<typename VertexT , typename NormalT >
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.

template<typename VertexT , typename NormalT >
int lssr::HalfEdgeFace< VertexT, NormalT >::m_index[3]

A three pointers to the face vertices.

Definition at line 106 of file HalfEdgeFace.hpp.

template<typename VertexT , typename NormalT >
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.

template<typename VertexT , typename NormalT >
NormalT lssr::HalfEdgeFace< VertexT, NormalT >::m_normal

The face normal.

Definition at line 115 of file HalfEdgeFace.hpp.

template<typename VertexT , typename NormalT >
int lssr::HalfEdgeFace< VertexT, NormalT >::m_texture_index

The index of the face's texture.

Definition at line 109 of file HalfEdgeFace.hpp.

template<typename VertexT , typename NormalT >
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.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Defines