Mantid
|
A set of helper functions for dealing with components, i.e. More...
Enumerations | |
enum | TransformType { Absolute = 0 , Relative = 1 } |
Specifies how a transformation should be interpreted. More... | |
Functions | |
MANTID_GEOMETRY_DLL Geometry::Instrument_sptr | createMinimalInstrument (const Mantid::Kernel::V3D &sourcePos, const Mantid::Kernel::V3D &samplePos, const Mantid::Kernel::V3D &detectorPos) |
createOneDetectorInstrument, creates the most simple possible definition of an instrument in which we can extract a valid L1 and L2 distance for unit calculations. More... | |
MANTID_GEOMETRY_DLL std::shared_ptr< Geometry::CSGObject > | createSphere (double radius, const V3D ¢re, const std::string &id) |
Create a sphere object. More... | |
MANTID_GEOMETRY_DLL Geometry::Instrument_sptr | createVirtualInstrument (Kernel::V3D sourcePos, Kernel::V3D samplePos, const std::vector< Kernel::V3D > &vecdetpos, const std::vector< detid_t > &vecdetid) |
MANTID_GEOMETRY_DLL std::string | sphereXML (double radius, const Kernel::V3D ¢re, const std::string &id) |
Return the XML for a sphere. More... | |
A set of helper functions for dealing with components, i.e.
movement, rotation that require interaction with the ParameterMap.
Specifies how a transformation should be interpreted.
Enumerator | |
---|---|
Absolute | The value is the absolute new value. |
Relative | The transformation given is relative to the original value. |
Definition at line 34 of file ComponentHelper.h.
Geometry::Instrument_sptr Mantid::Geometry::ComponentHelper::createMinimalInstrument | ( | const Mantid::Kernel::V3D & | sourcePos, |
const Mantid::Kernel::V3D & | samplePos, | ||
const Mantid::Kernel::V3D & | detectorPos | ||
) |
createOneDetectorInstrument, creates the most simple possible definition of an instrument in which we can extract a valid L1 and L2 distance for unit calculations.
Beam direction is along X, Up direction is Y
sourcePos | : V3D position |
samplePos | : V3D sample position |
detectorPos | : V3D detector position |
Definition at line 33 of file ComponentHelper.cpp.
References createSphere(), Mantid::Geometry::Left, Mantid::Geometry::Component::setPos(), Mantid::Geometry::ObjComponent::setShape(), Mantid::Geometry::X, and Mantid::Geometry::Y.
std::shared_ptr< CSGObject > Mantid::Geometry::ComponentHelper::createSphere | ( | double | radius, |
const Kernel::V3D & | centre, | ||
const std::string & | id | ||
) |
Create a sphere object.
Definition at line 100 of file ComponentHelper.cpp.
References Mantid::Geometry::ShapeFactory::createShape(), radius, and sphereXML().
Referenced by createMinimalInstrument(), and createVirtualInstrument().
Geometry::Instrument_sptr Mantid::Geometry::ComponentHelper::createVirtualInstrument | ( | Kernel::V3D | sourcePos, |
Kernel::V3D | samplePos, | ||
const std::vector< Kernel::V3D > & | vecdetpos, | ||
const std::vector< detid_t > & | vecdetid | ||
) |
Definition at line 63 of file ComponentHelper.cpp.
References createSphere(), Mantid::Geometry::Right, Mantid::Geometry::Component::setPos(), Mantid::Geometry::ObjComponent::setShape(), Mantid::Geometry::Y, and Mantid::Geometry::Z.
Referenced by Mantid::MDAlgorithms::ConvertCWSDExpToMomentum::createVirtualInstrument().
std::string Mantid::Geometry::ComponentHelper::sphereXML | ( | double | radius, |
const Kernel::V3D & | centre, | ||
const std::string & | id | ||
) |
Return the XML for a sphere.
Definition at line 108 of file ComponentHelper.cpp.
References radius, Mantid::Kernel::V3D::X(), Mantid::Kernel::V3D::Y(), and Mantid::Kernel::V3D::Z().
Referenced by createSphere().