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

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

#include <ObjComponent.h>

Inheritance diagram for Mantid::Geometry::ObjComponent:
Mantid::Geometry::IObjComponent Mantid::Geometry::Component Mantid::Geometry::IComponent Mantid::Geometry::IComponent Mantid::Geometry::Detector Mantid::Geometry::ObjCompAssembly Mantid::Geometry::GridDetectorPixel

Public Member Functions

void boundingBox (double &xmax, double &ymax, double &zmax, double &xmin, double &ymin, double &zmin) const
 
IComponentclone () const override
 Virtual Copy Constructor. More...
 
void draw () const override
 Draws the objcomponent, If the handler is not set then this function does nothing. More...
 
void drawObject () const override
 Draws the Object. More...
 
void getBoundingBox (BoundingBox &absoluteBB) const override
 get bounding box, which may or may not be axis aligned; More...
 
virtual double getDepth () const
 get Depth (Z-dimension) value for component More...
 
virtual double getHeight () const
 get Height (Y-dimension) value for component More...
 
int getPointInObject (Kernel::V3D &point) const override
 Try to find a point that lies within (or on) the object. More...
 
virtual double getWidth () const
 get Width (X-dimension) value for component More...
 
void initDraw () const override
 Initializes the ObjComponent for rendering, this function should be called before rendering. More...
 
int interceptSurface (Track &track) const override
 Checks whether the track given will pass through this Component. More...
 
bool isOnSide (const Kernel::V3D &point) const override
 Does the point given lie on the surface of this object component? More...
 
bool isValid (const Kernel::V3D &point) const override
 Does the point given lie within this object component? More...
 
const Kernel::Material material () const override
 Return the material this component is made from. More...
 
 ObjComponent (const IComponent *base, const ParameterMap *map)
 Constructor for parametrized component. More...
 
 ObjComponent (const std::string &name, IComponent *parent=nullptr)
 Constructor. More...
 
 ObjComponent (const std::string &name, std::shared_ptr< const IObject > shape, IComponent *parent=nullptr)
 Constructor. More...
 
virtual size_t registerContents (class ComponentVisitor &componentVisitor) const override
 Register the contents of this ObjComponent. More...
 
void setShape (std::shared_ptr< const IObject > newShape)
 Set a new shape on the component void setShape(std::shared_ptr<const IObject> newShape);. More...
 
const std::shared_ptr< const IObjectshape () const override
 Return the shape of the component. More...
 
double solidAngle (const Kernel::V3D &observer) const override
 Finds the approximate solid angle covered by the component when viewed from the point given. More...
 
std::string type () const override
 type string More...
 
- Public Member Functions inherited from Mantid::Geometry::IObjComponent
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...
 
- Public Member Functions inherited from Mantid::Geometry::Component
IComponentclone () const override
 Clone method Make a copy of the Component. More...
 
 Component ()
 Create Empty Component at Origin, with no orientation and null parent. More...
 
 Component (const IComponent *base, const ParameterMap *map)
 Constructor for parametrized component. More...
 
 Component (std::string name, const Kernel::V3D &position, const Kernel::Quat &rotation, IComponent *parent=nullptr)
 Create a named component with positioning vector, orientation and parent. More...
 
 Component (std::string name, const Kernel::V3D &position, IComponent *parent=nullptr)
 Create a named component with positioning vector, and parent component. More...
 
 Component (std::string name, IComponent *parent=nullptr)
 Create a named component with a parent component (optional) More...
 
std::vector< std::shared_ptr< const IComponent > > getAncestors () const override
 Return an array of all ancestors. More...
 
IComponent const * getBaseComponent () const override
 Returns const pointer to base component if this component is parametrized. More...
 
void getBoundingBox (BoundingBox &boundingBox) const override
 Get the bounding box for this component and store it in the given argument. More...
 
ComponentID getComponentID () const override
 Returns the ComponentID - a unique identifier of the component. More...
 
double getDistance (const IComponent &) const override
 Get the distance to another IComponent. More...
 
std::string getFullName () const override
 Get the full pathname. More...
 
std::string getName () const override
 Get the IComponent name. More...
 
std::shared_ptr< const IComponentgetParent () const override
 Return a pointer to the current parent. as shared pointer. More...
 
Kernel::V3D getPos () const override
 Get the position of the IComponent. Tree structure is traverse through the. More...
 
Kernel::V3D getRelativePos () const override
 Get the position relative to the parent IComponent (absolute if no parent) More...
 
