Mantid
|
Object Component class, this class brings together the physical attributes of the component to the positioning and geometry tree. More...
#include <IObjComponent.h>
Public Member Functions | |
IComponent * | clone () 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... | |
GeometryHandler * | Handle () 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... | |
IObjComponent & | operator= (const IObjComponent &rhs) |
Assignment operator. More... | |
virtual const std::shared_ptr< const IObject > | shape () 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 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 | |
void | setGeometryHandler (GeometryHandler *h) |
Reset the current geometry handler. More... | |
Private Attributes | |
std::unique_ptr< GeometryHandler > | handle |
Geometry Handle for rendering. More... | |
Friends | |
class | GeometryHandler |
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.
Definition at line 37 of file IObjComponent.h.
Mantid::Geometry::IObjComponent::IObjComponent | ( | ) |
Definition at line 15 of file IObjComponent.cpp.
References handle.
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.
Mantid::Geometry::IObjComponent::IObjComponent | ( | const IObjComponent & | ) |
|
overridedefault |
|
overridepure virtual |
Virtual Copy Constructor.
Implements Mantid::Geometry::IComponent.
Implemented in Mantid::Geometry::Detector, Mantid::Geometry::DetectorGroup, Mantid::Geometry::GridDetector, Mantid::Geometry::ObjCompAssembly, Mantid::Geometry::ObjComponent, Mantid::Geometry::RectangularDetector, and Mantid::Geometry::StructuredDetector.
|
pure virtual |
Draws the objcomponent.
Implemented in Mantid::Geometry::DetectorGroup, Mantid::Geometry::GridDetector, Mantid::Geometry::ObjComponent, and Mantid::Geometry::StructuredDetector.
|
pure virtual |
Draws the Object.
Implemented in Mantid::Geometry::DetectorGroup, Mantid::Geometry::GridDetector, Mantid::Geometry::ObjComponent, and Mantid::Geometry::StructuredDetector.
|
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.
|
inline |
Gets the GeometryHandler.
Definition at line 92 of file IObjComponent.h.
Referenced by Mantid::Geometry::GridDetector::draw(), Mantid::Geometry::ObjComponent::draw(), Mantid::Geometry::StructuredDetector::draw(), Mantid::Geometry::GridDetector::initDraw(), Mantid::Geometry::ObjComponent::initDraw(), and Mantid::Geometry::StructuredDetector::initDraw().
|
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.
|
pure virtual |
Checks whether the track given will pass through this Component.
Implemented in Mantid::Geometry::DetectorGroup, Mantid::Geometry::GridDetector, Mantid::Geometry::ObjComponent, and Mantid::Geometry::StructuredDetector.
|
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.
|
pure virtual |
Does the point given lie within this object component?
Implemented in Mantid::Geometry::DetectorGroup, Mantid::Geometry::GridDetector, Mantid::Geometry::ObjComponent, and Mantid::Geometry::StructuredDetector.
|
pure virtual |
Returns the material of the Object.
Implemented in Mantid::Geometry::DetectorGroup, Mantid::Geometry::GridDetector, Mantid::Geometry::ObjComponent, Mantid::Geometry::RectangularDetector, and Mantid::Geometry::StructuredDetector.
IObjComponent & Mantid::Geometry::IObjComponent::operator= | ( | const IObjComponent & | rhs | ) |
Assignment operator.
rhs | The rvalue to copy into this object |
Definition at line 50 of file IObjComponent.cpp.
|
protected |
Reset the current geometry handler.
Set the geometry handler for IObjComponent.
[in] | h | is 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().
|
pure virtual |
Returns the shape of the Object.
Implemented in Mantid::Geometry::DetectorGroup, Mantid::Geometry::GridDetector, Mantid::Geometry::ObjComponent, and Mantid::Geometry::StructuredDetector.
Referenced by Mantid::Algorithms::VesuvioL1ThetaResolution::calculateDetector(), Mantid::Algorithms::DetectorEfficiencyCor::getDetectorGeometry(), Mantid::Algorithms::He3TubeEfficiency::getDetectorGeometry(), Mantid::Geometry::InstrumentVisitor::registerDetector(), Mantid::Geometry::InstrumentVisitor::registerGenericObjComponent(), and Mantid::Geometry::InstrumentVisitor::registerInfiniteObjComponent().
|
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().
|
inlineoverridevirtual |
type string
Reimplemented from Mantid::Geometry::IComponent.
Definition at line 40 of file IObjComponent.h.
|
friend |
Definition at line 102 of file IObjComponent.h.
Referenced by Mantid::Geometry::GridDetector::GridDetector(), and Mantid::Geometry::StructuredDetector::init().
|
private |
Geometry Handle for rendering.
Definition at line 100 of file IObjComponent.h.
Referenced by IObjComponent(), operator=(), and setGeometryHandler().