#include <Face.hpp>
Public Member Functions | |
bool | operator== (Face< DIM > &rOtherFace) |
bool | operator!= (Face< DIM > &rOtherFace) |
Face< DIM > | operator- () |
double | GetPerimeter () const |
double | GetArea () const |
unsigned | GetNumVertices () const |
std::vector< c_vector< double, DIM > * > | GetVertices () const |
void | OrderVerticesAntiClockwise () |
void | AddVertex (c_vector< double, DIM > *pVertex) |
unsigned | GetNumVertices () |
c_vector< double, DIM > & | rGetVertex (unsigned index) |
std::vector< c_vector< double, DIM > * > & | rGetVertices () |
void | SetVertex (unsigned index, c_vector< double, DIM > *pNewLocation) |
Private Member Functions | |
void | Increment (typename std::vector< c_vector< double, DIM > * >::iterator &rIterator, Face< DIM > &rFace) const |
Private Attributes | |
std::vector< c_vector< double, DIM > * > | mVertices |
Definition at line 43 of file Face.hpp.
void Face< DIM >::Increment | ( | typename std::vector< c_vector< double, DIM > * >::iterator & | rIterator, | |
Face< DIM > & | rFace | |||
) | const [inline, private] |
Increment the Face vertex iterator.
Definition at line 36 of file Face.cpp.
References Face< DIM >::mVertices.
Referenced by Face< DIM >::operator==().
Compare two faces for equality. Two faces are the same if their vertices differ only by cyclic permutation.
rOtherFace | the Face to compare to |
Definition at line 47 of file Face.cpp.
References Face< DIM >::Increment(), and Face< DIM >::mVertices.
Return a new face in which the order of the vertices is reversed.
Definition at line 95 of file Face.cpp.
References Face< DIM >::mVertices.
double Face< DIM >::GetPerimeter | ( | ) | const [inline] |
Get the sum of the length of all edges of the Face.
NOTE: Don't use this if you are using a periodic mesh. Use GetFacePerimeter(face_index) to take into account periodicity.
Definition at line 108 of file Face.cpp.
References Face< DIM >::mVertices.
double Face< DIM >::GetArea | ( | ) | const [inline] |
Get the area of the Face (works in 2D only).
NOTE: Don't use this if you are using a periodic mesh. Use GetFaceArea(face_index) to takeinto account periodicity.
Definition at line 119 of file Face.cpp.
References Face< DIM >::mVertices.
unsigned Face< DIM >::GetNumVertices | ( | ) | const [inline] |
Return number of vertices of the Face.
Definition at line 137 of file Face.cpp.
References Face< DIM >::mVertices.
Referenced by VoronoiTessellation< DIM >::GetFaceArea(), VoronoiTessellation< DIM >::GetFacePerimeter(), InventorVoronoiWriter::ScaleAndWrite(), and InventorVoronoiWriter::Write().
std::vector< c_vector< double, DIM > * > Face< DIM >::GetVertices | ( | ) | const [inline] |
Return a vector of vertices owned by the Face.
Definition at line 143 of file Face.cpp.
References Face< DIM >::mVertices.
void Face< DIM >::OrderVerticesAntiClockwise | ( | ) | [inline] |
Reorder the vertices of the Face anticlockwise.
Definition at line 149 of file Face.cpp.
References VertexAndAngle< DIM >::ComputeAndSetAngle(), Face< DIM >::mVertices, and VertexAndAngle< DIM >::SetVertex().
void Face< DIM >::AddVertex | ( | c_vector< double, DIM > * | pVertex | ) | [inline] |
Add a vertex to the Face.
pVertex | the location of the new vertex |
Definition at line 185 of file Face.cpp.
References Face< DIM >::mVertices.
unsigned Face< DIM >::GetNumVertices | ( | ) | [inline] |
Definition at line 191 of file Face.cpp.
References Face< DIM >::mVertices.
c_vector< double, DIM > & Face< DIM >::rGetVertex | ( | unsigned | index | ) | [inline] |
Get the Vertex with a given index.
index | the index of the Vertex in the Face |
Definition at line 197 of file Face.cpp.
References Face< DIM >::mVertices.
Referenced by VoronoiTessellation< DIM >::GetFaceArea(), VoronoiTessellation< DIM >::GetFacePerimeter(), InventorVoronoiWriter::ScaleAndWrite(), and InventorVoronoiWriter::Write().
std::vector< c_vector< double, DIM > * > & Face< DIM >::rGetVertices | ( | ) | [inline] |
Get the vertices in the Face.
Definition at line 203 of file Face.cpp.
References Face< DIM >::mVertices.
void Face< DIM >::SetVertex | ( | unsigned | index, | |
c_vector< double, DIM > * | pNewLocation | |||
) | [inline] |
Reset the location of the Vertex with a given index.
index | the index of the Vertex in the Face | |
pNewLocation | the new location of the Vertex |
Definition at line 209 of file Face.cpp.
References Face< DIM >::mVertices.
The vertices of the face, in anticlockwise order. Each vertex must be distinct.
This member variable is public as it is accessed directly by VoronoiTessellation methods.
Definition at line 54 of file Face.hpp.
Referenced by Face< DIM >::AddVertex(), Face< DIM >::GetArea(), Face< DIM >::GetNumVertices(), Face< DIM >::GetPerimeter(), Face< DIM >::GetVertices(), Face< DIM >::Increment(), Face< DIM >::operator-(), Face< DIM >::operator==(), Face< DIM >::OrderVerticesAntiClockwise(), Face< DIM >::rGetVertex(), Face< DIM >::rGetVertices(), and Face< DIM >::SetVertex().