Kernel::Quat getRelativeRot () const override
 Get the relative Orientation. More...
 
Kernel::Quat getRotation () const override
 Get the absolute orientation of the IComponent. More...
 
bool isParentNamed (const std::string &expectedName, int maxDepth=-1) const
 Return true if one of the parents of this component is named something. More...
 
void rotate (const Kernel::Quat &) override
 Rotate the IComponent. This is relative to parent. More...
 
void rotate (double, const Kernel::V3D &) override
 Rotate the IComponent by an angle in degrees with respect to an axis. More...
 
void setName (const std::string &) override
 Set the IComponent name. More...
 
void setParent (IComponent *) override
 Assign a parent IComponent. Previous parent link is lost. More...
 
void setPos (const Kernel::V3D &) override
 Set the position of the Component The position is with respect to the parent Component. More...
 
void setPos (double, double, double) override
 Set the IComponent position, x, y, z respective to parent (if present) More...
 
void setRot (const Kernel::Quat &) override
 Set the orientation Kernel::Quaternion relative to parent (if present) More...
 
void translate (const Kernel::V3D &) override
 Translate the IComponent (vector form). This is relative to parent if. More...
 
void translate (double, double, double) override
 Translate the IComponent (x,y,z form). This is relative to parent if. More...
 
virtual std::string typeName () const
 
std::set< std::string > getParameterNames (bool recursive=true) const override
 Return the parameter names. More...
 
std::map< std::string, ComponentIDgetParameterNamesByComponent () const override
 return the parameter names and the component they are from More...
 
bool hasParameter (const std::string &name, bool recursive=true) const override
 Returns a boolean indicating if the component has the named parameter. More...
 
std::vector< double > getNumberParameter (const std::string &pname, bool recursive=true) const override
 Get a parameter defined as a double. More...
 
std::vector< int > getIntParameter (const std::string &pname, bool recursive=true) const override
 Get a parameter defined as an int. More...
 
std::string getParameterType (const std::string &pname, bool recursive=true) const override
 Get a parameter's type – this is HACK until Python can export property regardless of the property type. More...
 
std::string getDescription () const
 Get this component parameter's description – no recursive search within children. More...
 
std::string getParamDescription (const std::string &pname, bool recursive=true) const
 Get description of a parameter attached to this component
More...
 
std::string getParamShortDescription (const std::string &pname, bool recursive=true) const
 Get a component's parameter short description. More...
 
std::string getShortDescription () const
 Get a components's short description. More...
 
void setDescription (const std::string &descr)
 Set components description. More...
 
std::vector< bool > getBoolParameter (const std::string &pname, bool recursive=true) const override
 Get a parameter defined as a bool. More...
 
std::vector< Kernel::V3DgetPositionParameter (const std::string &pname, bool recursive=true) const override
 Get a parameter defined as a Kernel::V3D. More...
 
std::vector< Kernel::QuatgetRotationParameter (const std::string &pname, bool recursive=true) const override
 Get a parameter defined as a Kernel::Quaternion. More...
 
std::vector< std::string > getStringParameter (const std::string &pname, bool recursive=true) const override
 Get a parameter defined as a string. More...
 
std::string getParameterAsString (const std::string &pname, bool recursive=true) const override
 get a string representation of a parameter More...
 
bool getParameterVisible (const std::string &p_name, bool recursive) const override
 Get a visibility attribute of a parameter from the parameter map. More...
 
void printSelf (std::ostream &) const override
 Prints a text representation of itself. More...
 
const IComponentbase () const
 Returns the address of the base component. More...
 
Kernel::V3D getScaleFactor () const override
 Returns the ScaleFactor. More...
 
const IComponentgetBareParent () const override
 Returns the bare pointer to the IComponent parent. More...
 
virtual void readXMLAttributes (const Poco::XML::Attributes &attr)
 Reads the XML attributes from Poco XML parser. More...
 
virtual void writeXML (Poco::XML::XMLWriter &writer) const
 
virtual void appendXML (std::ostream &xmlStream) const
 Append to an open XML string. More...
 
bool isParametrized () const override
 Return true if the Component is, in fact, parametrized (that is - it has a valid parameter map) More...
 
bool hasComponentInfo () const
 
size_t index () const
 Helper for legacy access mode. Returns the index of the component. More...
 

Protected Member Functions

const Kernel::V3D factorOutComponentPosition (const Kernel::V3D &point) const
 Find the point that's in the same place relative to the constituent geometrical Object if the position and rotation introduced by the Component is ignored. More...
 
