Mantid
|
Class originally intended to be used with the DataHandling 'LoadInstrument' algorithm. More...
#include <ShapeFactory.h>
Public Member Functions | |
std::string | addGoniometerTag (const Kernel::Matrix< double > &rotateMatrix, std::string xml) |
std::shared_ptr< CSGObject > | createShape (Poco::XML::Element *pElem) |
Creates a geometric object from a DOM-element-node pointing to an element whose child nodes contain the shape information. More... | |
std::shared_ptr< CSGObject > | createShape (std::string shapeXML, bool addTypeTag=true) |
Creates a geometric object directly from a XML shape string. More... | |
Static Public Member Functions | |
static std::shared_ptr< CSGObject > | createHexahedralShape (double xlb, double xlf, double xrf, double xrb, double ylb, double ylf, double yrf, double yrb) |
Create a hexahedral shape object. More... | |
static std::shared_ptr< CSGObject > | createSphere (const Kernel::V3D ¢re, double radius) |
Create a Sphere. More... | |
static Kernel::Matrix< double > | generateMatrix (double xRotation, double yRotation, double zRotation) |
Generates a rotate Matrix applying the x rotate then y rotate, then z rotate. More... | |
static Kernel::Matrix< double > | generateXRotation (double xRotation) |
Generates the x component of the rotate matrix. More... | |
static Kernel::Matrix< double > | generateYRotation (double yRotation) |
Generates the y component of the rotate matrix. More... | |
static Kernel::Matrix< double > | generateZRotation (double zRotation) |
Generates the z component of the rotate matrix. More... | |
Private Member Functions | |
void | createGeometryHandler (Poco::XML::Element *, const std::shared_ptr< CSGObject > &) |
create a special geometry handler for the known finite primitives More... | |
double | getDoubleAttribute (Poco::XML::Element *pElem, const std::string &name) |
Return value of attribute to XML element. More... | |
Poco::XML::Element * | getOptionalShapeElement (Poco::XML::Element *pElem, const std::string &name) |
Return a subelement of an XML element. More... | |
Poco::XML::Element * | getShapeElement (Poco::XML::Element *pElem, const std::string &name) |
Return a subelement of an XML element, but also checks that there exist exactly one entry of this subelement. More... | |
std::string | parseCone (Poco::XML::Element *pElem, std::map< int, std::shared_ptr< Surface > > &prim, int &l_id) |
Parse XML 'cone' element. More... | |
CuboidCorners | parseCuboid (Poco::XML::Element *pElem) |
Get the four corners of a cuboid from an XML element. More... | |
std::string | parseCuboid (Poco::XML::Element *pElem, std::map< int, std::shared_ptr< Surface > > &prim, int &l_id) |
Parse XML 'cuboid' element. More... | |
std::string | parseCylinder (Poco::XML::Element *pElem, std::map< int, std::shared_ptr< Surface > > &prim, int &l_id) |
Parse XML 'cylinder' element. More... | |
Hexahedron | parseHexahedron (Poco::XML::Element *pElem) |
Get all corners of a hexahedron from an XML element. More... | |
std::string | parseHexahedron (Poco::XML::Element *pElem, std::map< int, std::shared_ptr< Surface > > &prim, int &l_id) |
Parse XML 'hexahedron' element. More... | |
std::string | parseHollowCylinder (Poco::XML::Element *pElem, std::map< int, std::shared_ptr< Surface > > &prim, int &l_id) |
Parse XML 'hollow-cylinder' element. More... | |
std::string | parseInfiniteCone (Poco::XML::Element *pElem, std::map< int, std::shared_ptr< Surface > > &prim, int &l_id) |
Parse XML 'infinite-cone' element. More... | |
std::string | parseInfiniteCylinder (Poco::XML::Element *pElem, std::map< int, std::shared_ptr< Surface > > &prim, int &l_id) |
Parse XML 'infinite-cylinder' element. More... | |
std::string | parseInfinitePlane (Poco::XML::Element *pElem, std::map< int, std::shared_ptr< Surface > > &prim, int &l_id) |
Parse XML 'infinite-plane' element. More... | |
Kernel::V3D | parsePosition (Poco::XML::Element *pElem) |
Get position coordinates from XML element. More... | |
std::string | parseSliceOfCylinderRing (Poco::XML::Element *pElem, std::map< int, std::shared_ptr< Surface > > &prim, int &l_id) |
Parse XML 'slice-of-cylinder-ring' element. More... | |
std::string | parseSphere (Poco::XML::Element *pElem, std::map< int, std::shared_ptr< Surface > > &prim, int &l_id) |
Parse XML 'sphere' element. More... | |
std::string | parseTaperedGuide (Poco::XML::Element *pElem, std::map< int, std::shared_ptr< Surface > > &prim, int &l_id) |
Parse XML 'tapered-guide' element, which is a special case of the XML 'hexahedron' element. More... | |
std::string | parseTorus (Poco::XML::Element *pElem, std::map< int, std::shared_ptr< Surface > > &prim, int &l_id) |
Parse XML 'torus' element. More... | |
Static Private Member Functions | |
static std::string | parseHexahedronFromStruct (const Hexahedron &hex, std::map< int, std::shared_ptr< Surface > > &prim, int &l_id) |
The "tapered-guide" shape is actually a special case of hexahedron; once we have the 8 points that make up either shape, the process of parsing them can be exactly the same in both cases. More... | |
static std::string | sphereAlgebra (const int surfaceID) |
Create the algebra string for a Sphere. More... | |
Private Attributes | |
Kernel::Matrix< double > | m_gonioRotateMatrix = Kernel::Matrix<double>(3, 3, 1) |
Kernel::Matrix< double > | m_rotateAllMatrix = Kernel::Matrix<double>(3, 3, 1) |
Class originally intended to be used with the DataHandling 'LoadInstrument' algorithm.
In that algorithm it is used for creating shared pointers to the geometric shapes described in the XML instrument definition file.
This class is now also use elsewhere, and in addition to create geometric shapes from an DOM-element-node pointing to a <type> element with shape information, shapes can also be created directly from a XML shape string.
Definition at line 89 of file ShapeFactory.h.
std::string Mantid::Geometry::ShapeFactory::addGoniometerTag | ( | const Kernel::Matrix< double > & | rotateMatrix, |
std::string | xml | ||
) |
Definition at line 1639 of file ShapeFactory.cpp.
References Mantid::Kernel::Matrix< T >::numCols(), Mantid::Kernel::Matrix< T >::numRows(), and std::to_string().
Referenced by Mantid::Algorithms::CopySample::copyParameters(), and Mantid::DataHandling::SetSample::setSampleShape().
|
private |
create a special geometry handler for the known finite primitives
Definition at line 1533 of file ShapeFactory.cpp.
References getOptionalShapeElement(), getShapeElement(), height, Mantid::Kernel::V3D::normalize(), Mantid::Kernel::normalize(), parseCuboid(), parseHexahedron(), parsePosition(), radius, Mantid::Geometry::detail::ShapeInfo::setCone(), Mantid::Geometry::detail::ShapeInfo::setCuboid(), Mantid::Geometry::detail::ShapeInfo::setCylinder(), Mantid::Geometry::detail::ShapeInfo::setHexahedron(), Mantid::Geometry::detail::ShapeInfo::setHollowCylinder(), and Mantid::Geometry::detail::ShapeInfo::setSphere().
Referenced by createShape().
|
static |
Create a hexahedral shape object.
xlb | :: Left-back x point or hexahedron |
xlf | :: Left-front x point of hexahedron |
xrf | :: Right-front x point of hexahedron |
xrb | :: Right-back x point of hexahedron |
ylb | :: Left-back y point or hexahedron |
ylf | :: Left-front y point of hexahedron |
yrf | :: Right-front y point of hexahedron |
yrb | :: Right-back y point of hexahedron |
Definition at line 1498 of file ShapeFactory.cpp.
References Mantid::Geometry::Hexahedron::lbb, Mantid::Geometry::Hexahedron::lbt, Mantid::Geometry::Hexahedron::lfb, Mantid::Geometry::Hexahedron::lft, parseHexahedronFromStruct(), Mantid::Geometry::Hexahedron::rbb, Mantid::Geometry::Hexahedron::rbt, Mantid::Geometry::Hexahedron::rfb, Mantid::Geometry::Hexahedron::rft, and Mantid::Geometry::detail::ShapeInfo::setHexahedron().
Referenced by Mantid::Geometry::StructuredDetector::addDetector().
std::shared_ptr< CSGObject > Mantid::Geometry::ShapeFactory::createShape | ( | Poco::XML::Element * | pElem | ) |
Creates a geometric object from a DOM-element-node pointing to an element whose child nodes contain the shape information.
If no shape information an empty Object is returned.
pElem | A pointer to an Element node whose children fully define the object. The name of this element is unimportant. |
Definition at line 104 of file ShapeFactory.cpp.
References createGeometryHandler(), Mantid::Geometry::g_log, generateMatrix(), getDoubleAttribute(), getShapeElement(), Mantid::Kernel::Matrix< T >::identityMatrix(), m_gonioRotateMatrix, m_rotateAllMatrix, parseCone(), parseCuboid(), parseCylinder(), parseHexahedron(), parseHollowCylinder(), parseInfiniteCone(), parseInfiniteCylinder(), parseInfinitePlane(), parsePosition(), parseSliceOfCylinderRing(), parseSphere(), parseTaperedGuide(), parseTorus(), std::to_string(), and Mantid::Kernel::Logger::warning().
Referenced by Mantid::Geometry::InstrumentDefinitionParser::adjustTypesContainingCombineComponentsElement(), Mantid::Algorithms::AnyShapeAbsorption::constructGaugeVolume(), Mantid::Algorithms::PaalmanPingsAbsorptionCorrection::constructGaugeVolume(), Mantid::Algorithms::AbsorptionCorrection::constructSample(), Mantid::Algorithms::CopySample::copyParameters(), Mantid::Algorithms::CreateSampleWorkspace::createCappedCylinder(), ComponentCreationHelper::createCappedCylinder(), ComponentCreationHelper::createCuboid(), ComponentCreationHelper::createHollowCylinder(), ComponentCreationHelper::createHollowShell(), Mantid::Geometry::ObjCompAssembly::createOutline(), Mantid::Geometry::Container::createSampleShape(), createShape(), Mantid::Geometry::InstrumentDefinitionParser::createShapeIfTypeIsNotAnAssembly(), Mantid::Algorithms::CreateSampleWorkspace::createSphere(), ComponentCreationHelper::createSphere(), Mantid::Geometry::ComponentHelper::createSphere(), Mantid::DataHandling::DefineGaugeVolume::exec(), Mantid::DataHandling::FindDetectorsInShape::exec(), Mantid::DataHandling::LoadQKK::exec(), Mantid::API::Sample::loadNexus(), Mantid::Algorithms::SparseWorkspace::makeCubeShape(), WorkspaceCreationHelper::maskSpectra(), Mantid::DataHandling::SampleEnvironmentSpecParser::parseComponent(), Mantid::DataHandling::SetSample::setSampleEnvironmentFromXML(), Mantid::DataHandling::CreateSampleShape::setSampleShape(), Mantid::API::Sample::setShape(), Mantid::Geometry::GridDetector::shape(), Mantid::Geometry::StructuredDetector::shape(), and Mantid::DataHandling::SetSample::validateGeometry().
std::shared_ptr< CSGObject > Mantid::Geometry::ShapeFactory::createShape | ( | std::string | shapeXML, |
bool | addTypeTag = true |
||
) |
Creates a geometric object directly from a XML shape string.
shapeXML | :: XML shape string |
addTypeTag | :: true to wrap a <type> tag around the XML supplied (default) |
Definition at line 74 of file ShapeFactory.cpp.
References createShape(), Mantid::Geometry::g_log, and Mantid::Kernel::Logger::warning().
|
static |
Create a Sphere.
centre | The center of the sphere |
radius | The radius in metres |
Definition at line 1468 of file ShapeFactory.cpp.
References radius, Mantid::Geometry::detail::ShapeInfo::setSphere(), and sphereAlgebra().
Referenced by Mantid::Crystal::SaveHKL::exec(), and Mantid::DataHandling::LoadNXSPE::exec().
|
static |
Generates a rotate Matrix applying the x rotate then y rotate, then z rotate.
xrotate | The x rotate required in radians |
yrotate | The y rotate required in radians |
zrotate | The z rotate required in radians |
Definition at line 1595 of file ShapeFactory.cpp.
References generateXRotation(), generateYRotation(), and generateZRotation().
Referenced by createShape(), parseCuboid(), parseCylinder(), parseHexahedron(), parseHollowCylinder(), parseInfiniteCylinder(), parseInfinitePlane(), parseSliceOfCylinderRing(), parseTaperedGuide(), and Mantid::DataHandling::MeshFileIO::rotate().
|
static |
Generates the x component of the rotate matrix.
xrotate | The x rotate required in radians |
Definition at line 1608 of file ShapeFactory.cpp.
Referenced by generateMatrix().
|
static |
Generates the y component of the rotate matrix.
yrotate | The y rotate required in radians |
Definition at line 1620 of file ShapeFactory.cpp.
Referenced by generateMatrix().
|
static |
Generates the z component of the rotate matrix.
zrotate | The z rotate required in radians |
Definition at line 1632 of file ShapeFactory.cpp.
Referenced by generateMatrix().
|
private |
Return value of attribute to XML element.
It is an extension of poco's getAttribute method, which in addition check that this attribute exists and if not throws an error.
pElem | :: XML from instrument def. file |
name | :: Name of subelement |
std::invalid_argument | Thrown if issues with XML string |
Definition at line 1404 of file ShapeFactory.cpp.
Referenced by createShape(), parseCone(), parseCuboid(), parseCylinder(), parseHollowCylinder(), parseInfiniteCone(), parseInfiniteCylinder(), parseSliceOfCylinderRing(), parseSphere(), parseTaperedGuide(), and parseTorus().
|
private |
Return a subelement of an XML element.
The subelement is optional so it may not exist, but we also check that there is never more than one.
pElem | :: XML from instrument definition file. |
name | :: Name of the subelement. |
std::invalid_argument | if XML string is invalid. |
Definition at line 1381 of file ShapeFactory.cpp.
Referenced by createGeometryHandler(), parseCuboid(), parseCylinder(), parseHexahedron(), parseHollowCylinder(), parseInfiniteCylinder(), parseInfinitePlane(), parseSliceOfCylinderRing(), parseSphere(), and parseTaperedGuide().
|
private |
Return a subelement of an XML element, but also checks that there exist exactly one entry of this subelement.
pElem | :: XML from instrument def. file |
name | :: Name of subelement |
std::invalid_argument | Thrown if issues with XML string |
Definition at line 1358 of file ShapeFactory.cpp.
Referenced by createGeometryHandler(), createShape(), parseCone(), parseCylinder(), parseHexahedron(), parseHollowCylinder(), parseInfiniteCone(), parseInfiniteCylinder(), parseInfinitePlane(), parseSliceOfCylinderRing(), parseSphere(), parseTaperedGuide(), and parseTorus().
|
private |
Parse XML 'cone' element.
pElem | :: XML 'cone' element from instrument def. file |
prim | :: To add shapes to |
l_id | :: When shapes added to the map prim l_id is the continuous incremented index |
InstrumentDefinitionError | Thrown if issues with the content of XML instrument file |
Definition at line 891 of file ShapeFactory.cpp.
References getDoubleAttribute(), getShapeElement(), height, Mantid::Kernel::normalize(), and parsePosition().
Referenced by createShape().
|
private |
Get the four corners of a cuboid from an XML element.
The XML may consist of one of the two available syntaxes. We disallow a mixture of syntaxes.
pElem | :: XML 'cuboid' element from instrument definition file. |
std::invalid_argument | if XML string is invalid. |
Definition at line 649 of file ShapeFactory.cpp.
References generateMatrix(), getDoubleAttribute(), getOptionalShapeElement(), Mantid::Geometry::CuboidCorners::lbb, Mantid::Geometry::CuboidCorners::lfb, Mantid::Geometry::CuboidCorners::lft, m_gonioRotateMatrix, m_rotateAllMatrix, Mantid::Kernel::normalize(), parsePosition(), Mantid::Geometry::CuboidCorners::rfb, Mantid::Kernel::V3D::rotate(), Mantid::Kernel::Quat::rotate(), and Mantid::Geometry::CuboidCorners::rotatePoints().
Referenced by createGeometryHandler(), createShape(), and parseCuboid().
|
private |
Parse XML 'cuboid' element.
pElem | :: XML 'cuboid' element from instrument def. file |
prim | :: To add shapes to |
l_id | :: When shapes added to the map prim l_id is the continuous incremented index |
InstrumentDefinitionError | Thrown if issues with the content of XML instrument file |
Definition at line 756 of file ShapeFactory.cpp.
References Mantid::Kernel::normalize(), and parseCuboid().
|
private |
Parse XML 'cylinder' element.
pElem | :: XML 'cylinder' element from instrument def. file |
prim | :: To add shapes to |
l_id | :: When shapes added to the map prim l_id is the continuous incremented index |
InstrumentDefinitionError | Thrown if issues with the content of XML instrument file |
Definition at line 474 of file ShapeFactory.cpp.
References generateMatrix(), getDoubleAttribute(), getOptionalShapeElement(), getShapeElement(), height, m_gonioRotateMatrix, m_rotateAllMatrix, Mantid::Kernel::normalize(), parsePosition(), radius, and Mantid::Kernel::V3D::rotate().
Referenced by createShape().
|
private |
Get all corners of a hexahedron from an XML element.
pElem | :: XML 'hexahedron' element from instrument definition file. |
std::invalid_argument | if XML string is invalid. |
Definition at line 1016 of file ShapeFactory.cpp.
References generateMatrix(), getOptionalShapeElement(), getShapeElement(), Mantid::Geometry::Hexahedron::lbb, Mantid::Geometry::Hexahedron::lbt, Mantid::Geometry::Hexahedron::lfb, Mantid::Geometry::Hexahedron::lft, m_gonioRotateMatrix, m_rotateAllMatrix, parsePosition(), Mantid::Geometry::Hexahedron::rbb, Mantid::Geometry::Hexahedron::rbt, Mantid::Geometry::Hexahedron::rfb, Mantid::Geometry::Hexahedron::rft, and Mantid::Geometry::Hexahedron::rotatePoints().
Referenced by createGeometryHandler(), createShape(), and parseHexahedron().
|
private |
Parse XML 'hexahedron' element.
pElem | :: XML 'hexahedron' element from instrument def. file |
prim | :: To add shapes to |
l_id | :: When shapes added to the map prim l_id is the continuous incremented index |
InstrumentDefinitionError | Thrown if issues with the content of XML instrument file |
Definition at line 1095 of file ShapeFactory.cpp.
References parseHexahedron(), and parseHexahedronFromStruct().
|
staticprivate |
The "tapered-guide" shape is actually a special case of hexahedron; once we have the 8 points that make up either shape, the process of parsing them can be exactly the same in both cases.
Definition at line 940 of file ShapeFactory.cpp.
References Mantid::Geometry::Hexahedron::lbb, Mantid::Geometry::Hexahedron::lbt, Mantid::Geometry::Hexahedron::lfb, Mantid::Geometry::Hexahedron::lft, Mantid::Geometry::Hexahedron::rbb, Mantid::Geometry::Hexahedron::rfb, and Mantid::Geometry::Hexahedron::rft.
Referenced by createHexahedralShape(), parseHexahedron(), and parseTaperedGuide().
|
private |
Parse XML 'hollow-cylinder' element.
pElem | :: XML 'hollow-cylinder' element from instrument def. file |
prim | :: To add shapes to |
l_id | :: When shapes added to the map prim l_id is the continuous incremented index |
InstrumentDefinitionError | Thrown if issues with the content of XML instrument file |
Definition at line 553 of file ShapeFactory.cpp.
References generateMatrix(), getDoubleAttribute(), getOptionalShapeElement(), getShapeElement(), height, innerRadius, m_gonioRotateMatrix, m_rotateAllMatrix, Mantid::Kernel::normalize(), parsePosition(), and Mantid::Kernel::V3D::rotate().
Referenced by createShape().
|
private |
Parse XML 'infinite-cone' element.
pElem | :: XML 'infinite-cone' element from instrument def. file |
prim | :: To add shapes to |
l_id | :: When shapes added to the map prim l_id is the continuous incremented index |
InstrumentDefinitionError | Thrown if issues with the content of XML instrument file |
Definition at line 848 of file ShapeFactory.cpp.
References getDoubleAttribute(), getShapeElement(), Mantid::Kernel::normalize(), and parsePosition().
Referenced by createShape().
|
private |
Parse XML 'infinite-cylinder' element.
pElem | :: XML 'infinite-cylinder' element from instrument def. file |
prim | :: To add shapes to |
l_id | :: When shapes added to the map prim l_id is the continuous incremented index |
InstrumentDefinitionError | Thrown if issues with the content of XML instrument file |
Definition at line 418 of file ShapeFactory.cpp.
References generateMatrix(), getDoubleAttribute(), getOptionalShapeElement(), getShapeElement(), m_gonioRotateMatrix, m_rotateAllMatrix, Mantid::Kernel::normalize(), parsePosition(), radius, and Mantid::Kernel::V3D::rotate().
Referenced by createShape().
|
private |
Parse XML 'infinite-plane' element.
pElem | :: XML 'infinite-plane' element from instrument def. file |
prim | :: To add shapes to |
l_id | :: When shapes added to the map prim l_id is the continuous incremented index |
InstrumentDefinitionError | Thrown if issues with the content of XML instrument file |
Definition at line 368 of file ShapeFactory.cpp.
References generateMatrix(), getOptionalShapeElement(), getShapeElement(), m_gonioRotateMatrix, m_rotateAllMatrix, Mantid::Kernel::normalize(), parsePosition(), and Mantid::Kernel::V3D::rotate().
Referenced by createShape().
|
private |
Get position coordinates from XML element.
pElem | :: XML element whose attributes contain position coordinates |
Definition at line 1417 of file ShapeFactory.cpp.
References Mantid::Kernel::V3D::spherical(), Mantid::Geometry::x, Mantid::Geometry::y, and Mantid::Geometry::z.
Referenced by createGeometryHandler(), createShape(), parseCone(), parseCuboid(), parseCylinder(), parseHexahedron(), parseHollowCylinder(), parseInfiniteCone(), parseInfiniteCylinder(), parseInfinitePlane(), parseSliceOfCylinderRing(), parseSphere(), parseTaperedGuide(), and parseTorus().
|
private |
Parse XML 'slice-of-cylinder-ring' element.
pElem | :: XML 'slice-of-cylinder-ring' element from instrument def. file |
prim | :: To add shapes to |
l_id | :: When shapes added to the map prim l_id is the continuous incremented index |
InstrumentDefinitionError | Thrown if issues with the content of XML instrument file |
Definition at line 1246 of file ShapeFactory.cpp.
References Mantid::Geometry::g_log, generateMatrix(), getDoubleAttribute(), getOptionalShapeElement(), getShapeElement(), innerRadius, m_gonioRotateMatrix, m_rotateAllMatrix, parsePosition(), Mantid::Kernel::V3D::rotate(), and Mantid::Kernel::Logger::warning().
Referenced by createShape().
|
private |
Parse XML 'sphere' element.
pElem | :: XML 'sphere' element from instrument def. file |
prim | :: To add shapes to |
l_id | :: When shapes added to the map prim l_id is the continuous incremented index |
InstrumentDefinitionError | Thrown if issues with the content of XML instrument file |
Definition at line 326 of file ShapeFactory.cpp.
References getDoubleAttribute(), getOptionalShapeElement(), getShapeElement(), m_gonioRotateMatrix, m_rotateAllMatrix, parsePosition(), radius, Mantid::Kernel::V3D::rotate(), and sphereAlgebra().
Referenced by createShape().
|
private |
Parse XML 'tapered-guide' element, which is a special case of the XML 'hexahedron' element.
pElem | :: XML 'hexahedron' element from instrument def. file |
prim | :: To add shapes to |
l_id | :: When shapes added to the map prim l_id is the continuous incremented index |
InstrumentDefinitionError | Thrown if issues with the content of XML instrument file |
Definition at line 1114 of file ShapeFactory.cpp.
References generateMatrix(), getDoubleAttribute(), getOptionalShapeElement(), getShapeElement(), Mantid::Geometry::Hexahedron::lbb, Mantid::Geometry::Hexahedron::lbt, Mantid::Geometry::Hexahedron::lfb, Mantid::Geometry::Hexahedron::lft, m_gonioRotateMatrix, m_rotateAllMatrix, Mantid::Kernel::normalize(), parseHexahedronFromStruct(), parsePosition(), Mantid::Geometry::Hexahedron::rbb, Mantid::Geometry::Hexahedron::rbt, Mantid::Geometry::Hexahedron::rfb, Mantid::Geometry::Hexahedron::rft, Mantid::Kernel::V3D::rotate(), Mantid::Kernel::Quat::rotate(), and Mantid::Geometry::Hexahedron::rotatePoints().
Referenced by createShape().
|
private |
Parse XML 'torus' element.
pElem | :: XML 'torus' element from instrument def. file |
prim | :: To add shapes to |
l_id | :: When shapes added to the map prim l_id is the continuous incremented index |
InstrumentDefinitionError | Thrown if issues with the content of XML instrument file |
Definition at line 1206 of file ShapeFactory.cpp.
References getDoubleAttribute(), getShapeElement(), Mantid::Kernel::normalize(), and parsePosition().
Referenced by createShape().
|
staticprivate |
Create the algebra string for a Sphere.
surfaceID | ID of surface in map lookup |
Definition at line 355 of file ShapeFactory.cpp.
References std::to_string().
Referenced by createSphere(), and parseSphere().
|
private |
Definition at line 132 of file ShapeFactory.h.
Referenced by createShape(), parseCuboid(), parseCylinder(), parseHexahedron(), parseHollowCylinder(), parseInfiniteCylinder(), parseInfinitePlane(), parseSliceOfCylinderRing(), parseSphere(), and parseTaperedGuide().
|
private |
Definition at line 133 of file ShapeFactory.h.
Referenced by createShape(), parseCuboid(), parseCylinder(), parseHexahedron(), parseHollowCylinder(), parseInfiniteCylinder(), parseInfinitePlane(), parseSliceOfCylinderRing(), parseSphere(), and parseTaperedGuide().