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

Class for Assembly of geometric components. More...

#include <ObjCompAssembly.h>

Inheritance diagram for Mantid::Geometry::ObjCompAssembly:
Mantid::Geometry::ICompAssembly Mantid::Geometry::ObjComponent Mantid::Geometry::IComponent Mantid::Geometry::IObjComponent Mantid::Geometry::Component Mantid::Geometry::IComponent Mantid::Geometry::IComponent

Public Member Functions

int add (IComponent *) override
 Add a component to the assembly.
 
int addCopy (IComponent *) override
 Add a copy (clone) of a component.
 
int addCopy (IComponent *, const std::string &) override
 Add a copy (clone) of a component and rename it.
 
IComponentclone () const override
 Make a clone of the present component.
 
std::shared_ptr< IObjectcreateOutline ()
 Set the outline of the assembly.
 
std::shared_ptr< IComponentgetChild (const int i) const override
 Get a pointer to the ith component within the assembly. Easier to use than.
 
void getChildren (std::vector< IComponent_const_sptr > &outVector, bool recursive) const override
 Get all children.
 
std::shared_ptr< const IComponentgetComponentByName (const std::string &cname, int nlevels=0) const override
 Returns a pointer to the first component of assembly encountered with the.
 
Kernel::V3D getPos () const override
 Gets the absolute position of the Parametrized ObjCompAssembly This attempts to read the cached position value from the parameter map, and creates it if it is not available.
 
Kernel::Quat getRotation () const override
 Gets the absolute position of the Parametrized ObjCompAssembly This attempts to read the cached position value from the parameter map, and creates it if it is not available.
 
int nelements () const override
 Return the number of elements in the assembly.
 
 ObjCompAssembly (const IComponent *base, const ParameterMap *map)
 Empty constructor.
 
 ObjCompAssembly (const ObjCompAssembly &)
 Copy constructor.
 
 ObjCompAssembly (const std::string &, IComponent *reference=nullptr)
 Constructor with a name and parent reference.
 
ObjCompAssemblyoperator= (const ObjCompAssembly &)
 
std::shared_ptr< IComponentoperator[] (int i) const override
 Get a pointer to the ith component in the assembly.
 
void printChildren (std::ostream &) const override
 Print information about all children.
 
void printTree (std::ostream &) const override
 Print information about all the elements in the tree to a stream Loops through all components in the tree and call printSelf(os).
 
size_t registerContents (class Mantid::Geometry::ComponentVisitor &visitor) const override
 
void setOutline (std::shared_ptr< const IObject > obj)
 Sets the outline shape for this assembly.
 
void testIntersectionWithChildren (Track &, std::deque< IComponent_const_sptr > &) const override
 Test the intersection of the ray with the children of the component assembly

 
std::string type () const override
 String description of the type of component.
 
 ~ObjCompAssembly () override
 Destructor.
 
- Public Member Functions inherited from Mantid::Geometry::ICompAssembly
 ICompAssembly ()
 
- Public Member Functions inherited from Mantid::Geometry::IComponent
virtual ~IComponent ()=default
 Destructor.
 
- Public Member Functions inherited from Mantid::Geometry::ObjComponent
void boundingBox (double &xmax, double &ymax, double &zmax, double &xmin, double &ymin, double &zmin) const
 
IComponentclone () const override
 Virtual Copy Constructor.
 
void draw () const override
 Draws the objcomponent, If the handler is not set then this function does nothing.
 
void drawObject () const override
 Draws the Object.
 
void getBoundingBox (BoundingBox &absoluteBB) const override
 get bounding box, which may or may not be axis aligned;
 
virtual double getDepth () const
 get Depth (Z-dimension) value for component
 
virtual double getHeight () const
 get Height (Y-dimension) value for component
 
int getPointInObject (Kernel::V3D &point) const override
 Try to find a point that lies within (or on) the object.
 
virtual double getWidth () const
 get Width (X-dimension) value for component
 
void initDraw () const override
 Initializes the ObjComponent for rendering, this function should be called before rendering.
 
int interceptSurface (Track &track) const override
 Checks whether the track given will pass through this Component.
 
bool isOnSide (const Kernel::V3D &point) const override
 Does the point given lie on the surface of this object component?
 
bool isValid (const Kernel::V3D &point) const override
 Does the point given lie within this object component?
 