const Kernel::V3D takeOutRotation (Kernel::V3D point) const
 Rotates a point by the reverse of the component's rotation. More...
 
- Protected Member Functions inherited from Mantid::Geometry::IObjComponent
void setGeometryHandler (GeometryHandler *h)
 Reset the current geometry handler. More...
 
- Protected Member Functions inherited from Mantid::Geometry::Component
template<class TYPE >
std::vector< TYPEgetParameter (const std::string &p_name, bool recursive) const
 Get a parameter from the parameter map. More...
 
void swap (const Component *base, const ParameterMap *pmap)
 Swap the current references to the un-parameterized component and parameter map for new ones. More...
 

Protected Attributes

std::shared_ptr< const IObjectm_shape
 The physical geometry representation. More...
 
- Protected Attributes inherited from Mantid::Geometry::Component
const IComponentm_parent
 Parent component in the tree. More...
 
const Componentm_base
 The base component - this is the unmodified component (without the parameters). More...
 
const ParameterMapm_map
 A pointer to const ParameterMap containing the parameters. More...
 
std::string m_name
 Name of the component. More...
 
Kernel::V3D m_pos
 Position w. More...
 
Kernel::Quat m_rot
 Orientation. More...
 

Private Member Functions

void getRelativeBoundingBox (BoundingBox &RelativeBB) const
 common part of the two Bounding box functions above; More...
 

Detailed Description

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

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

Definition at line 33 of file ObjComponent.h.

Constructor & Destructor Documentation

◆ ObjComponent() [1/3]

Mantid::Geometry::ObjComponent::ObjComponent ( const IComponent base,
const ParameterMap map 
)

Constructor for parametrized component.

Constructor for a parametrized ObjComponent.

Parameters
basethe base (un-parametrized) IComponent
mappointer to the ParameterMap

Definition at line 28 of file ObjComponent.cpp.

◆ ObjComponent() [2/3]

Mantid::Geometry::ObjComponent::ObjComponent ( const std::string &  name,
IComponent parent = nullptr 
)
explicit

Constructor.

Parameters
name:: The name of the component
parent:: The Parent geometry object of this component

Definition at line 34 of file ObjComponent.cpp.

◆ ObjComponent() [3/3]

Mantid::Geometry::ObjComponent::ObjComponent ( const std::string &  name,
std::shared_ptr< const IObject shape,
IComponent parent = nullptr 
)
explicit

Constructor.

Parameters
name:: The name of the component
shape:: A pointer to the object describing the shape of this component
parent:: The Parent geometry object of this component

Definition at line 43 of file ObjComponent.cpp.

Member Function Documentation

◆ boundingBox()

void Mantid::Geometry::ObjComponent::boundingBox ( double &  xmax,
double &  ymax,
double &  zmax,
double &  xmin,
double &  ymin,
double &  zmin 
) const
Todo:
This should go in favour of just the class related one.

◆ clone()

IComponent * Mantid::Geometry::ObjComponent::clone ( ) const
inlineoverridevirtual

Virtual Copy Constructor.

Returns
A pointer to a copy of the input ObjComponent

Reimplemented from Mantid::Geometry::Component.

Definition at line 48 of file ObjComponent.h.

◆ draw()

void Mantid::Geometry::ObjComponent::draw ( ) const
overridevirtual

Draws the objcomponent, If the handler is not set then this function does nothing.

Implements Mantid::Geometry::IObjComponent.

Definition at line 308 of file ObjComponent.cpp.

References Mantid::Geometry::IObjComponent::Handle(), and Mantid::Geometry::GeometryHandler::render().

◆ drawObject()

void Mantid::Geometry::ObjComponent::drawObject ( ) const
overridevirtual

Draws the Object.

Implements Mantid::Geometry::IObjComponent.

Definition at line 318 of file ObjComponent.cpp.

References shape().

◆ factorOutComponentPosition()

const V3D Mantid::Geometry::ObjComponent::factorOutComponentPosition ( const Kernel::V3D point) const
protected

Find the point that's in the same place relative to the constituent geometrical Object if the position and rotation introduced by the Component is ignored.

Definition at line 283 of file ObjComponent.cpp.

References Mantid::Geometry::Component::getPos(), and takeOutRotation().

Referenced by interceptSurface(), isOnSide(), isValid(), and solidAngle().

◆ getBoundingBox()

