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

Constructive Solid Geometry object. More...

#include <CSGObject.h>

Inheritance diagram for Mantid::Geometry::CSGObject:
Mantid::Geometry::IObject

Public Member Functions

int addSurfString (const std::string &)
 Not implemented. More...
 
Mantid::Geometry::TrackDirection calcValidType (const Kernel::V3D &Pt, const Kernel::V3D &uVec) const
 Calculate if a point PT is a valid point on the track. More...
 
Mantid::Geometry::TrackDirection calcValidTypeBy3Points (const Kernel::V3D &prePt, const Kernel::V3D &curPt, const Kernel::V3D &nxtPt) const
 Check if an intercept is guiding the ray into the shape or leaving the shape. More...
 
std::string cellCompStr () const
 Write the object to a string. More...
 
std::string cellStr (const std::map< int, CSGObject > &) const
 Returns just the cell string object. More...
 
IObjectclone () const override
 Clone. More...
 
IObjectcloneWithMaterial (const Kernel::Material &material) const override
 
int complementaryObject (const int cellNum, std::string &lineStr)
 Process a complementary object. More...
 
void convertComplement (const std::map< int, CSGObject > &)
 Returns just the cell string object. More...
 
int createSurfaceList (const int outFlag=0)
 create Surface list More...
 
 CSGObject ()
 Default constructor. More...
 
 CSGObject (const CSGObject &)
 Copy constructor. More...
 
 CSGObject (std::string shapeXML)
 Constructor providing shape xml. More...
 
void defineBoundingBox (const double &xMax, const double &yMax, const double &zMax, const double &xMin, const double &yMin, const double &zMin)
 Define axis-aligned bounding box. More...
 
double distance (const Track &track) const override
 Compute the distance to the first point of intersection with the surface. More...
 
void draw () const override
 Draws the Object using geometry handler, If the handler is not set then this function does nothing. More...
 
boost::optional< Kernel::V3DgeneratePointInObject (Kernel::PseudoRandomNumberGenerator &rng, const BoundingBox &activeRegion, const size_t) const override
 Generate a random point within the object that is also bound by the activeRegion box. More...
 
boost::optional< Kernel::V3DgeneratePointInObject (Kernel::PseudoRandomNumberGenerator &rng, const size_t) const override
 Select a random point within the object. More...
 
const BoundingBoxgetBoundingBox () const override
 Return cached value of axis-aligned bounding box. More...
 
void getBoundingBox (double &xmax, double &ymax, double &zmax, double &xmin, double &ymin, double &zmin) const override
 Calculate (or return cached value of) Axis Aligned Bounding box (DEPRECATED) More...
 
std::shared_ptr< GeometryHandlergetGeometryHandler () const override
 Returns the geometry handler. More...
 
int getName () const override
 Get Name. More...
 
void GetObjectGeom (detail::ShapeInfo::GeometryShape &type, std::vector< Kernel::V3D > &vectors, double &innerRadius, double &radius, double &height) const override
 get info on standard shapes More...
 
int getPointInObject (Kernel::V3D &point) const override
 Try to find a point that lies within (or on) the object. More...
 
std::string getShapeXML () const
 Getter for the shape xml. More...
 
std::vector< int > getSurfaceIndex () const
 Returns all of the numbers of surfaces. More...
 
std::vector< const Surface * > & getSurfacePtr ()
 Get the list of surfaces. More...
 
const std::vector< const Surface * > & getSurfacePtr () const
 Get the list of surfaces (const version) More...
 
int hasComplement () const
 Determine if the object has a complementary object. More...
 
bool hasValidShape () const override
 Return whether this object has a valid shape. More...
 
const std::string & id () const override
 
void initDraw () const override
 Initializes/prepares the object to be rendered, this will generate geometry for object, If the handler is not set then this function does nothing. More...
 
int interceptSurface (Geometry::Track &track) const override
 Given a track, fill the track with valid section. More...
 
bool isFiniteGeometry () const override
 
bool isOnSide (const Kernel::V3D &) const override
 
bool isValid (const Kernel::V3D &) const override
 Check if a point is valid. More...
 
bool isValid (const std::map< int, int > &) const
 Check if a set of surfaces are valid. More...
 
void makeComplement ()
 Takes the complement of a group. More...
 
const Kernel::Materialmaterial () const override
 
CSGObjectoperator= (const CSGObject &)
 Assignment operator. More...
 
int populate (const std::map< int, std::shared_ptr< Surface > > &)
 Goes through the cell objects and adds the pointers to the SurfPoint keys (using their keyN) More...
 
virtual void print () const
 Prints almost everything. More...
 
void printTree () const
 Displays the rule tree. More...
 
int procString (const std::string &lineStr)
 Processes the cell string. More...
 
double rayTraceSolidAngle (const Kernel::V3D &observer) const
 Given an observer position find the approximate solid angle of the object. More...
 
int removeSurface (const int surfNum)
 Removes a surface and then re-builds the cell. More...
 
void setFiniteGeometryFlag (bool isFinite) override
 
void setGeometryHandler (const std::shared_ptr< GeometryHandler > &h)
 Set Geometry Handler. More...
 
void setID (const std::string &id) override
 
void setMaterial (const Kernel::Material &material) override
 
void setName (const int objNum)
 Set Name. More...
 
void setNullBoundingBox ()
 Set a null bounding box for this object. More...
 
int setObject (const int objName, const std::string &lineStr)
 Object line == cell. More...
 
void setVtkGeometryCacheReader (std::shared_ptr< vtkGeometryCacheReader >)
 set vtkGeometryCache reader More...
 
void setVtkGeometryCacheWriter (std::shared_ptr< vtkGeometryCacheWriter >)
 set vtkGeometryCache writer More...
 
detail::ShapeInfo::GeometryShape shape () const override
 
const detail::ShapeInfoshapeInfo () const override
 
double solidAngle (const Kernel::V3D &observer) const override
 Find solid angle of object wrt the observer. More...
 
double solidAngle (const Kernel::V3D &observer, const Kernel::V3D &scaleFactor) const override
 Find solid angle of object wrt the observer with a scaleFactor for the object. More...
 
std::string str () const
 Write the object to a string. More...
 
int substituteSurf (const int surfNum, const int newSurfNum, const std::shared_ptr< Surface > &surfPtr)
 Removes a surface and then re-builds the cell. More...
 
const RuletopRule () const
 Return the top rule. More...
 
double triangulatedSolidAngle (const Kernel::V3D &observer) const
 Find solid angle of object from point "observer" using the OC triangulation of the object, if it exists. More...
 