const Kernel::Material material () const override
 Return the material this component is made from.
 
 ObjComponent (const IComponent *base, const ParameterMap *map)
 Constructor for parametrized component.
 
 ObjComponent (const std::string &name, IComponent *parent=nullptr)
 Constructor.
 
 ObjComponent (const std::string &name, std::shared_ptr< const IObject > shape, IComponent *parent=nullptr)
 Constructor.
 
void setShape (std::shared_ptr< const IObject > newShape)
 Set a new shape on the component void setShape(std::shared_ptr<const IObject> newShape);.
 
const std::shared_ptr< const IObjectshape () const override
 Return the shape of the component.
 
double solidAngle (const Geometry::SolidAngleParams &params) const override
 Finds the approximate solid angle covered by the component when viewed from the point given.
 
std::string type () const override
 type string
 
- Public Member Functions inherited from Mantid::Geometry::IObjComponent
GeometryHandlerHandle () const
 Gets the GeometryHandler.
 
 IObjComponent ()
 
 IObjComponent (const IObjComponent &)
 Copy constructor.
 
 IObjComponent (GeometryHandler *the_handler)
 Constructor, specifying the GeometryHandler (renderer engine) for this IObjComponent.
 
IObjComponentoperator= (const IObjComponent &rhs)
 Assignment operator.
 
 ~IObjComponent () override
 
- Public Member Functions inherited from Mantid::Geometry::Component
 Component ()
 Create Empty Component at Origin, with no orientation and null parent.
 
 Component (const IComponent *base, const ParameterMap *map)
 Constructor for parametrized component.
 
 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.
 
 Component (std::string name, const Kernel::V3D &position, IComponent *parent=nullptr)
 Create a named component with positioning vector, and parent component.
 
 Component (std::string name, IComponent *parent=nullptr)
 Create a named component with a parent component (optional)
 
std::vector< std::shared_ptr< const IComponent > > getAncestors () const override
 Return an array of all ancestors.
 
IComponent const * getBaseComponent () const override
 Returns const pointer to base component if this component is parametrized.
 
ComponentID getComponentID () const override
 Returns the ComponentID - a unique identifier of the component.
 
double getDistance (const IComponent &) const override
 Get the distance to another IComponent.
 
std::string getFullName () const override
 Get the full pathname.
 
std::string getName () const override
 Get the IComponent name.
 
std::shared_ptr< const IComponentgetParent () const override
 Return a pointer to the current parent. as shared pointer.
 
Kernel::V3D getRelativePos () const override
 Get the position relative to the parent IComponent (absolute if no parent)
 
Kernel::Quat getRelativeRot () const override
 Get the relative Orientation.
 
std::optional< Kernel::V2DgetSideBySideViewPos () const override
 Return the position of the component required on the instrument side by side view.
 
bool isParentNamed (const std::string &expectedName, int maxDepth=-1) const
 Return true if one of the parents of this component is named something.
 
void rotate (const Kernel::Quat &) override
 Rotate the IComponent. This is relative to parent.
 
void rotate (double, const Kernel::V3D &) override
 Rotate the IComponent by an angle in degrees with respect to an axis.
 
void setName (const std::string &) override
 Set the IComponent name.
 
void setParent (IComponent *) override
 Assign a parent IComponent. Previous parent link is lost.
 
void setPos (const Kernel::V3D &) override
 Set the position of the Component The position is with respect to the parent Component.
 
void setPos (double, double, double) override
 Set the IComponent position, x, y, z respective to parent (if present)
 
void setRot (const Kernel::Quat &) override
 Set the orientation Kernel::Quaternion relative to parent (if present)
 
void setSideBySideViewPos (const Kernel::V2D &) override
 Set the IComponent position in the side by side instrument view.
 
void translate (const Kernel::V3D &) override
 Translate the IComponent (vector form). This is relative to parent if.
 
void translate (double, double, double) override
 Translate the IComponent (x,y,z form). This is relative to parent if.
 
virtual std::string typeName () const
 
std::set< std::string > getParameterNames (bool recursive=true) const override
 Return the parameter names.
 
std::map< std::string, ComponentIDgetParameterNamesByComponent () const override
 return the parameter names and the component they are from
 
bool hasParameter (const std::string &name, bool recursive=true) const override
 Returns a boolean indicating if the component has the named parameter.
 
std::vector< double > getNumberParameter (const std::string &pname, bool recursive=true) const override
 Get a parameter defined as a double.
 
