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

#include <LoadBinaryStl.h>

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

Public Member Functions

 LoadBinaryStl (std::string filename, ScaleUnits scaleType)
 
 LoadBinaryStl (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 isBinarySTL (const std::string &filename)
 

Static Public Attributes

static constexpr int HEADER_SIZE = 80
 
static constexpr std::ios_base::openmode openMode = std::ios::in | std::ios::binary
 
static constexpr uint32_t TRIANGLE_COUNT_DATA_SIZE = 4
 
static constexpr uint32_t TRIANGLE_DATA_SIZE = 50
 
static constexpr uint32_t VECTOR_DATA_SIZE = 12
 

Private Member Functions

void readTriangle (Kernel::BinaryStreamReader, uint32_t &vertexCount)
 

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 24 of file LoadBinaryStl.h.

Constructor & Destructor Documentation

◆ LoadBinaryStl() [1/2]

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

Definition at line 31 of file LoadBinaryStl.h.

◆ LoadBinaryStl() [2/2]

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

Definition at line 33 of file LoadBinaryStl.h.

Member Function Documentation

◆ isBinarySTL()

bool Mantid::DataHandling::LoadBinaryStl::isBinarySTL ( const std::string &  filename)
static

◆ readShape()

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

◆ readTriangle()

void Mantid::DataHandling::LoadBinaryStl::readTriangle ( Kernel::BinaryStreamReader  streamReader,
uint32_t &  vertexCount 
)
private

Member Data Documentation

◆ HEADER_SIZE

constexpr int Mantid::DataHandling::LoadBinaryStl::HEADER_SIZE = 80
staticconstexpr

Definition at line 26 of file LoadBinaryStl.h.

Referenced by isBinarySTL(), and readShape().

◆ openMode

constexpr std::ios_base::openmode Mantid::DataHandling::LoadBinaryStl::openMode = std::ios::in | std::ios::binary
staticconstexpr

Definition at line 30 of file LoadBinaryStl.h.

Referenced by isBinarySTL().

◆ TRIANGLE_COUNT_DATA_SIZE

constexpr uint32_t Mantid::DataHandling::LoadBinaryStl::TRIANGLE_COUNT_DATA_SIZE = 4
staticconstexpr

Definition at line 28 of file LoadBinaryStl.h.

Referenced by isBinarySTL(), and readShape().

◆ TRIANGLE_DATA_SIZE

constexpr uint32_t Mantid::DataHandling::LoadBinaryStl::TRIANGLE_DATA_SIZE = 50
staticconstexpr

Definition at line 27 of file LoadBinaryStl.h.

Referenced by isBinarySTL(), and readShape().

◆ VECTOR_DATA_SIZE

constexpr uint32_t Mantid::DataHandling::LoadBinaryStl::VECTOR_DATA_SIZE = 12
staticconstexpr

Definition at line 29 of file LoadBinaryStl.h.

Referenced by readShape().


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