double triangulatedSolidAngle (const Kernel::V3D &observer, const Kernel::V3D &scaleFactor) const
 Find solid angle of object from point "observer" using the OC triangulation of the object, if it exists. More...
 
double volume () const override
 Calculates the volume of this object. More...
 
void write (std::ostream &) const
 MCNPX output. More...
 
 ~CSGObject () override
 Destructor. More...
 
- Public Member Functions inherited from Mantid::Geometry::IObject
virtual IObjectclone () const =0
 
virtual IObjectcloneWithMaterial (const Kernel::Material &material) const =0
 
virtual double distance (const Geometry::Track &) const =0
 
virtual void draw () const =0
 
virtual boost::optional< Kernel::V3DgeneratePointInObject (Kernel::PseudoRandomNumberGenerator &rng, const BoundingBox &activeRegion, const size_t) const =0
 
virtual boost::optional< Kernel::V3DgeneratePointInObject (Kernel::PseudoRandomNumberGenerator &rng, const size_t) const =0
 
virtual const BoundingBoxgetBoundingBox () const =0
 Return cached value of axis-aligned bounding box. More...
 
virtual void getBoundingBox (double &xmax, double &ymax, double &zmax, double &xmin, double &ymin, double &zmin) const =0
 Calculate (or return cached value of) Axis Aligned Bounding box (DEPRECATED) More...
 
virtual std::shared_ptr< GeometryHandlergetGeometryHandler () const =0
 
virtual int getName () const =0
 
virtual void GetObjectGeom (detail::ShapeInfo::GeometryShape &type, std::vector< Kernel::V3D > &vectors, double &innerRadius, double &radius, double &height) const =0
 
virtual int getPointInObject (Kernel::V3D &point) const =0
 
virtual bool hasValidShape () const =0
 
virtual const std::string & id () const =0
 
virtual void initDraw () const =0
 
virtual int interceptSurface (Geometry::Track &) const =0
 
virtual bool isFiniteGeometry () const
 
virtual bool isOnSide (const Kernel::V3D &) const =0
 
virtual bool isValid (const Kernel::V3D &) const =0
 
virtual const Kernel::Materialmaterial () const =0
 
virtual void setFiniteGeometryFlag (bool)
 
virtual void setID (const std::string &id)=0
 
virtual void setMaterial (const Kernel::Material &material)=0
 
virtual detail::ShapeInfo::GeometryShape shape () const =0
 
virtual const detail::ShapeInfoshapeInfo () const =0
 
virtual double solidAngle (const Kernel::V3D &observer) const =0
 
virtual double solidAngle (const Kernel::V3D &observer, const Kernel::V3D &scaleFactor) const =0
 
virtual double volume () const =0
 
virtual ~IObject ()=default
 

Protected Attributes