std::vector< int > getIntParameter (const std::string &pname, bool recursive=true) const override
 Get a parameter defined as an int.
 
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.
 
std::string getDescription () const
 Get this component parameter's description – no recursive search within children.
 
std::string getParamDescription (const std::string &pname, bool recursive=true) const
 Get description of a parameter attached to this component

 
std::string getParamShortDescription (const std::string &pname, bool recursive=true) const
 Get a component's parameter short description.
 
std::string getShortDescription () const
 Get a components's short description.
 
void setDescription (const std::string &descr)
 Set components description.
 
std::vector< bool > getBoolParameter (const std::string &pname, bool recursive=true) const override
 Get a parameter defined as a bool.
 
std::vector< Kernel::V3DgetPositionParameter (const std::string &pname, bool recursive=true) const override
 Get a parameter defined as a Kernel::V3D.
 
std::vector< Kernel::QuatgetRotationParameter (const std::string &pname, bool recursive=true) const override
 Get a parameter defined as a Kernel::Quaternion.
 
std::vector< std::string > getStringParameter (const std::string &pname, bool recursive=true) const override
 Get a parameter defined as a string.
 
std::string getParameterAsString (const std::string &pname, bool recursive=true) const override
 get a string representation of a parameter
 
bool getParameterVisible (const std::string &p_name, bool recursive) const override
 Get a visibility attribute of a parameter from the parameter map.
 
double getFittingParameter (const std::string &pname, double xvalue) const
 Get fitting parameter.
 
void printSelf (std::ostream &) const override
 Prints a text representation of itself.
 
const IComponentbase () const
 Returns the address of the base component.
 
Kernel::V3D getScaleFactor () const override
 Returns the ScaleFactor.
 
const IComponentgetBareParent () const override
 Returns the bare pointer to the IComponent parent.
 
virtual void readXMLAttributes (const Poco::XML::Attributes &attr)
 Reads the XML attributes from Poco XML parser.
 
virtual void writeXML (Poco::XML::XMLWriter &writer) const
 
virtual void appendXML (std::ostream &xmlStream) const
 Append to an open XML string.
 
bool isParametrized () const override
 Return true if the Component is, in fact, parametrized (that is - it has a valid parameter map)
 
bool hasComponentInfo () const
 
size_t index () const
 Helper for legacy access mode. Returns the index of the component.
 

Private Types

using comp_it = std::vector< ObjComponent * >::iterator
 Iterator type.
 
using const_comp_it = std::vector< ObjComponent * >::const_iterator
 Const iterator type.
 

Private Member Functions

ObjCompAssemblyoperator= (const ICompAssembly &)
 Private copy assignment operator.
 

Private Attributes

std::vector< ObjComponent * > m_group
 the group of child components
 

Additional Inherited Members

- Protected Member Functions inherited from Mantid::Geometry::ICompAssembly
 ICompAssembly (const ICompAssembly &)=default
 Protected copy constructor.
 
- Protected Member Functions inherited from Mantid::Geometry::ObjComponent
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.
 
const Kernel::V3D takeOutRotation (Kernel::V3D point) const
 Rotates a point by the reverse of the component's rotation.
 
- Protected Member Functions inherited from Mantid::Geometry::IObjComponent
void setGeometryHandler (GeometryHandler *h)
 Reset the current geometry handler.
 
- 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.
 
void swap (const Component *base, const ParameterMap *pmap)
 Swap the current references to the un-parameterized component and parameter map for new ones.
 
- Protected Attributes inherited from Mantid::Geometry::ObjComponent
std::shared_ptr< const IObjectm_shape
 The physical geometry representation.
 
- Protected Attributes inherited from Mantid::Geometry::Component
const IComponentm_parent
 Parent component in the tree.
 
const Componentm_base
 The base component - this is the unmodified component (without the parameters).
 
const ParameterMapm_map
 A pointer to const ParameterMap containing the parameters.
 
std::string m_name
 Name of the component.
 
Kernel::V3D m_pos
 Position w.
 
Kernel::Quat m_rot
 Orientation.
 
std::optional< Kernel::V2Dm_sidebysideviewpos
 Position of component in instrument viewer side by side view.
 

Detailed Description

Class for Assembly of geometric components.

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

ObjCompAssembly allows Components to be positioned in a hierarchical structure in the form of a tree. ObjCompAssembly inherits from component.

