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

Object Component class, this class brings together the physical attributes of the component to the positioning and geometry tree. More...

#include <IObjComponent.h>

Inheritance diagram for Mantid::Geometry::IObjComponent:
Mantid::Geometry::IComponent Mantid::Geometry::GridDetector Mantid::Geometry::IDetector Mantid::Geometry::ObjComponent Mantid::Geometry::StructuredDetector Mantid::Geometry::RectangularDetector Mantid::Geometry::Detector Mantid::Geometry::DetectorGroup Mantid::Geometry::Detector Mantid::Geometry::ObjCompAssembly Mantid::Geometry::GridDetectorPixel Mantid::Geometry::GridDetectorPixel

Public Member Functions

IComponentclone () const override=0
 Virtual Copy Constructor. More...
 
virtual void draw () const =0
 Draws the objcomponent. More...
 
virtual void drawObject () const =0
 Draws the Object. More...
 
virtual int getPointInObject (Kernel::V3D &point) const =0
 Try to find a point that lies within (or on) the object. More...
 
GeometryHandlerHandle () const
 Gets the GeometryHandler. More...
 
virtual void initDraw () const =0
 Initializes the ObjComponent for rendering, this function should be called before rendering. More...
 
virtual int interceptSurface (Track &track) const =0
 Checks whether the track given will pass through this Component. More...
 
 IObjComponent ()
 
 IObjComponent (const IObjComponent &)
 Copy constructor. More...
 
 IObjComponent (GeometryHandler *the_handler)
 Constructor, specifying the GeometryHandler (renderer engine) for this IObjComponent. More...
 
virtual bool isOnSide (const Kernel::V3D &point) const =0
 Does the point given lie on the surface of this object component? More...
 
virtual bool isValid (const Kernel::V3D &point) const =0
 Does the point given lie within this object component? More...
 
virtual const Kernel::Material material () const =0
 Returns the material of the Object. More...
 
IObjComponentoperator= (const IObjComponent &rhs)
 Assignment operator. More...
 
virtual const std::shared_ptr< const IObjectshape () const =0
 Returns the shape of the Object. More...
 
virtual double solidAngle (const Kernel::V3D &observer) const =0
 Finds the approximate solid angle covered by the component when viewed from the point given. More...
 
std::string type () const override
 type string More...
 
 ~IObjComponent () override
 
- 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

void setGeometryHandler (GeometryHandler *h)
 Reset the current geometry handler. More...
 

Private Attributes

std::unique_ptr< GeometryHandlerhandle
 Geometry Handle for rendering. More...
 

Friends

class GeometryHandler
 

Detailed Description

Object Component class, this class brings together the physical attributes of the component to the positioning and geometry tree.

Notably, this contains a GeometryHandler and methods used to render the component in the instrument 3D view.

Author
Laurent C Chapon, ISIS, RAL
Date
26/09/2007
Author
Russell Taylor, Tessella Support Services plc
Date
26/06/2008

Definition at line 37 of file IObjComponent.h.

Constructor & Destructor Documentation

◆ IObjComponent() [1/3]

Mantid::Geometry::IObjComponent::IObjComponent ( )

Definition at line 15 of file IObjComponent.cpp.

References handle.

◆ IObjComponent() [2/3]

Mantid::Geometry::IObjComponent::IObjComponent ( GeometryHandler the_handler)

Constructor, specifying the GeometryHandler (renderer engine) for this IObjComponent.

Definition at line 20 of file IObjComponent.cpp.

References handle.

◆ IObjComponent() [3/3]

Mantid::Geometry::IObjComponent::IObjComponent ( const IObjComponent )

Copy constructor.

Definition at line 40 of file IObjComponent.cpp.

References handle.

◆ ~IObjComponent()

Mantid::Geometry::IObjComponent::~IObjComponent ( )
overridedefault

Member Function Documentation

◆ clone()

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

◆ draw()

