AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
A simple reader for an STL file encoded in the ascii or binary format. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.5.0/src/axom/quest/stl/STLReader.hpp>
Public Member Functions | |
STLReader () | |
Constructor. More... | |
virtual | ~STLReader () |
Destructor. More... | |
void | setFileName (const std::string &fileName) |
Sets the name of the file to read. More... | |
int | getNumNodes () const |
Returns the number of nodes of the surface mesh. More... | |
int | getNumFaces () const |
Returns the number of faces of the surface mesh. More... | |
void | clear () |
Clears all internal data-structures. More... | |
virtual int | read () |
Reads in the surface mesh from an STL file. More... | |
void | getMesh (mint::UnstructuredMesh< mint::SINGLE_SHAPE > *mesh) |
Stores the STL data in the supplied unstructured mesh object. More... | |
Protected Attributes | |
std::string | m_fileName |
axom::IndexType | m_num_nodes |
axom::IndexType | m_num_faces |
std::vector< double > | m_nodes |
A simple reader for an STL file encoded in the ascii or binary format.
STL (STereoLithography) is a common file format for triangle meshes. It encodes a "soup of triangles" by explicitly listing the coordinate positions of the three vertices of each triangle.
axom::quest::STLReader::STLReader | ( | ) |
Constructor.
|
virtual |
Destructor.
|
inline |
Sets the name of the file to read.
[in] | fileName | the name of the file to read. |
References m_fileName.
|
inline |
Returns the number of nodes of the surface mesh.
References m_num_nodes.
|
inline |
Returns the number of faces of the surface mesh.
References clear(), getMesh(), m_num_faces, and read().
void axom::quest::STLReader::clear | ( | ) |
Clears all internal data-structures.
Referenced by getNumFaces().
|
virtual |
Reads in the surface mesh from an STL file.
Reimplemented in axom::quest::PSTLReader.
Referenced by getNumFaces().
void axom::quest::STLReader::getMesh | ( | mint::UnstructuredMesh< mint::SINGLE_SHAPE > * | mesh | ) |
Stores the STL data in the supplied unstructured mesh object.
[in,out] | mesh | pointer to the unstructured mesh. |
Referenced by getNumFaces().
|
protected |
Referenced by setFileName().
|
protected |
Referenced by getNumNodes().
|
protected |
Referenced by getNumFaces().
|
protected |