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- ()
unsigned GetNumVertices () const
void OrderVerticesAntiClockwise ()
void AddVertex (c_vector< double, DIM > *pVertex)
unsigned GetNumVertices ()
c_vector< double, DIM > & rGetVertex (unsigned index)
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 42 of file Face.hpp.


Member Function Documentation

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 162 of file Face.cpp.

References Face< DIM >::mVertices.

Referenced by VoronoiTessellation< DIM >::Initialise().

template<unsigned DIM>
unsigned Face< DIM >::GetNumVertices (  )  [inline]
Returns:
the number of vertices in the Face.

Definition at line 168 of file Face.cpp.

References Face< DIM >::mVertices.

template<unsigned DIM>
unsigned Face< DIM >::GetNumVertices (  )  const [inline]
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 47 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 inequality.

Parameters:
rOtherFace the Face to compare to

Definition at line 98 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 106 of file Face.cpp.

References Face< DIM >::mVertices.

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 58 of file Face.cpp.

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

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

Reorder the vertices of the Face anticlockwise.

Definition at line 125 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 174 of file Face.cpp.

References Face< DIM >::mVertices.

Referenced by VoronoiTessellation< DIM >::GetFaceArea(), VoronoiTessellation< DIM >::GetFacePerimeter(), InventorVoronoiWriter::ScaleAndWrite(), and InventorVoronoiWriter::Write().

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 180 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 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 53 of file Face.hpp.

Referenced by Face< DIM >::AddVertex(), Face< DIM >::GetNumVertices(), Face< DIM >::Increment(), Face< DIM >::operator-(), Face< DIM >::operator==(), Face< DIM >::OrderVerticesAntiClockwise(), Face< DIM >::rGetVertex(), and Face< DIM >::SetVertex().


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

Generated by  doxygen 1.6.2