void Mantid::Geometry::ObjComponent::getBoundingBox ( BoundingBox absoluteBB) const
overridevirtual

get bounding box, which may or may not be axis aligned;

Given an input estimate of the axis aligned (AA) bounding box (BB), return an improved set of values.

The AA BB is determined in the frame of the object and the initial estimate will be transformed there. The returned BB will be the frame of the ObjComponent and may not be optimal.

Parameters
absoluteBB:: [InOut] The bounding box for this object component will be stored here. if BB alignment is different from axis alignment, the system of coordinates to alighn is taken fron the absoluteBB

Reimplemented from Mantid::Geometry::Component.

Definition at line 177 of file ObjComponent.cpp.

References Mantid::Geometry::ComponentInfo::boundingBox(), Mantid::Geometry::ParameterMap::componentInfo(), Mantid::Geometry::BoundingBox::getCoordSystem(), Mantid::Geometry::Component::getPos(), Mantid::Geometry::Component::getRotation(), Mantid::Geometry::Component::getScaleFactor(), Mantid::Geometry::Component::hasComponentInfo(), Mantid::Geometry::Component::index(), Mantid::Geometry::BoundingBox::isAxisAligned(), Mantid::Geometry::BoundingBox::isNull(), Mantid::Geometry::Component::m_map, Mantid::Geometry::BoundingBox::nullify(), Mantid::Geometry::BoundingBox::realign(), shape(), Mantid::Kernel::V3D::X(), Mantid::Geometry::BoundingBox::xMax(), Mantid::Geometry::BoundingBox::xMin(), Mantid::Kernel::V3D::Y(), Mantid::Geometry::BoundingBox::yMax(), Mantid::Geometry::BoundingBox::yMin(), Mantid::Kernel::V3D::Z(), Mantid::Geometry::BoundingBox::zMax(), and Mantid::Geometry::BoundingBox::zMin().

◆ getDepth()

double Mantid::Geometry::ObjComponent::getDepth ( ) const
virtual

get Depth (Z-dimension) value for component

Gets the Depth of the object by querying the underlying BoundingBox.

Returns
depth of object

Definition at line 251 of file ObjComponent.cpp.

References Mantid::Geometry::Component::getScaleFactor(), shape(), Mantid::Kernel::V3D::Z(), Mantid::Geometry::BoundingBox::zMax(), and Mantid::Geometry::BoundingBox::zMin().

◆ getHeight()

double Mantid::Geometry::ObjComponent::getHeight ( ) const
virtual

get Height (Y-dimension) value for component

Gets the Height of the object by querying the underlying BoundingBox.

Returns
height of object

Definition at line 233 of file ObjComponent.cpp.

References Mantid::Geometry::Component::getScaleFactor(), shape(), Mantid::Kernel::V3D::Y(), Mantid::Geometry::BoundingBox::yMax(), and Mantid::Geometry::BoundingBox::yMin().

Referenced by Mantid::Algorithms::EstimateResolutionDiffraction::estimateDetectorResolution().

◆ getPointInObject()

int Mantid::Geometry::ObjComponent::getPointInObject ( Kernel::V3D point) const
overridevirtual

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

Parameters
point:: On exit, set to the point value (if found)
Returns
1 if point found, 0 otherwise

Implements Mantid::Geometry::IObjComponent.

Definition at line 261 of file ObjComponent.cpp.

References Mantid::Geometry::Component::getPos(), Mantid::Geometry::Component::getRotation(), Mantid::Geometry::Component::getScaleFactor(), Mantid::Kernel::Quat::rotate(), and shape().

◆ getRelativeBoundingBox()

void Mantid::Geometry::ObjComponent::getRelativeBoundingBox ( BoundingBox RelativeBB) const
private

common part of the two Bounding box functions above;

◆ getWidth()

double Mantid::Geometry::ObjComponent::getWidth ( ) const
virtual

get Width (X-dimension) value for component

Gets the Width of the object by querying the underlying BoundingBox.

Returns
width of object

Definition at line 242 of file ObjComponent.cpp.

References Mantid::Geometry::Component::getScaleFactor(), shape(), Mantid::Kernel::V3D::X(), Mantid::Geometry::BoundingBox::xMax(), and Mantid::Geometry::BoundingBox::xMin().

◆ initDraw()

void Mantid::Geometry::ObjComponent::initDraw ( ) const
overridevirtual

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

Implements Mantid::Geometry::IObjComponent.

Definition at line 327 of file ObjComponent.cpp.

