|
Mantid
|
Models a Container is used to hold a sample in the beam. More...
#include <Container.h>
Public Types | |
| using | ShapeArgs = std::unordered_map< std::string, double > |
Public Member Functions | |
| IObject * | clone () const override |
| IObject * | cloneWithMaterial (const Kernel::Material &material) const override |
| Container () | |
| Container (const Container &container) | |
| Container (const std::string &xml) | |
| Construct a container providing an XML definition shape. More... | |
| Container (IObject_sptr shape) | |
| IObject_sptr | createSampleShape (const ShapeArgs &args) const |
| Return an object that represents the sample shape from the current definition but override the default values with the given values. More... | |
| double | distance (const Geometry::Track &t) const override |
| void | draw () const override |
| boost::optional< Kernel::V3D > | generatePointInObject (Kernel::PseudoRandomNumberGenerator &rng, const BoundingBox &activeRegion, const size_t i) const override |
| boost::optional< Kernel::V3D > | generatePointInObject (Kernel::PseudoRandomNumberGenerator &rng, const size_t i) const override |
| const BoundingBox & | getBoundingBox () const override |
| Return cached value of axis-aligned bounding box. More... | |
| 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) More... | |
| std::shared_ptr< GeometryHandler > | getGeometryHandler () const override |
| int | getName () const override |
| void | GetObjectGeom (detail::ShapeInfo::GeometryShape &type, std::vector< Kernel::V3D > &vectors, double &innerRadius, double &radius, double &height) const override |
| int | getPointInObject (Kernel::V3D &point) const override |
| IObject_sptr | getSampleShape () const |
| const IObject & | getShape () const |
| const IObject_sptr | getShapePtr () const |
| bool | hasCustomizableSampleShape () const |
| bool | hasFixedSampleShape () const |
| bool | hasValidShape () const override |
| const std::string & | id () const override |
| void | initDraw () const override |
| int | interceptSurface (Geometry::Track &t) const override |
| bool | isOnSide (const Kernel::V3D &p) const override |
| bool | isValid (const Kernel::V3D &p) const override |
| const Kernel::Material & | material () const override |
| Container & | operator= (const Container &container) |
| void | setID (const std::string &id) override |
| Set the ID of the shape, if it is a CSG Object. More... | |
| virtual void | setMaterial (const Kernel::Material &material) override |
| void | setSampleShape (const std::string &sampleShapeXML) |
| Set the definition of the sample shape for this can. More... | |
| void | setSampleShape (IObject_sptr sampleShape) |
| detail::ShapeInfo::GeometryShape | shape () const override |
| const detail::ShapeInfo & | shapeInfo () const override |
| double | solidAngle (const Kernel::V3D &observer) const override |
| double | solidAngle (const Kernel::V3D &observer, const Kernel::V3D &scaleFactor) const override |
| double | volume () const override |
Public Member Functions inherited from Mantid::Geometry::IObject | |
| virtual IObject * | clone () const =0 |
| virtual IObject * | cloneWithMaterial (const Kernel::Material &material) const =0 |
| virtual double | distance (const Geometry::Track &) const =0 |
| virtual void | draw () const =0 |
| virtual boost::optional< Kernel::V3D > | generatePointInObject (Kernel::PseudoRandomNumberGenerator &rng, const BoundingBox &activeRegion, const size_t) const =0 |
| virtual boost::optional< Kernel::V3D > | generatePointInObject (Kernel::PseudoRandomNumberGenerator &rng, const size_t) const =0 |
| virtual const BoundingBox & | getBoundingBox () const =0 |
| Return cached value of axis-aligned bounding box. More... | |
| virtual void | getBoundingBox (double &xmax, double &ymax, double &zmax, double &xmin, double &ymin, double &zmin) const =0 |
| Calculate (or return cached value of) Axis Aligned Bounding box (DEPRECATED) More... | |
| virtual std::shared_ptr< GeometryHandler > | getGeometryHandler () const =0 |
| virtual int | getName () const =0 |
| virtual void | GetObjectGeom (detail::ShapeInfo::GeometryShape &type, std::vector< Kernel::V3D > &vectors, double &innerRadius, double &radius, double &height) const =0 |
| virtual int | getPointInObject (Kernel::V3D &point) const =0 |
| virtual bool | hasValidShape () const =0 |
| virtual const std::string & | id () const =0 |
| virtual void | initDraw () const =0 |
| virtual int | interceptSurface (Geometry::Track &) const =0 |
| virtual bool | isFiniteGeometry () const |
| virtual bool | isOnSide (const Kernel::V3D &) const =0 |
| virtual bool | isValid (const Kernel::V3D &) const =0 |
| virtual const Kernel::Material & | material () const =0 |
| virtual void | setFiniteGeometryFlag (bool) |
| virtual void | setID (const std::string &id)=0 |
| virtual void | setMaterial (const Kernel::Material &material)=0 |
| virtual detail::ShapeInfo::GeometryShape | shape () const =0 |
| virtual const detail::ShapeInfo & | shapeInfo () const =0 |
| virtual double | solidAngle (const Kernel::V3D &observer) const =0 |
| virtual double | solidAngle (const Kernel::V3D &observer, const Kernel::V3D &scaleFactor) const =0 |
| virtual double | volume () const =0 |
| virtual | ~IObject ()=default |
Private Attributes | |
| IObject_sptr | m_sampleShape = nullptr |
| std::string | m_sampleShapeXML |
| IObject_sptr | m_shape |
Models a Container is used to hold a sample in the beam.
It gets most of its functionality from wrapped Geometry::IObject but can also hold a definition of what the sample geometry itself would be. If the sample shape definition is set then we term this a constrained sample geometry.
Definition at line 24 of file Container.h.
| using Mantid::Geometry::Container::ShapeArgs = std::unordered_map<std::string, double> |
Definition at line 26 of file Container.h.
| Mantid::Geometry::Container::Container | ( | ) |
Definition at line 55 of file Container.cpp.
| Mantid::Geometry::Container::Container | ( | IObject_sptr | shape | ) |
Definition at line 57 of file Container.cpp.
| Mantid::Geometry::Container::Container | ( | const Container & | container | ) |
Definition at line 59 of file Container.cpp.
| Mantid::Geometry::Container::Container | ( | const std::string & | xml | ) |
Construct a container providing an XML definition shape.
| xml | Definition of the shape in xml |
Definition at line 72 of file Container.cpp.
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 49 of file Container.h.
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 51 of file Container.h.
References Mantid::Geometry::IObject::cloneWithMaterial().
| IObject_sptr Mantid::Geometry::Container::createSampleShape | ( | const ShapeArgs & | args | ) | const |
Return an object that represents the sample shape from the current definition but override the default values with the given values.
It throws a std::runtime_error if no sample shape is defined.
| args | A hash of tag values to use in place of the default |
Definition at line 93 of file Container.cpp.
References Mantid::Geometry::ShapeFactory::createShape(), hasCustomizableSampleShape(), and m_sampleShapeXML.
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 58 of file Container.h.
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 90 of file Container.h.
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 75 of file Container.h.
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 71 of file Container.h.
|
inlineoverridevirtual |
Return cached value of axis-aligned bounding box.
Implements Mantid::Geometry::IObject.
Definition at line 64 of file Container.h.
|
inlineoverridevirtual |
Calculate (or return cached value of) Axis Aligned Bounding box (DEPRECATED)
Implements Mantid::Geometry::IObject.
Definition at line 65 of file Container.h.
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 88 of file Container.h.
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 55 of file Container.h.
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 84 of file Container.h.
References height, innerRadius, and radius.
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 70 of file Container.h.
| IObject_sptr Mantid::Geometry::Container::getSampleShape | ( | ) | const |
Definition at line 119 of file Container.cpp.
References m_sampleShape.
|
inline |
Definition at line 42 of file Container.h.
Referenced by export_Container().
|
inline |
Definition at line 43 of file Container.h.
Referenced by Mantid::Algorithms::DiscusMultipleScatteringCorrection::prepareStructureFactors().
| bool Mantid::Geometry::Container::hasCustomizableSampleShape | ( | ) | const |
Definition at line 78 of file Container.cpp.
References m_sampleShapeXML.
Referenced by createSampleShape(), and Mantid::DataHandling::SetSample::setSampleShape().
| bool Mantid::Geometry::Container::hasFixedSampleShape | ( | ) | const |
Definition at line 84 of file Container.cpp.
References m_sampleShape.
Referenced by Mantid::DataHandling::SetSample::setSampleShape().
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 47 of file Container.h.
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 96 of file Container.h.
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 91 of file Container.h.
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 57 of file Container.h.
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 46 of file Container.h.
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 45 of file Container.h.
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 93 of file Container.h.
Referenced by Mantid::Algorithms::DiscusMultipleScatteringCorrection::prepareStructureFactors().
Definition at line 61 of file Container.cpp.
References m_sampleShape, m_sampleShapeXML, and m_shape.
|
overridevirtual |
Set the ID of the shape, if it is a CSG Object.
| id | ID a string identifying to object |
Implements Mantid::Geometry::IObject.
Definition at line 145 of file Container.cpp.
References m_shape.
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 94 of file Container.h.
| void Mantid::Geometry::Container::setSampleShape | ( | const std::string & | sampleShapeXML | ) |
Set the definition of the sample shape for this can.
| sampleShapeXML |
Definition at line 125 of file Container.cpp.
References m_sampleShapeXML.
|
inline |
Definition at line 40 of file Container.h.
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 80 of file Container.h.
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 82 of file Container.h.
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 59 of file Container.h.
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 60 of file Container.h.
|
inlineoverridevirtual |
Implements Mantid::Geometry::IObject.
Definition at line 63 of file Container.h.
|
private |
Definition at line 101 of file Container.h.
Referenced by getSampleShape(), hasFixedSampleShape(), and operator=().
|
private |
Definition at line 100 of file Container.h.
Referenced by createSampleShape(), hasCustomizableSampleShape(), operator=(), and setSampleShape().
|
private |
Definition at line 99 of file Container.h.
Referenced by operator=(), and setID().