VoronoiCell Class Reference

#include <VoronoiCell.hpp>

Collaboration diagram for VoronoiCell:

Collaboration graph
[legend]

List of all members.

Public Member Functions

bool operator== (VoronoiCell &rOtherCell)
c_vector< double, 3 > & rGetVoronoiCellCentre ()
unsigned GetNumFaces () const
const Face< 3 > & rGetFace (unsigned index) const
bool FaceIsOrientatedClockwise (unsigned index) const
void AddFace (Face< 3 > *pFace)
void AddOrientation (bool isOrientedClockwise)
void SetCellCentre (c_vector< double, 3 > cellCentre)

Private Member Functions

bool EqualFaces (Face< 3 > &face1, bool orientation1, Face< 3 > &face2, bool orientation2)

Private Attributes

std::vector< Face< 3 > * > mFaces
std::vector< bool > mOrientations
c_vector< double, 3 > mCellCentre


Detailed Description

A VoronoiCell class for use in the VoronoiTessellation class.

Definition at line 41 of file VoronoiCell.hpp.


Member Function Documentation

bool VoronoiCell::EqualFaces ( Face< 3 > &  face1,
bool  orientation1,
Face< 3 > &  face2,
bool  orientation2 
) [private]

Return whether two faces are equal.

Parameters:
face1 the first face
orientation1 whether the first face is oriented
face2 the second face
orientation2 whether the second face is oriented

Definition at line 38 of file VoronoiCell.cpp.

Referenced by operator==().

bool VoronoiCell::operator== ( VoronoiCell rOtherCell  ) 

Test whether two VoronoiCells are equal.

Two VoronoiCells are equal if their set of faces are equal (including whether the faces have the same orientations).

Parameters:
rOtherCell the VoronoiCell to compare to

Definition at line 51 of file VoronoiCell.cpp.

References EqualFaces(), GetNumFaces(), mFaces, and mOrientations.

c_vector< double, 3 > & VoronoiCell::rGetVoronoiCellCentre (  ) 

Get the centre of the VoronoiCell.

Definition at line 85 of file VoronoiCell.cpp.

References mCellCentre.

unsigned VoronoiCell::GetNumFaces (  )  const

Get the number of faces in the VoronoiCell.

Definition at line 90 of file VoronoiCell.cpp.

References mFaces.

Referenced by operator==(), and InventorVoronoiWriter::ScaleAndWrite().

const Face< 3 > & VoronoiCell::rGetFace ( unsigned  index  )  const

Get the face with a given index.

Parameters:
index the index of the face in the VoronoiCell

Definition at line 95 of file VoronoiCell.cpp.

References mFaces.

Referenced by InventorVoronoiWriter::ScaleAndWrite().

bool VoronoiCell::FaceIsOrientatedClockwise ( unsigned  index  )  const

Get whether the face with a given index is oriented clockwise.

Parameters:
index the index of the face in the VoronoiCell

Definition at line 100 of file VoronoiCell.cpp.

References mOrientations.

Referenced by InventorVoronoiWriter::ScaleAndWrite().

void VoronoiCell::AddFace ( Face< 3 > *  pFace  ) 

Add an entry to the end of mFaces.

Parameters:
pFace pointer to the new Face

Definition at line 105 of file VoronoiCell.cpp.

References mFaces.

void VoronoiCell::AddOrientation ( bool  isOrientedClockwise  ) 

Add an entry to the end of mOrientations.

Parameters:
isOrientedClockwise whether the new Face is oriented clockwise

Definition at line 110 of file VoronoiCell.cpp.

References mOrientations.

void VoronoiCell::SetCellCentre ( c_vector< double, 3 >  cellCentre  ) 

Set the centre of the VoronoiCell.

Parameters:
cellCentre the cell centre

Definition at line 115 of file VoronoiCell.cpp.

References mCellCentre.


Member Data Documentation

std::vector< Face<3>* > VoronoiCell::mFaces [private]

Faces of the VoronoiCell, which should be distinct.

Definition at line 48 of file VoronoiCell.hpp.

Referenced by AddFace(), GetNumFaces(), operator==(), and rGetFace().

std::vector<bool> VoronoiCell::mOrientations [private]

How each face is oriented. From the perspective of the centre of the VoronoiCell, the vertices of each face should be ordered clockwise. If and only if this is false, the order of vertices in the corresponding face should be reversed.

N.B. Most faces belong to two VoronoiCell, but with opposite orientations. This allows us to reuse the face data across the two cells.

Definition at line 60 of file VoronoiCell.hpp.

Referenced by AddOrientation(), FaceIsOrientatedClockwise(), and operator==().

c_vector<double, 3> VoronoiCell::mCellCentre [private]

The centre of the VoronoiCell.

Definition at line 65 of file VoronoiCell.hpp.

Referenced by rGetVoronoiCellCentre(), and SetCellCentre().


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

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