Face< DIM > Class Template Reference

#include <Face.hpp>

Collaboration diagram for Face< DIM >:

Collaboration graph
[legend]

List of all members.

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


Detailed Description

template<unsigned DIM>
class Face< DIM >

A face class for use in the VoronoiTessellation class.

Definition at line 43 of file Face.hpp.


Member Function Documentation

template<unsigned DIM>
void Face< DIM >::Increment ( typename std::vector< c_vector< double, DIM > * >::iterator &  rIterator,
Face< DIM > &  rFace 
) const [inline, private]

Increment the Face vertex iterator.

Parameters:
rIterator the Face vertex iterator
rFace the Face

Definition at line 36 of file Face.cpp.

References Face< DIM >::mVertices.

Referenced by Face< DIM >::operator==().

template<unsigned DIM>
bool Face< DIM >::operator== ( Face< DIM > &  rOtherFace  )  [inline]

Compare two faces for equality. Two faces are the same if their vertices differ only by cyclic permutation.

Parameters:
rOtherFace the Face to compare to

Definition at line 47 of file Face.cpp.

References Face< DIM >::Increment(), and Face< DIM >::mVertices.

template<unsigned DIM>
bool Face< DIM >::operator!= ( Face< DIM > &  rOtherFace  )  [inline]

Compare two faces for inequality.

Parameters:
rOtherFace the Face to compare to

Definition at line 87 of file Face.cpp.

template<unsigned DIM>
Face< DIM > Face< DIM >::operator- (  )  [inline]

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.

template<unsigned DIM>
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.

template<unsigned DIM>
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.

template<unsigned DIM>
unsigned Face< DIM >::GetNumVertices (  )  const [inline]

template<unsigned DIM>
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.

template<unsigned DIM>
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().

template<unsigned DIM>
void Face< DIM >::AddVertex ( c_vector< double, DIM > *  pVertex  )  [inline]

Add a vertex to the Face.

Parameters:
pVertex the location of the new vertex

Definition at line 185 of file Face.cpp.

References Face< DIM >::mVertices.

template<unsigned DIM>
unsigned Face< DIM >::GetNumVertices (  )  [inline]

Returns:
the number of vertices in the Face.

Definition at line 191 of file Face.cpp.

References Face< DIM >::mVertices.

template<unsigned DIM>
c_vector< double, DIM > & Face< DIM >::rGetVertex ( unsigned  index  )  [inline]

Get the Vertex with a given index.

Parameters:
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().

template<unsigned DIM>
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.

template<unsigned DIM>
void Face< DIM >::SetVertex ( unsigned  index,
c_vector< double, DIM > *  pNewLocation 
) [inline]

Reset the location of the Vertex with a given index.

Parameters:
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.


Member Data Documentation

template<unsigned DIM>
std::vector< c_vector<double, DIM>* > Face< DIM >::mVertices [private]


The documentation for this class was generated from the following files:

Generated on Tue Aug 4 16:11:14 2009 for Chaste by  doxygen 1.5.5