|
Mantid
|
Class for Assembly of geometric components. More...
#include <ICompAssembly.h>
Public Member Functions | |
| virtual int | add (IComponent *)=0 |
| Add a component to the assembly. More... | |
| virtual int | addCopy (IComponent *)=0 |
| Add a copy (clone) of a component. More... | |
| virtual int | addCopy (IComponent *, const std::string &)=0 |
| Add a copy (clone) of a component and rename it. More... | |
| IComponent * | clone () const override=0 |
| Make a clone of the present component. More... | |
| virtual std::shared_ptr< IComponent > | getChild (const int i) const =0 |
| Get a pointer to the ith component within the assembly. More... | |
| virtual void | getChildren (std::vector< IComponent_const_sptr > &outVector, bool recursive) const =0 |
| Get all children. More... | |
| virtual std::shared_ptr< const IComponent > | getComponentByName (const std::string &cname, int nlevels=0) const =0 |
| Returns a pointer to the first component of assembly encountered with the given name. More... | |
| ICompAssembly () | |
| virtual int | nelements () const =0 |
| Return the number of elements in the assembly. More... | |
| virtual std::shared_ptr< IComponent > | operator[] (int i) const =0 |
| Overloaded index operator. More... | |
| virtual void | printChildren (std::ostream &) const =0 |
| Print information about all children. More... | |
| virtual void | printTree (std::ostream &) const =0 |
| Print information about all the elements in the tree to a stream Loops through all components in the tree and call printSelf(os). More... | |
| virtual void | testIntersectionWithChildren (Track &testRay, std::deque< IComponent_const_sptr > &searchQueue) const =0 |
| Test the intersection of the ray with the children of the component assembly. More... | |
| std::string | type () const override |
| String description of the type of component. More... | |
Public Member Functions inherited from Mantid::Geometry::IComponent | |
| virtual IComponent * | clone () const =0 |
| Return a clone to the current object. More... | |
| virtual std::vector< std::shared_ptr< const IComponent > > | getAncestors () const =0 |
| Return an array of all ancestors, the nearest first. More... | |
| virtual const IComponent * | getBareParent () const =0 |
| Returns the bare pointer to the IComponent parent. More... | |
| virtual IComponent const * | getBaseComponent () const =0 |
| Returns const pointer to base component if this component is parametrized. More... | |
| virtual void | getBoundingBox (BoundingBox &boundingBox) const =0 |
| Get the bounding box for this component and store it in the given argument. More... | |
| virtual ComponentID | getComponentID () const =0 |
| Returns the ComponentID - a unique identifier of the component. More... | |
| virtual double | getDistance (const IComponent &) const =0 |
| Get the distance to another IComponent. More... | |
| virtual std::string | getFullName () const =0 |
| Get the IComponent full path name. More... | |
| virtual std::string | getName () const =0 |
| Get the IComponent name. More... | |
| virtual std::shared_ptr< const IComponent > | getParent () const =0 |
| Return a pointer to the current parent. More... | |
| virtual Kernel::V3D | getPos () const =0 |
| Get the position of the IComponent. Tree structure is traverse through the. More... | |
| virtual Kernel::V3D | getRelativePos () const =0 |
| Get the position relative to the parent IComponent (absolute if no parent) More... | |
| virtual Kernel::Quat | getRelativeRot () const =0 |
| Get the relative Orientation. More... | |
| virtual Kernel::Quat | getRotation () const =0 |
| Get the absolute orientation of the IComponent. More... | |
| virtual Kernel::V3D | getScaleFactor () const |
| Gets the scaling factor of the object for the Object Component. More... | |
| virtual void | rotate (const Kernel::Quat &)=0 |
| Rotate the IComponent. This is relative to parent. More... | |
| virtual void | rotate (double, const Kernel::V3D &)=0 |
| Rotate the IComponent by an angle in degrees with respect to an axis. More... | |
| virtual void | setName (const std::string &)=0 |
| Set the IComponent name. More... | |
| virtual void | setParent (IComponent *)=0 |
| Assign a parent IComponent. Previous parent link is lost. More... | |
| virtual void | setPos (const Kernel::V3D &)=0 |
| Set the position of the component The position is with respect to the parent component. More... | |
| virtual void | setPos (double, double, double)=0 |
| Set the IComponent position, x, y, z respective to parent (if present) More... | |
| virtual void | setRot (const Kernel::Quat &)=0 |
| Set the orientation Kernel::Quaternion relative to parent (if present) More... | |
| virtual void | translate (const Kernel::V3D &)=0 |
| Copy the Rotation from another IComponent. More... | |
| virtual void | translate (double, double, double)=0 |
| Translate the IComponent (x,y,z form). This is relative to parent if. More... | |
| virtual std::string | type () const |
| Returns a string representation of the IComponent type. More... | |
| virtual | ~IComponent ()=default |
| Destructor. More... | |
| virtual std::set< std::string > | getParameterNames (bool recursive=true) const =0 |
| Return the names of the parameters for this component. More... | |
| virtual std::map< std::string, ComponentID > | getParameterNamesByComponent () const =0 |
| return the parameter names and the component they are from More... | |
| virtual bool | hasParameter (const std::string &name, bool recursive=true) const =0 |
| Returns a boolean indicating if the component has the named parameter. More... | |
| virtual std::string | getParameterType (const std::string &pname, bool recursive=true) const =0 |
| virtual std::vector< double > | getNumberParameter (const std::string &pname, bool recursive=true) const =0 |
| Get a parameter defined as a double. More... | |
| virtual std::vector< Kernel::V3D > | getPositionParameter (const std::string &pname, bool recursive=true) const =0 |
| Get a parameter defined as a Kernel::V3D. More... | |
| virtual std::vector< Kernel::Quat > | getRotationParameter (const std::string &pname, bool recursive=true) const =0 |
| Get a parameter defined as a Kernel::Quaternion. More... | |
| virtual std::vector< std::string > | getStringParameter (const std::string &pname, bool recursive=true) const =0 |
| Get a parameter defined as a string. More... | |
| virtual std::vector< int > | getIntParameter (const std::string &pname, bool recursive=true) const =0 |
| Get a parameter defined as an integer. More... | |
| virtual std::vector< bool > | getBoolParameter (const std::string &pname, bool recursive=true) const =0 |
| Get a parameter defined as a boolean. More... | |
| virtual std::string | getParameterAsString (const std::string &pname, bool recursive=true) const =0 |
| get a string representation of a parameter More... | |
| virtual bool | getParameterVisible (const std::string &pname, bool recursive=true) const =0 |
| get visibility attribute of a parameter More... | |
| virtual void | printSelf (std::ostream &) const =0 |
| Prints a text representation of itself. More... | |
| virtual bool | isParametrized () const =0 |
| Returns true if the Component is parametrized (has a parameter map) More... | |
| virtual size_t | registerContents (class ComponentVisitor &component) const =0 |
Protected Member Functions | |
| ICompAssembly (const ICompAssembly &)=default | |
| Protected copy constructor. More... | |
Private Member Functions | |
| ICompAssembly & | operator= (const ICompAssembly &)=delete |
Class for Assembly of geometric components.
CompAssembly allows Components to be positioned in a hierarchical structure in the form of a tree. CompAssembly inherits from component.
Definition at line 30 of file ICompAssembly.h.
|
inline |
Definition at line 34 of file ICompAssembly.h.
|
protecteddefault |
Protected copy constructor.
|
pure virtual |
Add a component to the assembly.
Implemented in Mantid::Geometry::CompAssembly, Mantid::Geometry::ObjCompAssembly, and Mantid::Geometry::Instrument.
Referenced by Mantid::Geometry::InstrumentDefinitionParser::appendLeaf(), Mantid::Geometry::CompAssembly::CompAssembly(), Mantid::Geometry::InstrumentDefinitionParser::createDetectorOrMonitor(), Mantid::Geometry::InstrumentDefinitionParser::getAbsolutPositionInCompCoorSys(), and Mantid::Geometry::ObjCompAssembly::ObjCompAssembly().
|
pure virtual |
Add a copy (clone) of a component.
Implemented in Mantid::Geometry::CompAssembly, and Mantid::Geometry::ObjCompAssembly.
|
pure virtual |
Add a copy (clone) of a component and rename it.
Implemented in Mantid::Geometry::CompAssembly, and Mantid::Geometry::ObjCompAssembly.
|
overridepure virtual |
Make a clone of the present component.
Implements Mantid::Geometry::IComponent.
Implemented in Mantid::Geometry::Instrument, Mantid::Geometry::CompAssembly, Mantid::Geometry::GridDetector, Mantid::Geometry::ObjCompAssembly, Mantid::Geometry::RectangularDetector, and Mantid::Geometry::StructuredDetector.
|
pure virtual |
Get a pointer to the ith component within the assembly.
Easier to use than [] when you have a pointer
Implemented in Mantid::Geometry::Instrument, Mantid::Geometry::CompAssembly, and Mantid::Geometry::ObjCompAssembly.
|
pure virtual |
Get all children.
Implemented in Mantid::Geometry::CompAssembly, and Mantid::Geometry::ObjCompAssembly.
Referenced by Mantid::Geometry::Instrument::getDetectorsInBank(), and Mantid::Geometry::InstrumentVisitor::registerComponentAssembly().
|
pure virtual |
Returns a pointer to the first component of assembly encountered with the given name.
Implemented in Mantid::Geometry::CompAssembly, Mantid::Geometry::GridDetector, Mantid::Geometry::ObjCompAssembly, and Mantid::Geometry::StructuredDetector.
|
pure virtual |
Return the number of elements in the assembly.
Implemented in Mantid::Geometry::CompAssembly, and Mantid::Geometry::ObjCompAssembly.
Referenced by export_ICompAssembly().
|
privatedelete |
|
pure virtual |
Overloaded index operator.
Get a pointer to the ith component in the assembly
Implemented in Mantid::Geometry::CompAssembly, and Mantid::Geometry::ObjCompAssembly.
|
pure virtual |
Print information about all children.
Implemented in Mantid::Geometry::CompAssembly, and Mantid::Geometry::ObjCompAssembly.
|
pure virtual |
Print information about all the elements in the tree to a stream Loops through all components in the tree and call printSelf(os).
Implemented in Mantid::Geometry::CompAssembly, and Mantid::Geometry::ObjCompAssembly.
|
pure virtual |
Test the intersection of the ray with the children of the component assembly.
Implemented in Mantid::Geometry::ObjCompAssembly, Mantid::Geometry::CompAssembly, Mantid::Geometry::GridDetector, and Mantid::Geometry::RectangularDetector.
|
inlineoverridevirtual |
String description of the type of component.
Reimplemented from Mantid::Geometry::IComponent.
Reimplemented in Mantid::Geometry::Instrument, Mantid::Geometry::CompAssembly, Mantid::Geometry::GridDetector, Mantid::Geometry::ObjCompAssembly, Mantid::Geometry::RectangularDetector, and Mantid::Geometry::StructuredDetector.
Definition at line 36 of file ICompAssembly.h.