13#include "MantidGeometry/DllConfig.h"
27class PseudoRandomNumberGenerator;
35class vtkGeometryCacheReader;
36class vtkGeometryCacheWriter;
66 return new MeshObject(m_triangles, m_vertices, material);
69 void setID(
const std::string &
id)
override { m_id = id; }
70 const std::string &
id()
const override {
return m_id; }
72 int getName()
const override {
return 0; }
78 bool hasValidShape()
const override;
86 double distance(
const Track &track)
const override;
89 double solidAngle(
const Kernel::V3D &observer)
const override;
94 double volume()
const override;
98 void getBoundingBox(
double &xmax,
double &ymax,
double &zmax,
double &xmin,
double &ymin,
99 double &zmin)
const override;
102 const BoundingBox &getBoundingBox()
const override;
105 int getPointInObject(
Kernel::V3D &point)
const override;
109 const size_t)
const override;
111 const BoundingBox &activeRegion,
const size_t)
const override;
114 void draw()
const override;
116 void initDraw()
const override;
118 std::shared_ptr<GeometryHandler> getGeometryHandler()
const override;
120 void setGeometryHandler(
const std::shared_ptr<GeometryHandler> &h);
129 size_t numberOfVertices()
const;
130 std::vector<double> getVertices()
const;
131 const std::vector<Kernel::V3D> &getV3Ds()
const;
132 size_t numberOfTriangles()
const;
133 std::vector<uint32_t> getTriangles()
const;
138 void scale(
const double scaleFactor);
139 void updateGeometryHandler();
145 std::vector<Kernel::V3D> &intersectionPoints,
146 std::vector<Mantid::Geometry::TrackDirection> &entryExitFlags)
const;
157 const double M_TOLERANCE = 0.000001;
std::map< DeltaEMode::Type, std::string > index
A simple structure that defines an axis-aligned cuboid shaped bounding box for a geometrical object.
IObject : Interface for geometry objects.
Kernel::Material m_material
material composition
std::shared_ptr< vtkGeometryCacheWriter > m_vtk_cache_writer
a pointer to a class for writing to the geometry cache
MeshObject(const MeshObject &)=delete
Copy constructor.
virtual ~MeshObject()=default
Destructor.
std::vector< Kernel::V3D > m_vertices
void setID(const std::string &id) override
std::vector< uint32_t > m_triangles
Contents Triangles are specified by indices into a list of vertices.
IObject * clone() const override
Clone.
std::shared_ptr< GeometryHandler > m_handler
Geometry Handle for rendering.
IObject * cloneWithMaterial(const Kernel::Material &material) const override
std::string m_id
string to return as ID
const std::string & id() const override
BoundingBox m_boundingBox
Cache for object's bounding box.
MeshObject & operator=(const MeshObject &)=delete
Assignment operator.
int getName() const override
std::shared_ptr< vtkGeometryCacheReader > m_vtk_cache_reader
a pointer to a class for reading from the geometry cache
Defines a track as a start point and a direction.
A material is defined as being composed of a given element, defined as a PhysicalConstants::NeutronAt...
Defines a 1D pseudo-random number generator, i.e.
Helper class which provides the Collimation Length for SANS instruments.