Definition at line 30 of file ObjCompAssembly.h.

Member Typedef Documentation

◆ comp_it

using Mantid::Geometry::ObjCompAssembly::comp_it = std::vector<ObjComponent *>::iterator
private

Iterator type.

Definition at line 31 of file ObjCompAssembly.h.

◆ const_comp_it

using Mantid::Geometry::ObjCompAssembly::const_comp_it = std::vector<ObjComponent *>::const_iterator
private

Const iterator type.

Definition at line 32 of file ObjCompAssembly.h.

Constructor & Destructor Documentation

◆ ObjCompAssembly() [1/3]

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

Empty constructor.

Constructor for a parametrized ObjComponent.

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

Definition at line 41 of file ObjCompAssembly.cpp.

◆ ObjCompAssembly() [2/3]

Mantid::Geometry::ObjCompAssembly::ObjCompAssembly ( const std::string &  n,
IComponent reference = nullptr 
)

Constructor with a name and parent reference.

Valued constructor.

Parameters
n:: name of the assembly
reference:: the parent Component
If the reference is an object of class Component,
normal parenting apply. If the reference object is an assembly itself, then in addition to parenting this is registered as a children of reference.

Definition at line 52 of file ObjCompAssembly.cpp.

References Mantid::Geometry::ICompAssembly::add().

◆ ObjCompAssembly() [3/3]

Mantid::Geometry::ObjCompAssembly::ObjCompAssembly ( const ObjCompAssembly assem)

Copy constructor.

Parameters
assem:: assembly to copy

Definition at line 63 of file ObjCompAssembly.cpp.

◆ ~ObjCompAssembly()

Mantid::Geometry::ObjCompAssembly::~ObjCompAssembly ( )
override

Destructor.

Definition at line 89 of file ObjCompAssembly.cpp.

References m_group.

Member Function Documentation

◆ add()

int Mantid::Geometry::ObjCompAssembly::add ( IComponent comp)
overridevirtual

Add a component to the assembly.

Add method.

Parameters
comp:: component to add
Returns
number of components in the assembly

This becomes the new parent of comp.

Implements Mantid::Geometry::ICompAssembly.

Definition at line 110 of file ObjCompAssembly.cpp.

References m_group, Mantid::Geometry::Component::m_map, and Mantid::Geometry::IComponent::setParent().

Referenced by InstrumentCreationHelper::addDetector(), ComponentCreationHelper::createCylInstrumentWithVerticalOffsetsSpecified(), and ComponentCreationHelper::createInstrumentWithPSDTubes().

◆ addCopy() [1/2]

int Mantid::Geometry::ObjCompAssembly::addCopy ( IComponent comp)
overridevirtual

Add a copy (clone) of a component.

AddCopy method.

Parameters
comp:: component to add
Returns
number of components in the assembly

Add a copy of a component in the assembly. Comp is cloned if valid, then added in the assembly This becomes the parent of the cloned component

Implements Mantid::Geometry::ICompAssembly.

Definition at line 134 of file ObjCompAssembly.cpp.

References Mantid::Geometry::IComponent::clone(), m_group, Mantid::Geometry::Component::m_map, and Mantid::Geometry::IComponent::setParent().

◆ addCopy() [2/2]

int Mantid::Geometry::ObjCompAssembly::addCopy ( IComponent comp,
const std::string &  n 
)
overridevirtual

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

AddCopy method.

Parameters
comp:: component to add
n:: name of the copied component.
Returns
number of components in the assembly

Add a copy of a component in the assembly. Comp is cloned if valid, then added in the assembly This becomes the parent of the cloned component

Implements Mantid::Geometry::ICompAssembly.

Definition at line 160 of file ObjCompAssembly.cpp.

References Mantid::Geometry::IComponent::clone(), m_group, Mantid::Geometry::Component::m_map, n, Mantid::Geometry::IComponent::setName(), and Mantid::Geometry::IComponent::setParent().

◆ clone()

IComponent * Mantid::Geometry::ObjCompAssembly::clone ( ) const
overridevirtual

Make a clone of the present component.

Clone method Make a copy of the component assembly.

Returns
new(*this)

Implements Mantid::Geometry::ICompAssembly.

Definition at line 102 of file ObjCompAssembly.cpp.

◆ createOutline()

std::shared_ptr< IObject > Mantid::Geometry::ObjCompAssembly::createOutline ( )

