9#include "MantidGeometry/DllConfig.h"
13#include <unordered_map>
26 using ShapeArgs = std::unordered_map<std::string, double>;
34 bool hasCustomizableSampleShape()
const;
35 bool hasFixedSampleShape()
const;
39 void setSampleShape(
const std::string &sampleShapeXML);
47 bool hasValidShape()
const override {
return m_shape->hasValidShape(); }
55 int getName()
const override {
return m_shape->getName(); }
61 return m_shape->solidAngle(observer, scaleFactor);
63 double volume()
const override {
return m_shape->volume(); }
65 void getBoundingBox(
double &xmax,
double &ymax,
double &zmax,
double &xmin,
double &ymin,
66 double &zmin)
const override {
67 m_shape->getBoundingBox(xmax, ymax, zmax, xmin, ymin, zmin);
72 const size_t i)
const override {
73 return m_shape->generatePointInObject(rng, i);
76 const BoundingBox &activeRegion,
const size_t i)
const override {
77 return m_shape->generatePointInObject(rng, activeRegion, i);
88 std::shared_ptr<GeometryHandler>
getGeometryHandler()
const override {
return m_shape->getGeometryHandler(); }
90 void draw()
const override { m_shape->draw(); }
91 void initDraw()
const override { m_shape->initDraw(); }
95 void setID(
const std::string &
id)
override;
96 const std::string &
id()
const override {
return m_shape->id(); }
A simple structure that defines an axis-aligned cuboid shaped bounding box for a geometrical object.
Models a Container is used to hold a sample in the beam.
double distance(const Geometry::Track &t) const override
void getBoundingBox(double &xmax, double &ymax, double &zmax, double &xmin, double &ymin, double &zmin) const override
Calculate (or return cached value of) Axis Aligned Bounding box (DEPRECATED)
int getPointInObject(Kernel::V3D &point) const override
const IObject_sptr getShapePtr() const
const Kernel::Material & material() const override
std::shared_ptr< GeometryHandler > getGeometryHandler() const override
int interceptSurface(Geometry::Track &t) const override
boost::optional< Kernel::V3D > generatePointInObject(Kernel::PseudoRandomNumberGenerator &rng, const BoundingBox &activeRegion, const size_t i) const override
std::unordered_map< std::string, double > ShapeArgs
double solidAngle(const Kernel::V3D &observer, const Kernel::V3D &scaleFactor) const override
void setSampleShape(IObject_sptr sampleShape)
IObject * clone() const override
virtual void setMaterial(const Kernel::Material &material) override
double solidAngle(const Kernel::V3D &observer) const override
const BoundingBox & getBoundingBox() const override
Return cached value of axis-aligned bounding box.
const std::string & id() const override
std::string m_sampleShapeXML
bool hasValidShape() const override
IObject * cloneWithMaterial(const Kernel::Material &material) const override
void initDraw() const override
boost::optional< Kernel::V3D > generatePointInObject(Kernel::PseudoRandomNumberGenerator &rng, const size_t i) const override
bool isOnSide(const Kernel::V3D &p) const override
bool isValid(const Kernel::V3D &p) const override
detail::ShapeInfo::GeometryShape shape() const override
const IObject & getShape() const
double volume() const override
void GetObjectGeom(detail::ShapeInfo::GeometryShape &type, std::vector< Kernel::V3D > &vectors, double &innerRadius, double &radius, double &height) const override
const detail::ShapeInfo & shapeInfo() const override
void draw() const override
int getName() const override
IObject : Interface for geometry objects.
virtual IObject * cloneWithMaterial(const Kernel::Material &material) const =0
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.
std::shared_ptr< const Container > Container_const_sptr
Typdef for a shared pointer to a const object.
std::shared_ptr< Container > Container_sptr
Typdef for a shared pointer.
std::shared_ptr< IObject > IObject_sptr
Typdef for a shared pointer.
Helper class which provides the Collimation Length for SANS instruments.