References Mantid::Geometry::IObjComponent::Handle(), Mantid::Geometry::GeometryHandler::initialize(), and shape().

◆ interceptSurface()

int Mantid::Geometry::ObjComponent::interceptSurface ( Track track) const
overridevirtual

Checks whether the track given will pass through this Component.

Parameters
track:: The Track Iobject to test (N.B. Will be modified if hits are found)
Returns
The number of track segments added (i.e. 1 if the track enters and exits the Iobject once each)
Exceptions
NullPointerExceptionif the underlying geometrical IObject has not been set

Implements Mantid::Geometry::IObjComponent.

Definition at line 104 of file ObjComponent.cpp.

References Mantid::Geometry::Track::addLink(), Mantid::Geometry::Track::cbegin(), Mantid::Geometry::Track::cend(), Mantid::Geometry::Track::direction(), Mantid::Kernel::V3D::distance(), factorOutComponentPosition(), Mantid::Geometry::Component::getPos(), Mantid::Geometry::Component::getRotation(), Mantid::Geometry::Component::getScaleFactor(), Mantid::Kernel::Quat::rotate(), shape(), Mantid::Geometry::Track::startPoint(), and takeOutRotation().

◆ isOnSide()

bool Mantid::Geometry::ObjComponent::isOnSide ( const Kernel::V3D point) const
overridevirtual

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

Implements Mantid::Geometry::IObjComponent.

Definition at line 86 of file ObjComponent.cpp.

References factorOutComponentPosition(), Mantid::Geometry::Component::getPos(), Mantid::Geometry::Component::getScaleFactor(), and shape().

◆ isValid()

bool Mantid::Geometry::ObjComponent::isValid ( const Kernel::V3D point) const
overridevirtual

Does the point given lie within this object component?

Implements Mantid::Geometry::IObjComponent.

Definition at line 75 of file ObjComponent.cpp.

References factorOutComponentPosition(), Mantid::Geometry::Component::getPos(), Mantid::Geometry::Component::getScaleFactor(), and shape().

◆ material()

const Kernel::Material Mantid::Geometry::ObjComponent::material ( ) const
overridevirtual

Return the material this component is made from.

Return the material of the component.

Currently unaffected by parametrization

Implements Mantid::Geometry::IObjComponent.

Definition at line 72 of file ObjComponent.cpp.

References m_shape.

◆ registerContents()

size_t Mantid::Geometry::ObjComponent::registerContents ( class ComponentVisitor componentVisitor) const
overridevirtual

◆ setShape()

void Mantid::Geometry::ObjComponent::setShape ( std::shared_ptr< const IObject newShape)

◆ shape()

const IObject_const_sptr Mantid::Geometry::ObjComponent::shape ( ) const
overridevirtual

◆ solidAngle()

double Mantid::Geometry::ObjComponent::solidAngle ( const Kernel::V3D observer) const
overridevirtual

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

Parameters
observer:: The position from which the component is being viewed
Returns
The solid angle in steradians
Exceptions
NullPointerExceptionif the underlying geometrical Object has not been set

Implements Mantid::Geometry::IObjComponent.

Definition at line 142 of file ObjComponent.cpp.

References Mantid::Geometry::ParameterMap::componentInfo(), factorOutComponentPosition(), Mantid::Geometry::Component::getScaleFactor(), Mantid::Geometry::Component::hasComponentInfo(), Mantid::Geometry::Component::index(), Mantid::Geometry::Component::m_map, shape(), and Mantid::Geometry::ComponentInfo::solidAngle().

◆ takeOutRotation()

const V3D Mantid::Geometry::ObjComponent::takeOutRotation ( Kernel::V3D  point) const
protected

Rotates a point by the reverse of the component's rotation.

Definition at line 289 of file ObjComponent.cpp.

References Mantid::Geometry::Component::getRotation(), Mantid::Kernel::Quat::inverse(), and Mantid::Kernel::Quat::rotate().

Referenced by factorOutComponentPosition(), and interceptSurface().

◆ type()

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

type string

Reimplemented from Mantid::Geometry::IComponent.

Definition at line 36 of file ObjComponent.h.

Member Data Documentation

◆ m_shape

std::shared_ptr<const IObject> Mantid::Geometry::ObjComponent::m_shape
protected

The physical geometry representation.

Definition at line 86 of file ObjComponent.h.

Referenced by material(), Mantid::Geometry::ObjCompAssembly::setOutline(), setShape(), and shape().


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