Mantid
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Mantid::DataHandling::MeshFileIO Class Reference

#include <MeshFileIO.h>

Inheritance diagram for Mantid::DataHandling::MeshFileIO:
Mantid::DataHandling::LoadSingleMesh Mantid::DataHandling::Mantid3MFFileIO Mantid::DataHandling::SaveStl Mantid::DataHandling::LoadOff Mantid::DataHandling::LoadStl Mantid::DataHandling::LoadAsciiStl Mantid::DataHandling::LoadBinaryStl

Public Member Functions

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...
 

Protected Member Functions

 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

ScaleUnits m_scaleType
 
std::vector< uint32_t > m_triangle
 
std::vector< Kernel::V3Dm_vertices
 

Detailed Description

Definition at line 23 of file MeshFileIO.h.

Constructor & Destructor Documentation

◆ MeshFileIO() [1/2]

Mantid::DataHandling::MeshFileIO::MeshFileIO ( ScaleUnits  scaleType)
inlineprotected

Definition at line 35 of file MeshFileIO.h.

◆ MeshFileIO() [2/2]

Mantid::DataHandling::MeshFileIO::MeshFileIO ( ScaleUnits  scaleType,
std::vector< uint32_t >  triangles,
std::vector< Kernel::V3D vertices 
)
inlineprotected

Definition at line 36 of file MeshFileIO.h.

Member Function Documentation

◆ createScaledV3D()

Kernel::V3D Mantid::DataHandling::MeshFileIO::createScaledV3D ( double  xVal,
double  yVal,
double  zVal 
)

scales a 3D point according the units defined in the MeshFileIO class

Parameters
xValThe x coordinate to be scaled
yValThe y coordinate to be scaled
zValThe z coordinate to be scaled
Returns
a 3D vector containing the scaled coordinates

Definition at line 53 of file MeshFileIO.cpp.

References scaleValue().

Referenced by Mantid::DataHandling::Mantid3MFFileIO::loadMeshObject(), Mantid::DataHandling::LoadOff::readOFFVertices(), Mantid::DataHandling::LoadAsciiStl::readSTLVertex(), Mantid::DataHandling::LoadBinaryStl::readTriangle(), and translate().

◆ getScaleType()

ScaleUnits Mantid::DataHandling::MeshFileIO::getScaleType ( )
inline

Definition at line 32 of file MeshFileIO.h.

◆ removeScale()

float Mantid::DataHandling::MeshFileIO::removeScale ( double  value)
inlineprotected

Definition at line 50 of file MeshFileIO.h.

References value.

Referenced by Mantid::DataHandling::SaveStl::writeTriangle().

◆ rotate()

std::shared_ptr< Geometry::MeshObject > Mantid::DataHandling::MeshFileIO::rotate ( std::shared_ptr< Geometry::MeshObject environmentMesh,
double  xRotation,
double  yRotation,
double  zRotation 
)

Rotates the environment by a generated matrix.

Parameters
environmentMeshThe environment to rotate
xRotationThe x rotation required in radians
yRotationThe y rotation required in radians
zRotationThe z rotation required in radians
Returns
a shared pointer to the newly rotated environment

Definition at line 20 of file MeshFileIO.cpp.

References Mantid::Geometry::ShapeFactory::generateMatrix().

◆ scaleValue()

double Mantid::DataHandling::MeshFileIO::scaleValue ( double  val)
inlineprotected

◆ setScaleType()

void Mantid::DataHandling::MeshFileIO::setScaleType ( const ScaleUnits  scaleType)
inlineprotected

Definition at line 67 of file MeshFileIO.h.

Referenced by Mantid::DataHandling::Mantid3MFFileIO::LoadFile().

◆ translate()

std::shared_ptr< Geometry::MeshObject > Mantid::DataHandling::MeshFileIO::translate ( std::shared_ptr< Geometry::MeshObject environmentMesh,
const std::vector< double > &  translationVector 
)

translates the environment by a provided matrix

Parameters
environmentMeshThe environment to translate
translationVectorThe 3D translation to apply
Returns
a shared pointer to the newly translated environment

Definition at line 33 of file MeshFileIO.cpp.

References createScaledV3D(), and translate().

Referenced by translate().

Member Data Documentation

◆ m_scaleType

ScaleUnits Mantid::DataHandling::MeshFileIO::m_scaleType
protected

Definition at line 63 of file MeshFileIO.h.

Referenced by Mantid::DataHandling::SaveStl::writeHeader().

◆ m_triangle

std::vector<uint32_t> Mantid::DataHandling::MeshFileIO::m_triangle
protected

◆ m_vertices

std::vector<Kernel::V3D> Mantid::DataHandling::MeshFileIO::m_vertices
protected

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