std::vector< const Surface * > m_surList
 Full surfaces (make a map. More...
 

Private Member Functions

void calcBoundingBoxByGeometry ()
 Calculate bounding box using object's geometric data. More...
 
void calcBoundingBoxByRule ()
 Calculate bounding box using Rule system. More...
 
void calcBoundingBoxByVertices ()
 Calculate bounding box using object's vertices. More...
 
int checkSurfaceValid (const Kernel::V3D &, const Kernel::V3D &) const
 Determine if a point is valid by checking both directions of the normal away from the line A good point will have one valid and one invalid. More...
 
const std::vector< uint32_t > & getTriangleFaces () const
 for solid angle from triangulation More...
 
const std::vector< double > & getTriangleVertices () const
 get vertices More...
 
double monteCarloVolume () const
 Returns the volume. More...
 
size_t numberOfTriangles () const
 
size_t numberOfVertices () const
 
std::unique_ptr< CompGrpprocComp (std::unique_ptr< Rule >) const
 Takes a Rule item and makes it a complementary group. More...
 
int procPair (std::string &lineStr, std::map< int, std::unique_ptr< Rule > > &ruleMap, int &compUnit) const
 This takes a string lineStr, finds the first two Rxxx function, determines their join type make the rule, adds to vector then removes two old rules from the vector, updates string. More...
 
int searchForObject (Kernel::V3D &) const
 Try to find a point that lies within (or on) the object, given a seed point. More...
 
double singleShotMonteCarloVolume (const int shotSize, const size_t seed) const
 Returns the volume. More...
 
void updateGeometryHandler ()
 Updates the geometry handler if needed. More...
 

Private Attributes

double AABBxMax
 xmax of Axis aligned bounding box cache More...
 
double AABBxMin
 xmin of Axis aligned bounding box cache More...
 
double AABByMax
 ymax of Axis aligned bounding box cache More...
 
double AABByMin
 xmin of Axis aligned bounding box cache More...
 
double AABBzMax
 zmax of Axis aligned bounding box cache More...
 
double AABBzMin
 zmin of Axis Aligned Bounding Box Cache More...
 
bool bGeometryCaching
 Is geometry caching enabled? More...
 
bool boolBounded
 flag true if a bounding box exists, either by More...
 
BoundingBox m_boundingBox
 Object's bounding box. More...
 
std::shared_ptr< GeometryHandlerm_handler
 Geometry Handle for rendering. More...
 
std::string m_id
 Optional string identifier. More...
 
bool m_isFiniteGeometry = true
 Whether or not the object geometry is finite. More...
 
std::unique_ptr< Kernel::Materialm_material
 material composition More...
 
int m_objNum
 Creation number. More...
 
std::string m_shapeXML
 original shape xml used to generate this object. More...
 
std::unique_ptr< Rulem_topRule
 Top rule [ Geometric scope of object]. More...
 
std::shared_ptr< vtkGeometryCacheReadervtkCacheReader
 a pointer to a class for reading from the geometry cache More...
 
std::shared_ptr< vtkGeometryCacheWritervtkCacheWriter
 a pointer to a class for writing to the geometry cache More...
 

Friends

class GeometryHandler
 
class GeometryRenderer
 

Detailed Description

Constructive Solid Geometry object.

Version
1.0
Date
July 2007
Author
S. Ansell

A Constructive Solid Geometry (CSG) object, implemented as a collection of Rules and surface objects

Definition at line 51 of file CSGObject.h.

Constructor & Destructor Documentation

◆ CSGObject() [1/3]

Mantid::Geometry::CSGObject::CSGObject ( )

Default constructor.

Definition at line 388 of file CSGObject.cpp.

◆ CSGObject() [2/3]

Mantid::Geometry::CSGObject::CSGObject ( std::string  shapeXML)

Constructor providing shape xml.

Construct with original shape xml knowledge.

Parameters
shapeXML: string with original shape xml.

Definition at line 394 of file CSGObject.cpp.

◆ CSGObject() [3/3]

Mantid::Geometry::CSGObject::CSGObject ( const CSGObject A)

Copy constructor.

Parameters
A:: The object to initialise this copy from

Definition at line 405 of file CSGObject.cpp.

◆ ~CSGObject()

Mantid::Geometry::CSGObject::~CSGObject ( )
overridedefault

Destructor.

Destructor in .cpp so we can forward declare Rule class.

Member Function Documentation

◆ addSurfString()

int Mantid::Geometry::CSGObject::addSurfString ( const std::string &  )

Not implemented.

◆ calcBoundingBoxByGeometry()

void Mantid::Geometry::CSGObject::calcBoundingBoxByGeometry ( )
private

Calculate bounding box using object's geometric data.

Attempts to calculate bounding box using object geometry.

Stores result in bounding box cache if successful. Will only work for basic shapes that are handled by GluGeometryHandler.

Definition at line 1769 of file CSGObject.cpp.

References Mantid::Geometry::detail::ShapeInfo::CONE, Mantid::Geometry::detail::ShapeInfo::CUBOID, Mantid::Geometry::detail::ShapeInfo::CYLINDER, defineBoundingBox(), height, Mantid::Geometry::detail::ShapeInfo::HEXAHEDRON, innerRadius, m_handler, radius, top, Mantid::Kernel::V3D::X(), Mantid::Kernel::V3D::Y(), and Mantid::Kernel::V3D::Z().

Referenced by getBoundingBox().

◆ calcBoundingBoxByRule()

void Mantid::Geometry::CSGObject::calcBoundingBoxByRule ( )
private

Calculate bounding box using Rule system.

Attempts to calculate bounding box using Rule system.

Stores result in bounding box cache if successful. Will only work for shapes that consist entirely of axis-aligned surfaces and a few special cases (such as Spheres).

Definition at line 1701 of file CSGObject.cpp.

References defineBoundingBox(), and m_topRule.

Referenced by getBoundingBox().

◆ calcBoundingBoxByVertices()

void Mantid::Geometry::CSGObject::calcBoundingBoxByVertices ( )
private

Calculate bounding box using object's vertices.

Attempts to calculate bounding box using vertex array.

Stores result in bounding box cache if successful. Will only work for shapes that have handlers capable of providing a vertex mesh.

See also
GeometryHandler::canTriangulate()

Definition at line 1732 of file CSGObject.cpp.

References defineBoundingBox(), getTriangleVertices(), and numberOfVertices().

Referenced by getBoundingBox().

◆ calcValidType()

TrackDirection Mantid::Geometry::CSGObject::calcValidType ( const Kernel::V3D point,
const Kernel::V3D uVec 
) const

Calculate if a point PT is a valid point on the track.

Parameters
point:: Point to calculate from.
uVec:: Unit vector of the track
Return values
0:: Not valid / double valid
1:: Entry point
-1:: Exit Point

Definition at line 1155 of file CSGObject.cpp.

References Mantid::Geometry::ENTERING, Mantid::Geometry::INVALID, isValid(), and Mantid::Geometry::LEAVING.

◆ calcValidTypeBy3Points()

TrackDirection Mantid::Geometry::CSGObject::calcValidTypeBy3Points ( const Kernel::V3D prePt,
const Kernel::V3D curPt,
const Kernel::V3D nxtPt 
) const

Check if an intercept is guiding the ray into the shape or leaving the shape.

Parameters
prePt:: the previous point on the Line
curPt:: the current point on the Line
nxtPt:: Unit vector of the track
Return values
1:: Entry point
-1:: Exit Point
0:: Not valid / double valid

Definition at line 1176 of file CSGObject.cpp.

References Mantid::Geometry::ENTERING, Mantid::Geometry::INVALID, isValid(), and Mantid::Geometry::LEAVING.

Referenced by interceptSurface().

◆ cellCompStr()

std::string Mantid::Geometry::CSGObject::cellCompStr ( ) const

Write the object to a string.

This includes only rules.

Returns
Object Line

Definition at line 955 of file CSGObject.cpp.

References m_topRule.

◆ cellStr()

std::string Mantid::Geometry::CSGObject::cellStr ( const std::map< int, CSGObject > &  MList) const

Returns just the cell string object.

Parameters
MList:: List of indexable Hulls
Returns
Cell String (from m_topRule)
Todo:
Break infinite recursion

Definition at line 502 of file CSGObject.cpp.

References Mantid::Kernel::Strings::convPartNum(), Mantid::Geometry::Rule::display(), and topRule().

Referenced by convertComplement().

◆ checkSurfaceValid()

int Mantid::Geometry::CSGObject::checkSurfaceValid ( const Kernel::V3D point,
const Kernel::V3D direction 
) const
private

Determine if a point is valid by checking both directions of the normal away from the line A good point will have one valid and one invalid.

Parameters
point:: Point on a basic surface to check
direction:: Direction +/- to be checked
Return values
+1:: Point outlayer (ie not in object)
-1:: Point included (e.g at convex intersection)
0:: success

Definition at line 770 of file CSGObject.cpp.

References isValid(), tmp, and Mantid::Kernel::Tolerance.

Referenced by isOnSide().

◆ clone()

IObject * Mantid::Geometry::CSGObject::clone ( ) const
inlineoverridevirtual

Clone.

Implements Mantid::Geometry::IObject.

Definition at line 64 of file CSGObject.h.

◆ cloneWithMaterial()

IObject * Mantid::Geometry::CSGObject::cloneWithMaterial ( const Kernel::Material material) const
inlineoverridevirtual

Implements Mantid::Geometry::IObject.

Definition at line 66 of file CSGObject.h.

References obj.

◆ complementaryObject()

int Mantid::Geometry::CSGObject::complementaryObject ( const int  cellNum,
std::string &  lineStr 
)

Process a complementary object.

Definition at line 538 of file CSGObject.cpp.

References m_objNum, m_surList, and procString().

◆ convertComplement()

void Mantid::Geometry::CSGObject::convertComplement ( const std::map< int, CSGObject > &  MList)

Returns just the cell string object.

Parameters
MList:: List of indexable Hulls
Returns
Cell String (from m_topRule)
Todo:
Break infinite recursion

Definition at line 490 of file CSGObject.cpp.

References cellStr(), and procString().

◆ createSurfaceList()

int Mantid::Geometry::CSGObject::createSurfaceList ( const int  outFlag = 0)

create Surface list

Uses the topRule* to create a surface list by iterating throught the tree.

Parameters
outFlag:: Sends output to standard error if true
Returns
1 (should be number of surfaces)

Definition at line 807 of file CSGObject.cpp.

References Mantid::Geometry::Rule::leaf(), m_surList, and m_topRule.

Referenced by operator=(), populate(), removeSurface(), and substituteSurf().

◆ defineBoundingBox()

void Mantid::Geometry::CSGObject::defineBoundingBox ( const double &  xMax,
const double &  yMax,
const double &  zMax,
const double &  xMin,
const double &  yMin,
const double &  zMin 
)

Define axis-aligned bounding box.

Takes input axis aligned bounding box max and min points and stores these as the bounding box for the object.

Can be used when getBoundingBox fails and bounds are known.

Parameters
xMax:: Maximum value for the bounding box in x direction
yMax:: Maximum value for the bounding box in y direction
zMax:: Maximum value for the bounding box in z direction
xMin:: Minimum value for the bounding box in x direction
yMin:: Minimum value for the bounding box in y direction
zMin:: Minimum value for the bounding box in z direction

Definition at line 1942 of file CSGObject.cpp.

References AABBxMax, AABBxMin, AABByMax, AABByMin, AABBzMax, AABBzMin, boolBounded, Mantid::Geometry::BoundingBox::checkValid(), defineBoundingBox(), m_boundingBox, and PARALLEL_CRITICAL.

Referenced by calcBoundingBoxByGeometry(), calcBoundingBoxByRule(), calcBoundingBoxByVertices(), defineBoundingBox(), and getBoundingBox().

◆ distance()

double Mantid::Geometry::CSGObject::distance ( const Track track) const
overridevirtual

Compute the distance to the first point of intersection with the surface.

Parameters
trackTrack defining start/direction
Returns
The distance to the object
Exceptions
std::runtime_errorif no intersection was found

Implements Mantid::Geometry::IObject.

Definition at line 1130 of file CSGObject.cpp.

References Mantid::Geometry::Track::direction(), Mantid::Geometry::LineIntersectVisit::getDistance(), m_surList, Mantid::Geometry::LineIntersectVisit::sortAndRemoveDuplicates(), and Mantid::Geometry::Track::startPoint().

◆ draw()

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

Draws the Object using geometry handler, If the handler is not set then this function does nothing.

Implements Mantid::Geometry::IObject.

Definition at line 2127 of file CSGObject.cpp.

References m_handler.

◆ generatePointInObject() [1/2]

boost::optional< Kernel::V3D > Mantid::Geometry::CSGObject::generatePointInObject ( Kernel::PseudoRandomNumberGenerator rng,
const BoundingBox activeRegion,
const size_t  maxAttempts 
) const
overridevirtual

Generate a random point within the object that is also bound by the activeRegion box.

Parameters
rngA reference to a PseudoRandomNumberGenerator where nextValue should return a flat random number between 0.0 & 1.0
activeRegionRestrict point generation to this sub-region of the object
maxAttemptsThe maximum number of attempts at generating a point
Returns
whether a point was generated in the object or not

Implements Mantid::Geometry::IObject.

Definition at line 2047 of file CSGObject.cpp.

References Mantid::Geometry::RandomPoint::bounded(), Mantid::Geometry::detail::ShapeInfo::CUBOID, Mantid::Geometry::detail::ShapeInfo::CYLINDER, GetObjectGeom(), height, Mantid::Geometry::detail::ShapeInfo::HOLLOWCYLINDER, innerRadius, m_handler, radius, shape(), and Mantid::Geometry::detail::ShapeInfo::SPHERE.

◆ generatePointInObject() [2/2]

boost::optional< Kernel::V3D > Mantid::Geometry::CSGObject::generatePointInObject ( Kernel::PseudoRandomNumberGenerator rng,
const size_t  maxAttempts 
) const
overridevirtual

Select a random point within the object.

Generate a random point within the object.

For certain simple shapes, the point is generated directly inside the shape. In the general case, the method simply generates a point within the bounding box and tests if this is a valid point within the object: if so the point is returned otherwise a new point is selected.

Parameters
rngA reference to a PseudoRandomNumberGenerator where nextValue should return a flat random number between 0.0 & 1.0
maxAttemptsThe maximum number of attempts at generating a point
Returns
whether a point was generated in the object or not

Implements Mantid::Geometry::IObject.

Definition at line 2001 of file CSGObject.cpp.

References Mantid::Geometry::detail::ShapeInfo::CUBOID, Mantid::Geometry::detail::ShapeInfo::CYLINDER, Mantid::Geometry::detail::ShapeInfo::HOLLOWCYLINDER, Mantid::Geometry::RandomPoint::inCuboid(), Mantid::Geometry::RandomPoint::inCylinder(), Mantid::Geometry::RandomPoint::inGenericShape(), Mantid::Geometry::RandomPoint::inHollowCylinder(), Mantid::Geometry::RandomPoint::inSphere(), m_handler, shape(), and Mantid::Geometry::detail::ShapeInfo::SPHERE.

◆ getBoundingBox() [1/2]

const BoundingBox & Mantid::Geometry::CSGObject::getBoundingBox ( ) const
overridevirtual

Return cached value of axis-aligned bounding box.

Returns an axis-aligned bounding box that will fit the shape.

Returns
A reference to a bounding box for this shape.

Implements Mantid::Geometry::IObject.

Definition at line 1654 of file CSGObject.cpp.

References calcBoundingBoxByGeometry(), calcBoundingBoxByRule(), calcBoundingBoxByVertices(), defineBoundingBox(), Mantid::Geometry::BoundingBox::isNonNull(), m_boundingBox, m_topRule, and setNullBoundingBox().

Referenced by export_Object(), getPointInObject(), rayTraceSolidAngle(), singleShotMonteCarloVolume(), and triangulatedSolidAngle().

◆ getBoundingBox() [2/2]

void Mantid::Geometry::CSGObject::getBoundingBox ( double &  xmax,
double &  ymax,
double &  zmax,
double &  xmin,
double &  ymin,
double &  zmin 
) const
overridevirtual

Calculate (or return cached value of) Axis Aligned Bounding box (DEPRECATED)

Takes input axis aligned bounding box max and min points and calculates the bounding box for the object and returns them back in max and min points.

Parameters
xmax:: Maximum value for the bounding box in x direction
ymax:: Maximum value for the bounding box in y direction
zmax:: Maximum value for the bounding box in z direction
xmin:: Minimum value for the bounding box in x direction
ymin:: Minimum value for the bounding box in y direction
zmin:: Minimum value for the bounding box in z direction

Implements Mantid::Geometry::IObject.

Definition at line 1900 of file CSGObject.cpp.

References AABBxMax, AABBxMin, AABByMax, AABByMin, AABBzMax, AABBzMin, boolBounded, and m_topRule.

Referenced by Mantid::Geometry::CompObj::getBoundingBox().

◆ getGeometryHandler()

std::shared_ptr< GeometryHandler > Mantid::Geometry::CSGObject::getGeometryHandler ( ) const
overridevirtual

Returns the geometry handler.

Implements Mantid::Geometry::IObject.

Definition at line 2164 of file CSGObject.cpp.

References m_handler.

◆ getName()

int Mantid::Geometry::CSGObject::getName ( ) const
inlineoverridevirtual

Get Name.

Implements Mantid::Geometry::IObject.

Definition at line 81 of file CSGObject.h.

◆ GetObjectGeom()

void Mantid::Geometry::CSGObject::GetObjectGeom ( detail::ShapeInfo::GeometryShape type,
std::vector< Kernel::V3D > &  vectors,
double &  innerRadius,
double &  radius,
double &  height 
) const
overridevirtual

get info on standard shapes

Implements Mantid::Geometry::IObject.

Definition at line 2243 of file CSGObject.cpp.

References height, innerRadius, m_handler, Mantid::Geometry::detail::ShapeInfo::NOSHAPE, and radius.

Referenced by generatePointInObject(), triangulatedSolidAngle(), and volume().

◆ getPointInObject()

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

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

Parameters
[out]point:: on exit set to the point value, if found
Returns
1 if point found, 0 otherwise

Implements Mantid::Geometry::IObject.

Definition at line 1967 of file CSGObject.cpp.

References Mantid::Geometry::BoundingBox::centrePoint(), getBoundingBox(), Mantid::Geometry::BoundingBox::isNonNull(), and searchForObject().

Referenced by rayTraceSolidAngle().

◆ getShapeXML()

std::string Mantid::Geometry::CSGObject::getShapeXML ( ) const

Getter for the shape xml.

Returns
the shape xml.

Definition at line 2254 of file CSGObject.cpp.

References m_shapeXML.

Referenced by export_Object().

◆ getSurfaceIndex()

std::vector< int > Mantid::Geometry::CSGObject::getSurfaceIndex ( ) const

Returns all of the numbers of surfaces.

Returns
Surface numbers

Definition at line 856 of file CSGObject.cpp.

References Mantid::Geometry::Surface::getName(), and m_surList.

◆ getSurfacePtr() [1/2]

std::vector< const Surface * > & Mantid::Geometry::CSGObject::getSurfacePtr ( )
inline

Get the list of surfaces.

Definition at line 116 of file CSGObject.h.

◆ getSurfacePtr() [2/2]

const std::vector< const Surface * > & Mantid::Geometry::CSGObject::getSurfacePtr ( ) const
inline

Get the list of surfaces (const version)

Definition at line 114 of file CSGObject.h.

◆ getTriangleFaces()

const std::vector< uint32_t > & Mantid::Geometry::CSGObject::getTriangleFaces ( ) const
private

for solid angle from triangulation

get faces

Definition at line 2217 of file CSGObject.cpp.

References m_handler.

Referenced by triangulatedSolidAngle().

◆ getTriangleVertices()

const std::vector< double > & Mantid::Geometry::CSGObject::getTriangleVertices ( ) const
private

get vertices

Definition at line 2207 of file CSGObject.cpp.

References m_handler.

Referenced by calcBoundingBoxByVertices(), and triangulatedSolidAngle().

◆ hasComplement()

int Mantid::Geometry::CSGObject::hasComplement ( ) const

Determine if the object has a complementary object.

Return values
1:: true
0:: false

Definition at line 581 of file CSGObject.cpp.

References m_topRule.

◆ hasValidShape()

bool Mantid::Geometry::CSGObject::hasValidShape ( ) const
overridevirtual

Return whether this object has a valid shape.

Returns whether this object has a valid shape.

Returns
True if the surface list is populated and there is a defined m_topRule, false otherwise.

Implements Mantid::Geometry::IObject.

Definition at line 455 of file CSGObject.cpp.

References m_surList, and m_topRule.

◆ id()

const std::string & Mantid::Geometry::CSGObject::id ( ) const
inlineoverridevirtual

Implements Mantid::Geometry::IObject.

Definition at line 78 of file CSGObject.h.

◆ initDraw()

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

Initializes/prepares the object to be rendered, this will generate geometry for object, If the handler is not set then this function does nothing.

Implements Mantid::Geometry::IObject.

Definition at line 2139 of file CSGObject.cpp.

References m_handler.

◆ interceptSurface()

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

◆ isFiniteGeometry()

bool Mantid::Geometry::CSGObject::isFiniteGeometry ( ) const
inlineoverridevirtual

Reimplemented from Mantid::Geometry::IObject.

Definition at line 72 of file CSGObject.h.

◆ isOnSide()

bool Mantid::Geometry::CSGObject::isOnSide ( const Kernel::V3D point) const
overridevirtual
  • (a) Uses the Surface list to check those surface that the point is on.
  • (b) Creates a list of normals to the touching surfaces
  • (c) Checks if normals and "normal pair bisection vector" are contary. If any are found to be so the the point is on a surface.
  • (d) Return 1 / 0 depending on test (c)

    Todo:
    This needs to be completed to deal with apex points In the case of a apex (e.g. top of a pyramid) you need to interate over all clusters of points on the Snorm ie. sum of 2, sum of 3 sum of 4. etc. to be certain to get a correct normal test.
Parameters
point:: Point to check
Returns
true if the point is on the surface

Implements Mantid::Geometry::IObject.

Definition at line 732 of file CSGObject.cpp.

References checkSurfaceValid(), m_surList, and Mantid::Kernel::V3D::normalize().

Referenced by rayTraceSolidAngle(), and triangulatedSolidAngle().

◆ isValid() [1/2]

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

Check if a point is valid.

Determines is point is within the object or on the surface.

Parameters
point:: Point to be tested
Returns
1 if true and 0 if false

Implements Mantid::Geometry::IObject.

Definition at line 784 of file CSGObject.cpp.

References m_topRule.

Referenced by calcValidType(), calcValidTypeBy3Points(), checkSurfaceValid(), rayTraceSolidAngle(), searchForObject(), singleShotMonteCarloVolume(), and triangulatedSolidAngle().

◆ isValid() [2/2]

bool Mantid::Geometry::CSGObject::isValid ( const std::map< int, int > &  SMap) const

Check if a set of surfaces are valid.

Determines is group of surface maps are valid.

Parameters
SMap:: map of SurfaceNumber : status
Returns
1 if true and 0 if false

Definition at line 795 of file CSGObject.cpp.

References m_topRule.

◆ makeComplement()

void Mantid::Geometry::CSGObject::makeComplement ( )

Takes the complement of a group.

Definition at line 937 of file CSGObject.cpp.

References m_topRule, and procComp().

◆ material()

const Kernel::Material & Mantid::Geometry::CSGObject::material ( ) const
overridevirtual
Returns
The Material that the object is composed from

Implements Mantid::Geometry::IObject.

Definition at line 448 of file CSGObject.cpp.

References m_material.

Referenced by operator=(), and setMaterial().

◆ monteCarloVolume()

double Mantid::Geometry::CSGObject::monteCarloVolume ( ) const
private

Returns the volume.

Calculates the volume of this object by the Monte Carlo method.

This method manages singleShotMonteCarloVolume() and uses the standard error as the convergence criteria.

Returns
The simulated volume of this object.

Definition at line 1568 of file CSGObject.cpp.

References singleShotMonteCarloVolume(), and volume().

Referenced by volume().

◆ numberOfTriangles()

size_t Mantid::Geometry::CSGObject::numberOfTriangles ( ) const
private

Definition at line 2194 of file CSGObject.cpp.

References m_handler.

Referenced by solidAngle(), and triangulatedSolidAngle().

◆ numberOfVertices()

size_t Mantid::Geometry::CSGObject::numberOfVertices ( ) const
private

Definition at line 2199 of file CSGObject.cpp.

References m_handler.

Referenced by calcBoundingBoxByVertices().

◆ operator=()

CSGObject & Mantid::Geometry::CSGObject::operator= ( const CSGObject A)

Assignment operator.

Parameters
A:: Object to copy
Returns
*this

Definition at line 412 of file CSGObject.cpp.

References AABBxMax, AABBxMin, AABByMax, AABByMin, AABBzMax, AABBzMin, bGeometryCaching, boolBounded, createSurfaceList(), m_handler, m_id, m_material, m_objNum, m_shapeXML, m_topRule, material(), vtkCacheReader, and vtkCacheWriter.

◆ populate()

int Mantid::Geometry::CSGObject::populate ( const std::map< int, std::shared_ptr< Surface > > &  surfMap)

Goes through the cell objects and adds the pointers to the SurfPoint keys (using their keyN)

Parameters
surfMap:: Map of surface Keys and Surface Pointers
Return values
1000+keyNumber :: Error with keyNumber
0:: successfully populated all the whole Object.

Definition at line 595 of file CSGObject.cpp.

References createSurfaceList(), Mantid::Geometry::Rule::leaf(), m_topRule, and Mantid::Geometry::SurfPoint::setKey().

◆ print()

void Mantid::Geometry::CSGObject::print ( ) const
virtual

Prints almost everything.

Definition at line 898 of file CSGObject.cpp.

References Mantid::Geometry::Rule::leaf(), m_objNum, and m_topRule.

◆ printTree()

void Mantid::Geometry::CSGObject::printTree ( ) const

Displays the rule tree.

Definition at line 945 of file CSGObject.cpp.

References m_objNum, and m_topRule.

◆ procComp()

std::unique_ptr< CompGrp > Mantid::Geometry::CSGObject::procComp ( std::unique_ptr< Rule ruleItem) const
private

Takes a Rule item and makes it a complementary group.

Parameters
ruleItem:: to encapsulate
Returns
the complementary group

Definition at line 698 of file CSGObject.cpp.

References Mantid::Geometry::Rule::findLeaf(), Mantid::Geometry::Rule::getParent(), and Mantid::Geometry::Rule::setLeaf().

Referenced by makeComplement(), and procString().

◆ procPair()

int Mantid::Geometry::CSGObject::procPair ( std::string &  lineStr,
std::map< int, std::unique_ptr< Rule > > &  ruleMap,
int &  compUnit 
) const
private

This takes a string lineStr, finds the first two Rxxx function, determines their join type make the rule, adds to vector then removes two old rules from the vector, updates string.

Parameters
lineStr:: String to process
ruleMap:: Map of rules (added to)
compUnit:: Last computed unit
Return values
0:: No rule to find
1:: A rule has been combined

Definition at line 639 of file CSGObject.cpp.

References Mantid::Kernel::Strings::convert().

Referenced by procString().

◆ procString()

int Mantid::Geometry::CSGObject::procString ( const std::string &  lineStr)

Processes the cell string.

This is an internal function to process a string with - String type has #( and ( )

Parameters
lineStr:: String value
Returns
1 on success

Definition at line 994 of file CSGObject.cpp.

References Mantid::Kernel::Strings::convPartNum(), m_topRule, procComp(), procPair(), and std::to_string().

Referenced by complementaryObject(), convertComplement(), and setObject().

◆ rayTraceSolidAngle()

double Mantid::Geometry::CSGObject::rayTraceSolidAngle ( const Kernel::V3D observer) const

◆ removeSurface()

int Mantid::Geometry::CSGObject::removeSurface ( const int  surfNum)

Removes a surface and then re-builds the cell.

This could be done by just removing the surface from the object.

Parameters
surfNum:: Number for the surface
Returns
number of surfaces removed

Definition at line 870 of file CSGObject.cpp.

References createSurfaceList(), m_topRule, and Mantid::Geometry::Rule::removeItem().

◆ searchForObject()

int Mantid::Geometry::CSGObject::searchForObject ( Kernel::V3D point) const
private

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

Parameters
point:: on entry the seed point, on exit point in object, if found
Returns
1 if point found, 0 otherwise

Definition at line 2096 of file CSGObject.cpp.

References Mantid::Geometry::Track::cbegin(), interceptSurface(), and isValid().

Referenced by getPointInObject().

◆ setFiniteGeometryFlag()

void Mantid::Geometry::CSGObject::setFiniteGeometryFlag ( bool  isFinite)
inlineoverridevirtual

Reimplemented from Mantid::Geometry::IObject.

Definition at line 73 of file CSGObject.h.

◆ setGeometryHandler()

void Mantid::Geometry::CSGObject::setGeometryHandler ( const std::shared_ptr< GeometryHandler > &  h)

Set Geometry Handler.

Set the geometry handler for Object.

Parameters
[in]his pointer to the geometry handler.

Definition at line 2118 of file CSGObject.cpp.

References m_handler.

◆ setID()

void Mantid::Geometry::CSGObject::setID ( const std::string &  id)
inlineoverridevirtual

Implements Mantid::Geometry::IObject.

Definition at line 77 of file CSGObject.h.

◆ setMaterial()

void Mantid::Geometry::CSGObject::setMaterial ( const Kernel::Material material)
overridevirtual
Parameters
materialThe new Material that the object is composed from

Implements Mantid::Geometry::IObject.

Definition at line 443 of file CSGObject.cpp.

References m_material, and material().

◆ setName()

void Mantid::Geometry::CSGObject::setName ( const int  objNum)
inline

Set Name.

Definition at line 80 of file CSGObject.h.

◆ setNullBoundingBox()

void Mantid::Geometry::CSGObject::setNullBoundingBox ( )

Set a null bounding box for this object.

Set the bounding box to a null box.

Definition at line 1960 of file CSGObject.cpp.

References m_boundingBox.

Referenced by getBoundingBox().

◆ setObject()

int Mantid::Geometry::CSGObject::setObject ( const int  objName,
const std::string &  lineStr 
)

Object line == cell.

Parameters
objName:: Object name
lineStr:: Input string must be : {rules}
Returns
1 on success and zero on failure

Definition at line 466 of file CSGObject.cpp.

References m_objNum, m_surList, procString(), and Mantid::Kernel::Strings::StrLook().

◆ setVtkGeometryCacheReader()

void Mantid::Geometry::CSGObject::setVtkGeometryCacheReader ( std::shared_ptr< vtkGeometryCacheReader reader)

set vtkGeometryCache reader

Definition at line 2156 of file CSGObject.cpp.

References updateGeometryHandler(), and vtkCacheReader.

◆ setVtkGeometryCacheWriter()

void Mantid::Geometry::CSGObject::setVtkGeometryCacheWriter ( std::shared_ptr< vtkGeometryCacheWriter writer)

set vtkGeometryCache writer

Definition at line 2148 of file CSGObject.cpp.

References updateGeometryHandler(), and vtkCacheWriter.

◆ shape()

detail::ShapeInfo::GeometryShape Mantid::Geometry::CSGObject::shape ( ) const
overridevirtual

Implements Mantid::Geometry::IObject.

Definition at line 2224 of file CSGObject.cpp.

References m_handler, and Mantid::Geometry::detail::ShapeInfo::NOSHAPE.

Referenced by generatePointInObject().

◆ shapeInfo()

const detail::ShapeInfo & Mantid::Geometry::CSGObject::shapeInfo ( ) const
overridevirtual

◆ singleShotMonteCarloVolume()

double Mantid::Geometry::CSGObject::singleShotMonteCarloVolume ( const int  shotSize,
const size_t  seed 
) const
private

Returns the volume.

Calculates the volume using the Monte Carlo method.

Parameters
shotSizeNumber of iterations.
seedA number to seed the random number generator.
Returns
The simulated volume of this object.

Definition at line 1602 of file CSGObject.cpp.

References getBoundingBox(), isValid(), PARALLEL, PARALLEL_ATOMIC, PARALLEL_NUMBER_OF_THREADS, PARALLEL_THREAD_NUMBER, Mantid::Geometry::x, Mantid::Geometry::y, and Mantid::Geometry::z.

Referenced by monteCarloVolume().

◆ solidAngle() [1/2]

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

Find solid angle of object wrt the observer.

This interface routine calls either getTriangleSolidAngle or getRayTraceSolidAngle. Choice made on number of triangles in the discrete surface representation.

Parameters
observer:: point to measure solid angle from
Returns
:: estimate of solid angle of object. Accuracy depends on object shape.

Implements Mantid::Geometry::IObject.

Definition at line 1216 of file CSGObject.cpp.

References numberOfTriangles(), rayTraceSolidAngle(), and triangulatedSolidAngle().

◆ solidAngle() [2/2]

double Mantid::Geometry::CSGObject::solidAngle ( const Kernel::V3D observer,
const Kernel::V3D scaleFactor 
) const
overridevirtual

Find solid angle of object wrt the observer with a scaleFactor for the object.

Parameters
observer:: point to measure solid angle from
scaleFactor:: V3D giving scaling of the object
Returns
:: estimate of solid angle of object. Accuracy depends on triangulation quality.

Implements Mantid::Geometry::IObject.

Definition at line 1230 of file CSGObject.cpp.

References triangulatedSolidAngle().

◆ str()

std::string Mantid::Geometry::CSGObject::str ( ) const

Write the object to a string.

This includes the Name but not post-fix operators

Returns
Object Line

Definition at line 967 of file CSGObject.cpp.

References m_objNum, and m_topRule.

Referenced by write().

◆ substituteSurf()

int Mantid::Geometry::CSGObject::substituteSurf ( const int  surfNum,
const int  newSurfNum,
const std::shared_ptr< Surface > &  surfPtr 
)

Removes a surface and then re-builds the cell.

Parameters
surfNum:: Number for the surface
newSurfNum:: New surface number
surfPtr:: Surface pointer for surface NsurfN
Returns
number of surfaces substituted

Definition at line 886 of file CSGObject.cpp.

References createSurfaceList(), and m_topRule.

◆ topRule()

const Rule * Mantid::Geometry::CSGObject::topRule ( ) const
inline

Return the top rule.

Definition at line 76 of file CSGObject.h.

Referenced by cellStr().

◆ triangulatedSolidAngle() [1/2]

double Mantid::Geometry::CSGObject::triangulatedSolidAngle ( const Kernel::V3D observer) const

◆ triangulatedSolidAngle() [2/2]

double Mantid::Geometry::CSGObject::triangulatedSolidAngle ( const Kernel::V3D observer,
const Kernel::V3D scaleFactor 
) const

Find solid angle of object from point "observer" using the OC triangulation of the object, if it exists.

This method expects a scaling vector scaleFactor that scales the three axes.

Parameters
observer:: Point from which solid angle is required.
scaleFactor:: V3D each component giving the scaling of the object only (not observer)
Returns
the solid angle

Definition at line 1441 of file CSGObject.cpp.

References Mantid::Geometry::detail::ShapeInfo::CUBOID, getBoundingBox(), GetObjectGeom(), getTriangleFaces(), getTriangleVertices(), height, innerRadius, Mantid::Geometry::BoundingBox::isNonNull(), isOnSide(), Mantid::Geometry::BoundingBox::isPointInside(), isValid(), numberOfTriangles(), radius, rayTraceSolidAngle(), and Mantid::Geometry::detail::ShapeInfo::SPHERE.

◆ updateGeometryHandler()

void Mantid::Geometry::CSGObject::updateGeometryHandler ( )
private

Updates the geometry handler if needed.

Definition at line 2173 of file CSGObject.cpp.

References bGeometryCaching, m_handler, vtkCacheReader, and vtkCacheWriter.

Referenced by Mantid::Geometry::GeometryHandler::initialize(), setVtkGeometryCacheReader(), and setVtkGeometryCacheWriter().

◆ volume()

double Mantid::Geometry::CSGObject::volume ( ) const
overridevirtual

Calculates the volume of this object.

For simple shapes, the volume is calculated exactly.

For more complex cases, we fall back to Monte Carlo.

Returns
The volume.

Implements Mantid::Geometry::IObject.

Definition at line 1512 of file CSGObject.cpp.

References Mantid::Kernel::V3D::cross_prod(), Mantid::Geometry::detail::ShapeInfo::CUBOID, Mantid::Geometry::detail::ShapeInfo::CYLINDER, GetObjectGeom(), height, Mantid::Geometry::detail::ShapeInfo::HOLLOWCYLINDER, innerRadius, monteCarloVolume(), radius, Mantid::Kernel::V3D::scalar_prod(), Mantid::Geometry::detail::ShapeInfo::SPHERE, and volume().

Referenced by export_Object(), monteCarloVolume(), and volume().

◆ write()

void Mantid::Geometry::CSGObject::write ( std::ostream &  outStream) const

MCNPX output.

Write the object to a standard stream in standard MCNPX output format.

Parameters
outStream:: Output stream (required for multiple std::endl)

Definition at line 981 of file CSGObject.cpp.

References str(), and Mantid::Kernel::Strings::writeMCNPX().

Friends And Related Function Documentation

◆ GeometryHandler

friend class GeometryHandler
friend

Definition at line 220 of file CSGObject.h.

◆ GeometryRenderer

friend class GeometryRenderer
friend

Definition at line 221 of file CSGObject.h.

Member Data Documentation

◆ AABBxMax

double Mantid::Geometry::CSGObject::AABBxMax
mutableprivate

xmax of Axis aligned bounding box cache

Definition at line 208 of file CSGObject.h.

Referenced by defineBoundingBox(), getBoundingBox(), and operator=().

◆ AABBxMin

double Mantid::Geometry::CSGObject::AABBxMin
private

xmin of Axis aligned bounding box cache

Definition at line 211 of file CSGObject.h.

Referenced by defineBoundingBox(), getBoundingBox(), and operator=().

◆ AABByMax

double Mantid::Geometry::CSGObject::AABByMax
private

ymax of Axis aligned bounding box cache

Definition at line 209 of file CSGObject.h.

Referenced by defineBoundingBox(), getBoundingBox(), and operator=().

◆ AABByMin

double Mantid::Geometry::CSGObject::AABByMin
private

xmin of Axis aligned bounding box cache

Definition at line 212 of file CSGObject.h.

Referenced by defineBoundingBox(), getBoundingBox(), and operator=().

◆ AABBzMax

double Mantid::Geometry::CSGObject::AABBzMax
private

zmax of Axis aligned bounding box cache

Definition at line 210 of file CSGObject.h.

Referenced by defineBoundingBox(), getBoundingBox(), and operator=().

◆ AABBzMin

double Mantid::Geometry::CSGObject::AABBzMin
private

zmin of Axis Aligned Bounding Box Cache

Definition at line 213 of file CSGObject.h.

Referenced by defineBoundingBox(), getBoundingBox(), and operator=().

◆ bGeometryCaching

bool Mantid::Geometry::CSGObject::bGeometryCaching
private

Is geometry caching enabled?

Definition at line 223 of file CSGObject.h.

Referenced by operator=(), and updateGeometryHandler().

◆ boolBounded

bool Mantid::Geometry::CSGObject::boolBounded
mutableprivate

flag true if a bounding box exists, either by

Definition at line 214 of file CSGObject.h.

Referenced by defineBoundingBox(), getBoundingBox(), and operator=().

◆ m_boundingBox

BoundingBox Mantid::Geometry::CSGObject::m_boundingBox
private

Object's bounding box.

Definition at line 206 of file CSGObject.h.

Referenced by defineBoundingBox(), getBoundingBox(), and setNullBoundingBox().

◆ m_handler

std::shared_ptr<GeometryHandler> Mantid::Geometry::CSGObject::m_handler
private

◆ m_id

std::string Mantid::Geometry::CSGObject::m_id
private

Optional string identifier.

Definition at line 237 of file CSGObject.h.

Referenced by operator=().

◆ m_isFiniteGeometry

bool Mantid::Geometry::CSGObject::m_isFiniteGeometry = true
private

Whether or not the object geometry is finite.

Definition at line 241 of file CSGObject.h.

◆ m_material

std::unique_ptr<Kernel::Material> Mantid::Geometry::CSGObject::m_material
mutableprivate

material composition

Definition at line 239 of file CSGObject.h.

Referenced by material(), operator=(), and setMaterial().

◆ m_objNum

int Mantid::Geometry::CSGObject::m_objNum
private

Creation number.

Definition at line 217 of file CSGObject.h.

Referenced by complementaryObject(), operator=(), print(), printTree(), setObject(), and str().

◆ m_shapeXML

std::string Mantid::Geometry::CSGObject::m_shapeXML
private

original shape xml used to generate this object.

Definition at line 235 of file CSGObject.h.

Referenced by getShapeXML(), and operator=().

◆ m_surList

std::vector<const Surface *> Mantid::Geometry::CSGObject::m_surList
protected

Full surfaces (make a map.

Definition at line 244 of file CSGObject.h.

Referenced by complementaryObject(), createSurfaceList(), distance(), getSurfaceIndex(), hasValidShape(), interceptSurface(), isOnSide(), and setObject().

◆ m_topRule

std::unique_ptr<Rule> Mantid::Geometry::CSGObject::m_topRule
private

◆ vtkCacheReader

std::shared_ptr<vtkGeometryCacheReader> Mantid::Geometry::CSGObject::vtkCacheReader
private

a pointer to a class for reading from the geometry cache

Definition at line 225 of file CSGObject.h.

Referenced by operator=(), setVtkGeometryCacheReader(), and updateGeometryHandler().

◆ vtkCacheWriter

std::shared_ptr<vtkGeometryCacheWriter> Mantid::Geometry::CSGObject::vtkCacheWriter
private

a pointer to a class for writing to the geometry cache

Definition at line 227 of file CSGObject.h.

Referenced by operator=(), setVtkGeometryCacheWriter(), and updateGeometryHandler().


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