#include <InventorVoronoiWriter.hpp>
Public Member Functions | |
InventorVoronoiWriter (const std::string &rDirectory, const std::string &rBaseName, const bool clearOutputDir=true) | |
~InventorVoronoiWriter () | |
void | Write (const VoronoiTessellation< 3 > &rTessellation) |
void | ScaleAndWrite (VoronoiTessellation< 3 > &rTessellation, double scaleFactor) |
Protected Attributes | |
OutputFileHandler * | mpOutputFileHandler |
std::string | mBaseName |
A concrete InventorVoronoiWriter class. Used to write VoronoiTessellations to file.
Definition at line 41 of file InventorVoronoiWriter.hpp.
InventorVoronoiWriter::InventorVoronoiWriter | ( | const std::string & | rDirectory, | |
const std::string & | rBaseName, | |||
const bool | clearOutputDir = true | |||
) |
Constructor.
rDirectory | the directory in which to write the mesh to file | |
rBaseName | the base name of the files in which to write the mesh data | |
clearOutputDir | whether to clean the directory (defaults to true) |
Definition at line 88 of file InventorVoronoiWriter.cpp.
References mpOutputFileHandler.
InventorVoronoiWriter::~InventorVoronoiWriter | ( | ) |
Destructor.
Definition at line 96 of file InventorVoronoiWriter.cpp.
References mpOutputFileHandler.
void InventorVoronoiWriter::ScaleAndWrite | ( | VoronoiTessellation< 3 > & | rTessellation, | |
double | scaleFactor | |||
) |
Scale the vertex of each cell toward the centre of that cell by the given scaleFactor and write.
rTessellation | the Voronoi tessellation | |
scaleFactor | the scale factor |
Definition at line 140 of file InventorVoronoiWriter.cpp.
References VoronoiCell::FaceIsOrientatedClockwise(), VoronoiCell::GetNumFaces(), Face< DIM >::GetNumVertices(), mBaseName, mpOutputFileHandler, VoronoiTessellation< DIM >::mVoronoiCells, OutputFileHandler::OpenOutputFile(), VoronoiTessellation< DIM >::rGetCell(), VoronoiCell::rGetFace(), and Face< DIM >::rGetVertex().
void InventorVoronoiWriter::Write | ( | const VoronoiTessellation< 3 > & | rTessellation | ) |
Write the Voronoi tessellation in Inventor format.
rTessellation | the Voronoi tessellation |
Definition at line 101 of file InventorVoronoiWriter.cpp.
References VoronoiTessellation< DIM >::GetNumFaces(), Face< DIM >::GetNumVertices(), VoronoiTessellation< DIM >::GetNumVertices(), mBaseName, VoronoiTessellation< DIM >::mFaces, mpOutputFileHandler, VoronoiTessellation< DIM >::mVertices, OutputFileHandler::OpenOutputFile(), and Face< DIM >::rGetVertex().
std::string InventorVoronoiWriter::mBaseName [protected] |
Base name for the input files
Definition at line 46 of file InventorVoronoiWriter.hpp.
Referenced by ScaleAndWrite(), and Write().
Output file handler
Definition at line 45 of file InventorVoronoiWriter.hpp.
Referenced by InventorVoronoiWriter(), ScaleAndWrite(), Write(), and ~InventorVoronoiWriter().