Mantid
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::DataHandling::LoadAsciiStl Class Reference

#include <LoadAsciiStl.h>

Inheritance diagram for Mantid::DataHandling::LoadAsciiStl:
Mantid::DataHandling::LoadStl Mantid::DataHandling::LoadSingleMesh Mantid::DataHandling::MeshFileIO

Public Member Functions

 LoadAsciiStl (std::string filename, ScaleUnits scaleType)
 
 LoadAsciiStl (std::string filename, ScaleUnits scaleType, ReadMaterial::MaterialParameters params)
 
std::unique_ptr< Geometry::MeshObjectreadShape () override
 
- Public Member Functions inherited from Mantid::DataHandling::LoadStl
 LoadStl (std::string filename, std::ios_base::openmode mode, ScaleUnits scaleType)
 
 LoadStl (std::string filename, std::ios_base::openmode mode, ScaleUnits scaleType, ReadMaterial::MaterialParameters params)
 
virtual ~LoadStl ()=default
 
- Public Member Functions inherited from Mantid::DataHandling::LoadSingleMesh
 LoadSingleMesh (std::string filename, std::ios_base::openmode mode, ScaleUnits scaleType)
 
virtual std::unique_ptr< Geometry::MeshObjectreadShape ()=0
 
virtual ~LoadSingleMesh ()
 
- Public Member Functions inherited from Mantid::DataHandling::MeshFileIO
Kernel::V3D createScaledV3D (double xVal, double yVal, double zVal)
 scales a 3D point according the units defined in the MeshFileIO class More...
 
ScaleUnits getScaleType ()
 
std::shared_ptr< Geometry::MeshObjectrotate (std::shared_ptr< Geometry::MeshObject > environmentMesh, double xRotation, double yRotation, double zRotation)
 Rotates the environment by a generated matrix. More...
 
std::shared_ptr< Geometry::MeshObjecttranslate (std::shared_ptr< Geometry::MeshObject > environmentMesh, const std::vector< double > &translationVector)
 translates the environment by a provided matrix More...
 

Static Public Member Functions

static bool isAsciiSTL (const std::string &filename)
 

Private Member Functions

bool readSTLLine (std::ifstream &file, std::string const &type)
 
bool readSTLTriangle (std::ifstream &file, Kernel::V3D &v1, Kernel::V3D &v2, Kernel::V3D &v3)
 
bool readSTLVertex (std::ifstream &file, Kernel::V3D &vertex)
 

Private Attributes

int m_lineNumber = 0
 

Additional Inherited Members

- Protected Member Functions inherited from Mantid::DataHandling::LoadStl
bool areEqualVertices (Kernel::V3D const &v1, Kernel::V3D const &v2) const
 
void changeToVector ()
 
- Protected Member Functions inherited from Mantid::DataHandling::MeshFileIO
 MeshFileIO (ScaleUnits scaleType)
 
 MeshFileIO (ScaleUnits scaleType, std::vector< uint32_t > triangles, std::vector< Kernel::V3D > vertices)
 
float removeScale (double value)
 
double scaleValue (double val)
 
void setScaleType (const ScaleUnits scaleType)
 
- Protected Attributes inherited from Mantid::DataHandling::LoadStl
ReadMaterial::MaterialParameters m_params
 
bool m_setMaterial
 
std::unordered_set< std::pair< Kernel::V3D, uint32_t >, HashV3DPair, V3DTrueComparatorvertexSet
 
- Protected Attributes inherited from Mantid::DataHandling::LoadSingleMesh
std::ifstream m_file
 
const std::string m_filename
 
- Protected Attributes inherited from Mantid::DataHandling::MeshFileIO
ScaleUnits m_scaleType
 
std::vector< uint32_t > m_triangle
 
std::vector< Kernel::V3Dm_vertices
 

Detailed Description

Definition at line 23 of file LoadAsciiStl.h.

Constructor & Destructor Documentation

◆ LoadAsciiStl() [1/2]

Mantid::DataHandling::LoadAsciiStl::LoadAsciiStl ( std::string  filename,
ScaleUnits  scaleType 
)
inline

Definition at line 25 of file LoadAsciiStl.h.

◆ LoadAsciiStl() [2/2]

Mantid::DataHandling::LoadAsciiStl::LoadAsciiStl ( std::string  filename,
ScaleUnits  scaleType,
ReadMaterial::MaterialParameters  params 
)
inline

Definition at line 27 of file LoadAsciiStl.h.

Member Function Documentation

◆ isAsciiSTL()

bool Mantid::DataHandling::LoadAsciiStl::isAsciiSTL ( const std::string &  filename)
static

◆ readShape()

std::unique_ptr< Geometry::MeshObject > Mantid::DataHandling::LoadAsciiStl::readShape ( )
overridevirtual

◆ readSTLLine()

bool Mantid::DataHandling::LoadAsciiStl::readSTLLine ( std::ifstream &  file,
std::string const &  type 
)
private

Definition at line 100 of file LoadAsciiStl.cpp.

References Mantid::DataHandling::LoadSingleMesh::m_filename, and m_lineNumber.

Referenced by readSTLTriangle().

◆ readSTLTriangle()

bool Mantid::DataHandling::LoadAsciiStl::readSTLTriangle ( std::ifstream &  file,
Kernel::V3D v1,
Kernel::V3D v2,
Kernel::V3D v3 
)
private

Definition at line 68 of file LoadAsciiStl.cpp.

References readSTLLine(), and readSTLVertex().

Referenced by readShape().

◆ readSTLVertex()

bool Mantid::DataHandling::LoadAsciiStl::readSTLVertex ( std::ifstream &  file,
Kernel::V3D vertex 
)
private

Member Data Documentation

◆ m_lineNumber

int Mantid::DataHandling::LoadAsciiStl::m_lineNumber = 0
private

Definition at line 33 of file LoadAsciiStl.h.

Referenced by readShape(), readSTLLine(), and readSTLVertex().


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