Set the outline of the assembly.

Creates an Object and sets m_shape point to it. All child components must be detectors and positioned along a straight line and have the same shape. The shape can be either a box or a cylinder.

Returns
The shape of the outline: "cylinder", "box", ...

Definition at line 365 of file ObjCompAssembly.cpp.

References Mantid::Geometry::ShapeFactory::createShape(), Mantid::Geometry::detail::ShapeInfo::CUBOID, Mantid::Geometry::detail::ShapeInfo::CYLINDER, Mantid::Kernel::Logger::debug(), fabs, Mantid::Geometry::g_log, Mantid::Geometry::IComponent::getRelativePos(), height, m_group, nelements(), obj, Mantid::Kernel::V3D::scalar_prod(), setOutline(), Mantid::Kernel::Logger::warning(), Mantid::Geometry::x, Mantid::Kernel::V3D::X(), Mantid::Geometry::y, Mantid::Kernel::V3D::Y(), Mantid::Geometry::z, and Mantid::Kernel::V3D::Z().

Referenced by ComponentCreationHelper::createCylInstrumentWithVerticalOffsetsSpecified().

◆ getChild()

std::shared_ptr< IComponent > Mantid::Geometry::ObjCompAssembly::getChild ( const int  i) const
inlineoverridevirtual

Get a pointer to the ith component within the assembly. Easier to use than.

Implements Mantid::Geometry::ICompAssembly.

Definition at line 59 of file ObjCompAssembly.h.

Referenced by getChildren(), getComponentByName(), and testIntersectionWithChildren().

◆ getChildren()

void Mantid::Geometry::ObjCompAssembly::getChildren ( std::vector< IComponent_const_sptr > &  outVector,
bool  recursive 
) const
overridevirtual

Get all children.

Return a vector of all contained children components.

Parameters
outVector:: vector of IComponent sptr.
recursive:: if a child is a CompAssembly, returns its children recursively

Implements Mantid::Geometry::ICompAssembly.

Definition at line 225 of file ObjCompAssembly.cpp.

References getChild(), and nelements().

◆ getComponentByName()

std::shared_ptr< const IComponent > Mantid::Geometry::ObjCompAssembly::getComponentByName ( const std::string &  cname,
int  nlevels = 0 
) const
overridevirtual

Returns a pointer to the first component of assembly encountered with the.

Find a component by name.

Parameters
cname:: The name of the component. If there are multiple matches, the first one found is returned.
nlevels:: Optional argument to limit number of levels searched.
Returns
A shared pointer to the component

Implements Mantid::Geometry::ICompAssembly.

Definition at line 247 of file ObjCompAssembly.cpp.

References Mantid::Kernel::Logger::debug(), Mantid::Geometry::g_log, getChild(), and nelements().

◆ getPos()

V3D Mantid::Geometry::ObjCompAssembly::getPos ( ) const
overridevirtual

Gets the absolute position of the Parametrized ObjCompAssembly This attempts to read the cached position value from the parameter map, and creates it if it is not available.

Returns
A vector of the absolute position

Implements Mantid::Geometry::IComponent.

Definition at line 300 of file ObjCompAssembly.cpp.

References Mantid::Geometry::ParameterMap::getCachedLocation(), Mantid::Geometry::Component::getPos(), Mantid::Geometry::Component::hasComponentInfo(), Mantid::Geometry::Component::m_base, Mantid::Geometry::Component::m_map, and Mantid::Geometry::ParameterMap::setCachedLocation().

◆ getRotation()

Quat Mantid::Geometry::ObjCompAssembly::getRotation ( ) const
overridevirtual

Gets the absolute position of the Parametrized ObjCompAssembly This attempts to read the cached position value from the parameter map, and creates it if it is not available.

Returns
A vector of the absolute position

Implements Mantid::Geometry::IComponent.

Definition at line 317 of file ObjCompAssembly.cpp.

References Mantid::Geometry::ParameterMap::getCachedRotation(), Mantid::Geometry::Component::getRotation(), Mantid::Geometry::Component::hasComponentInfo(), Mantid::Geometry::Component::m_base, Mantid::Geometry::Component::m_map, and Mantid::Geometry::ParameterMap::setCachedRotation().

◆ nelements()

int Mantid::Geometry::ObjCompAssembly::nelements ( ) const
overridevirtual