virtual void Mantid::Geometry::IObjComponent::draw ( ) const
pure virtual

◆ drawObject()

virtual void Mantid::Geometry::IObjComponent::drawObject ( ) const
pure virtual

◆ getPointInObject()

virtual int Mantid::Geometry::IObjComponent::getPointInObject ( Kernel::V3D point) const
pure virtual

Try to find a point that lies within (or on) the object.

Implemented in Mantid::Geometry::DetectorGroup, Mantid::Geometry::GridDetector, Mantid::Geometry::ObjComponent, and Mantid::Geometry::StructuredDetector.

◆ Handle()

GeometryHandler * Mantid::Geometry::IObjComponent::Handle ( ) const
inline

◆ initDraw()

virtual void Mantid::Geometry::IObjComponent::initDraw ( ) const
pure virtual

Initializes the ObjComponent for rendering, this function should be called before rendering.

Implemented in Mantid::Geometry::DetectorGroup, Mantid::Geometry::GridDetector, Mantid::Geometry::ObjComponent, and Mantid::Geometry::StructuredDetector.

◆ interceptSurface()

virtual int Mantid::Geometry::IObjComponent::interceptSurface ( Track track) const
pure virtual

◆ isOnSide()

virtual bool Mantid::Geometry::IObjComponent::isOnSide ( const Kernel::V3D point) const
pure virtual

Does the point given lie on the surface of this object component?

Implemented in Mantid::Geometry::DetectorGroup, Mantid::Geometry::GridDetector, Mantid::Geometry::ObjComponent, and Mantid::Geometry::StructuredDetector.

◆ isValid()

virtual bool Mantid::Geometry::IObjComponent::isValid ( const Kernel::V3D point) const
pure virtual

◆ material()

virtual const Kernel::Material Mantid::Geometry::IObjComponent::material ( ) const
pure virtual

◆ operator=()

IObjComponent & Mantid::Geometry::IObjComponent::operator= ( const IObjComponent rhs)

Assignment operator.

Parameters
rhsThe rvalue to copy into this object
Returns
A reference to this object

Definition at line 50 of file IObjComponent.cpp.

References handle, and rhs.

◆ setGeometryHandler()

void Mantid::Geometry::IObjComponent::setGeometryHandler ( GeometryHandler h)
protected

Reset the current geometry handler.

Set the geometry handler for IObjComponent.

Parameters
[in]his pointer to the geometry handler. don't delete this pointer in the calling function.

Definition at line 31 of file IObjComponent.cpp.

References handle.

Referenced by Mantid::Geometry::GridDetector::GridDetector(), Mantid::Geometry::StructuredDetector::init(), and Mantid::Geometry::RectangularDetector::RectangularDetector().

◆ shape()

virtual const std::shared_ptr< const IObject > Mantid::Geometry::IObjComponent::shape ( ) const
pure virtual

◆ solidAngle()

virtual double Mantid::Geometry::IObjComponent::solidAngle ( const Kernel::V3D observer) const
pure virtual

Finds the approximate solid angle covered by the component when viewed from the point given.

Implemented in Mantid::Geometry::DetectorGroup, Mantid::Geometry::GridDetector, Mantid::Geometry::ObjComponent, and Mantid::Geometry::StructuredDetector.

Referenced by export_IDetector(), and Mantid::Algorithms::SolidAngleHelpers::GenericShape::solidAngle().

◆ type()

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

type string

Reimplemented from Mantid::Geometry::IComponent.

Definition at line 40 of file IObjComponent.h.

Friends And Related Function Documentation

◆ GeometryHandler

friend class GeometryHandler
friend

Member Data Documentation

◆ handle

std::unique_ptr<GeometryHandler> Mantid::Geometry::IObjComponent::handle
private

Geometry Handle for rendering.

Definition at line 100 of file IObjComponent.h.

Referenced by IObjComponent(), operator=(), and setGeometryHandler().


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