Mantid
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
Mantid::Geometry::ICompAssembly Class Referenceabstract

Class for Assembly of geometric components. More...

#include <ICompAssembly.h>

Inheritance diagram for Mantid::Geometry::ICompAssembly:
Mantid::Geometry::IComponent Mantid::Geometry::CompAssembly Mantid::Geometry::ObjCompAssembly Mantid::Geometry::GridDetector Mantid::Geometry::Instrument Mantid::Geometry::StructuredDetector Mantid::Geometry::RectangularDetector

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...
 
IComponentclone () const override=0
 Make a clone of the present component. More...
 
virtual std::shared_ptr< IComponentgetChild (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 IComponentgetComponentByName (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< IComponentoperator[] (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 IComponentclone () 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 IComponentgetBareParent () 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 IComponentgetParent () 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, ComponentIDgetParameterNamesByComponent () 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::V3DgetPositionParameter (const std::string &pname, bool recursive=true) const =0
 Get a parameter defined as a Kernel::V3D. More...
 
virtual std::vector< Kernel::QuatgetRotationParameter (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

ICompAssemblyoperator= (const ICompAssembly &)=delete
 

Detailed Description

Class for Assembly of geometric components.

Version
A
Author
Laurent C Chapon, ISIS RAL
Date
01/11/2007

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.

Constructor & Destructor Documentation

◆ ICompAssembly() [1/2]

Mantid::Geometry::ICompAssembly::ICompAssembly ( )
inline

Definition at line 34 of file ICompAssembly.h.

◆ ICompAssembly() [2/2]

Mantid::Geometry::ICompAssembly::ICompAssembly ( const ICompAssembly )
protecteddefault

Protected copy constructor.

Member Function Documentation

◆ add()

virtual int Mantid::Geometry::ICompAssembly::add ( IComponent )
pure virtual

◆ addCopy() [1/2]

virtual int Mantid::Geometry::ICompAssembly::addCopy ( IComponent )
pure virtual

Add a copy (clone) of a component.

Implemented in Mantid::Geometry::CompAssembly, and Mantid::Geometry::ObjCompAssembly.

◆ addCopy() [2/2]

virtual int Mantid::Geometry::ICompAssembly::addCopy ( IComponent ,
const std::string &   
)
pure virtual

Add a copy (clone) of a component and rename it.

Implemented in Mantid::Geometry::CompAssembly, and Mantid::Geometry::ObjCompAssembly.

◆ clone()

IComponent * Mantid::Geometry::ICompAssembly::clone ( ) const
overridepure virtual

◆ getChild()

virtual std::shared_ptr< IComponent > Mantid::Geometry::ICompAssembly::getChild ( const int  i) const
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.

◆ getChildren()

virtual void Mantid::Geometry::ICompAssembly::getChildren ( std::vector< IComponent_const_sptr > &  outVector,
bool  recursive 
) const
pure virtual

◆ getComponentByName()

virtual std::shared_ptr< const IComponent > Mantid::Geometry::ICompAssembly::getComponentByName ( const std::string &  cname,
int  nlevels = 0 
) const
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.

◆ nelements()

virtual int Mantid::Geometry::ICompAssembly::nelements ( ) const
pure virtual

Return the number of elements in the assembly.

Implemented in Mantid::Geometry::CompAssembly, and Mantid::Geometry::ObjCompAssembly.

Referenced by export_ICompAssembly().

◆ operator=()

ICompAssembly & Mantid::Geometry::ICompAssembly::operator= ( const ICompAssembly )
privatedelete

◆ operator[]()

virtual std::shared_ptr< IComponent > Mantid::Geometry::ICompAssembly::operator[] ( int  i) const
pure virtual

Overloaded index operator.

Get a pointer to the ith component in the assembly

Implemented in Mantid::Geometry::CompAssembly, and Mantid::Geometry::ObjCompAssembly.

◆ printChildren()

virtual void Mantid::Geometry::ICompAssembly::printChildren ( std::ostream &  ) const
pure virtual

Print information about all children.

Implemented in Mantid::Geometry::CompAssembly, and Mantid::Geometry::ObjCompAssembly.

◆ printTree()

virtual void Mantid::Geometry::ICompAssembly::printTree ( std::ostream &  ) const
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.

◆ testIntersectionWithChildren()

virtual void Mantid::Geometry::ICompAssembly::testIntersectionWithChildren ( Track testRay,
std::deque< IComponent_const_sptr > &  searchQueue 
) const
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.

◆ type()

std::string Mantid::Geometry::ICompAssembly::type ( ) const
inlineoverridevirtual

The documentation for this class was generated from the following file: