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

This class represents a composite implicit function used for communicating and implementing an operation against an MDWorkspace. More...

#include <CompositeImplicitFunction.h>

Inheritance diagram for Mantid::Geometry::CompositeImplicitFunction:
Mantid::Geometry::MDImplicitFunction

Public Member Functions

bool addFunction (const Mantid::Geometry::MDImplicitFunction_sptr &constituentFunction)
 
std::string getName () const override
 
int getNFunctions () const
 Return the number of functions in this composite. More...
 
virtual bool isPointContained (const coord_t *coords)
 Is a point in MDimensions contained by this ImplicitFunction? If the point is bounded by ALL planes contained, then this returns true. More...
 
bool isPointContained (const coord_t *coords) override
 Is a point in MDimensions contained by this ImplicitFunction? If the point is bounded by ALL planes contained, then this returns true. More...
 
virtual bool isPointContained (const Mantid::Kernel::VMD &coords)
 Is a point in MDimensions contained by this ImplicitFunction? If the point is bounded by ALL planes contained, then this returns true. More...
 
virtual bool isPointContained (const std::vector< coord_t > &coords)
 Is a point in MDimensions contained by this ImplicitFunction? If the point is bounded by ALL planes contained, then this returns true. More...
 
bool isPointContained (const std::vector< coord_t > &coords) override
 Is a point in MDimensions contained by this ImplicitFunction? If the point is bounded by ALL planes contained, then this returns true. More...
 
std::string toXMLString () const override
 Serialize to XML. More...
 
- Public Member Functions inherited from Mantid::Geometry::MDImplicitFunction
void addPlane (const MDPlane &plane)
 Add a bounded plane to this implicit function. More...
 
eContact boxContact (const coord_t *vertexes, const size_t numPoints) const
 Determine how a box (consisting of a number of vertexes) is in contact with the implicit function. More...
 
virtual std::string getName () const
 
size_t getNumDims () const
 
size_t getNumPlanes () const
 
const MDPlanegetPlane (size_t index) const
 
bool isBoxTouching (const coord_t *vertexes, const size_t numPoints)
 Same as isBoxTouching(vector), except that it takes a bare array of coordinates. More...
 
bool isBoxTouching (const std::vector< std::vector< coord_t > > &vertexes)
 Is there a chance that the box defined by these vertexes touches the implicit function volume? More...
 
virtual bool isPointContained (const coord_t *coords)
 Is a point in MDimensions contained by this ImplicitFunction? If the point is bounded by ALL planes contained, then this returns true. More...
 
virtual bool isPointContained (const Mantid::Kernel::VMD &coords)
 Is a point in MDimensions contained by this ImplicitFunction? If the point is bounded by ALL planes contained, then this returns true. More...
 
virtual bool isPointContained (const std::vector< coord_t > &coords)
 Is a point in MDimensions contained by this ImplicitFunction? If the point is bounded by ALL planes contained, then this returns true. More...
 
 MDImplicitFunction ()
 Constructor. More...
 
virtual std::string toXMLString () const
 
virtual ~MDImplicitFunction ()=default
 

Static Public Member Functions

static std::string functionName ()
 

Protected Types

using FunctionIterator = std::vector< Mantid::Geometry::MDImplicitFunction_sptr >::const_iterator
 

Protected Attributes

std::vector< Mantid::Geometry::MDImplicitFunction_sptrm_Functions
 
- Protected Attributes inherited from Mantid::Geometry::MDImplicitFunction
size_t m_nd
 number of dimensions for which this object can be applied More...
 
size_t m_numPlanes
 Cached number of planes (for a sligh speed-up) More...
 
std::vector< MDPlanem_planes
 Vector of all the planes applying for this implict function. More...
 

Additional Inherited Members

- Public Types inherited from Mantid::Geometry::MDImplicitFunction
enum  eContact { NOT_TOUCHING = 0 , TOUCHING = 1 , CONTAINED = 2 }
 Enum for describing the contact between a box and an implicit function. More...
 

Detailed Description

This class represents a composite implicit function used for communicating and implementing an operation against an MDWorkspace.

Author
Owen Arnold, Tessella plc
Date
01/10/2010

Definition at line 30 of file CompositeImplicitFunction.h.

Member Typedef Documentation

◆ FunctionIterator

Definition at line 47 of file CompositeImplicitFunction.h.

Member Function Documentation

◆ addFunction()

bool Mantid::Geometry::CompositeImplicitFunction::addFunction ( const Mantid::Geometry::MDImplicitFunction_sptr constituentFunction)

Definition at line 24 of file CompositeImplicitFunction.cpp.

References m_Functions.

◆ functionName()

static std::string Mantid::Geometry::CompositeImplicitFunction::functionName ( )
inlinestatic

Definition at line 43 of file CompositeImplicitFunction.h.

Referenced by getName().

◆ getName()

std::string Mantid::Geometry::CompositeImplicitFunction::getName ( ) const
overridevirtual
Returns
the MDImplicitFunction type name.

Reimplemented from Mantid::Geometry::MDImplicitFunction.

Definition at line 33 of file CompositeImplicitFunction.cpp.

References functionName().

Referenced by toXMLString().

◆ getNFunctions()

int Mantid::Geometry::CompositeImplicitFunction::getNFunctions ( ) const

Return the number of functions in this composite.

Definition at line 64 of file CompositeImplicitFunction.cpp.

References m_Functions.

◆ isPointContained() [1/5]

virtual bool Mantid::Geometry::MDImplicitFunction::isPointContained ( const coord_t coords)
inlinevirtual

Is a point in MDimensions contained by this ImplicitFunction? If the point is bounded by ALL planes contained, then this returns true.

Parameters
coords:: nd-sized array of coordinates
Returns
true if it is contained in the implicit function.

Reimplemented from Mantid::Geometry::MDImplicitFunction.

Definition at line 94 of file MDImplicitFunction.h.

◆ isPointContained() [2/5]

bool Mantid::Geometry::CompositeImplicitFunction::isPointContained ( const coord_t coords)
overridevirtual

Is a point in MDimensions contained by this ImplicitFunction? If the point is bounded by ALL planes contained, then this returns true.

Parameters
coords:: nd-sized array of coordinates
Returns
true if it is contained in the implicit function.

Reimplemented from Mantid::Geometry::MDImplicitFunction.

Definition at line 66 of file CompositeImplicitFunction.cpp.

References m_Functions.

◆ isPointContained() [3/5]

virtual bool Mantid::Geometry::MDImplicitFunction::isPointContained ( const Mantid::Kernel::VMD coords)
inlinevirtual

Is a point in MDimensions contained by this ImplicitFunction? If the point is bounded by ALL planes contained, then this returns true.

Parameters
coords:: nd-sized array of coordinates
Returns
true if it is contained in the implicit function.

Reimplemented from Mantid::Geometry::MDImplicitFunction.

Definition at line 110 of file MDImplicitFunction.h.

◆ isPointContained() [4/5]

virtual bool Mantid::Geometry::MDImplicitFunction::isPointContained ( const std::vector< coord_t > &  coords)
inlinevirtual

Is a point in MDimensions contained by this ImplicitFunction? If the point is bounded by ALL planes contained, then this returns true.

Parameters
coords:: nd-sized vector of coordinates. No size-check is made!
Returns
true if it is contained in the implicit function.

Reimplemented from Mantid::Geometry::MDImplicitFunction.

Definition at line 126 of file MDImplicitFunction.h.

◆ isPointContained() [5/5]

bool Mantid::Geometry::CompositeImplicitFunction::isPointContained ( const std::vector< coord_t > &  coords)
overridevirtual

Is a point in MDimensions contained by this ImplicitFunction? If the point is bounded by ALL planes contained, then this returns true.

Parameters
coords:: nd-sized vector of coordinates. No size-check is made!
Returns
true if it is contained in the implicit function.

Reimplemented from Mantid::Geometry::MDImplicitFunction.

Definition at line 78 of file CompositeImplicitFunction.cpp.

References m_Functions.

◆ toXMLString()

std::string Mantid::Geometry::CompositeImplicitFunction::toXMLString ( ) const
overridevirtual

Serialize to XML.

Reimplemented from Mantid::Geometry::MDImplicitFunction.

Definition at line 36 of file CompositeImplicitFunction.cpp.

References getName(), and m_Functions.

Member Data Documentation

◆ m_Functions

std::vector<Mantid::Geometry::MDImplicitFunction_sptr> Mantid::Geometry::CompositeImplicitFunction::m_Functions
protected

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