Return the number of elements in the assembly.

Return the number of components in the assembly.

Returns
group.size()

Implements Mantid::Geometry::ICompAssembly.

Definition at line 181 of file ObjCompAssembly.cpp.

References Mantid::Geometry::Component::m_base, m_group, and Mantid::Geometry::Component::m_map.

Referenced by createOutline(), getChildren(), getComponentByName(), Mantid::Geometry::operator<<(), operator[](), printChildren(), printTree(), and testIntersectionWithChildren().

◆ operator=() [1/2]

ObjCompAssembly & Mantid::Geometry::ObjCompAssembly::operator= ( const ICompAssembly )
private

Private copy assignment operator.

◆ operator=() [2/2]

ObjCompAssembly & Mantid::Geometry::ObjCompAssembly::operator= ( const ObjCompAssembly assem)

Definition at line 68 of file ObjCompAssembly.cpp.

References m_group.

◆ operator[]()

std::shared_ptr< IComponent > Mantid::Geometry::ObjCompAssembly::operator[] ( int  i) const
overridevirtual

Get a pointer to the ith component in the assembly.

Note standard C/C++ array notation used, that is, i most be an integer i = 0,1,..., N-1, where N is the number of component in the assembly.

Parameters
i:: The index of the component you want
Returns
group[i]

Throws if i is not in range

Implements Mantid::Geometry::ICompAssembly.

Definition at line 201 of file ObjCompAssembly.cpp.

References Mantid::Geometry::ParComponentFactory::create(), Mantid::Geometry::Component::m_base, m_group, Mantid::Geometry::Component::m_map, and nelements().

Referenced by printChildren(), and printTree().

◆ printChildren()

void Mantid::Geometry::ObjCompAssembly::printChildren ( std::ostream &  os) const
overridevirtual

Print information about all children.

Print information about elements in the assembly to a stream.

Parameters
os:: output stream

Loops through all components in the assembly and call printSelf(os).

Implements Mantid::Geometry::ICompAssembly.

Definition at line 265 of file ObjCompAssembly.cpp.

References nelements(), and operator[]().

Referenced by Mantid::Geometry::operator<<().

◆ printTree()

void Mantid::Geometry::ObjCompAssembly::printTree ( std::ostream &  os) const
overridevirtual

Print information about all the elements in the tree to a stream Loops through all components in the tree and call printSelf(os).

Parameters
os:: output stream

Implements Mantid::Geometry::ICompAssembly.

Definition at line 280 of file ObjCompAssembly.cpp.

References nelements(), and operator[]().

◆ registerContents()

size_t Mantid::Geometry::ObjCompAssembly::registerContents ( class Mantid::Geometry::ComponentVisitor visitor) const
overridevirtual

◆ setOutline()

void Mantid::Geometry::ObjCompAssembly::setOutline ( std::shared_ptr< const IObject obj)

Sets the outline shape for this assembly.

Parameters
obj:: The outline shape created previously fith createOutline()

Definition at line 596 of file ObjCompAssembly.cpp.

References Mantid::Geometry::ObjComponent::m_shape, and obj.

Referenced by ComponentCreationHelper::createCylInstrumentWithVerticalOffsetsSpecified(), and createOutline().

◆ testIntersectionWithChildren()

void Mantid::Geometry::ObjCompAssembly::testIntersectionWithChildren ( Track testRay,
std::deque< IComponent_const_sptr > &  searchQueue 
) const
overridevirtual

Test the intersection of the ray with the children of the component assembly

Test the intersection of the ray with the children of the component assembly, for InstrumentRayTracer.

Parameters
testRay:: Track under test. The results are stored here.
searchQueue:: If a child is a sub-assembly then it is appended for later searching

Implements Mantid::Geometry::ICompAssembly.

Definition at line 337 of file ObjCompAssembly.cpp.

References getChild(), and nelements().

◆ type()

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

String description of the type of component.

Reimplemented from Mantid::Geometry::ICompAssembly.

Definition at line 35 of file ObjCompAssembly.h.

Member Data Documentation

◆ m_group

std::vector<ObjComponent *> Mantid::Geometry::ObjCompAssembly::m_group
private

the group of child components

Definition at line 90 of file ObjCompAssembly.h.

Referenced by add(), addCopy(), addCopy(), createOutline(), nelements(), operator=(), operator[](), and ~ObjCompAssembly().


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