Mantid
|
Compemented Object. More...
#include <Rules.h>
Public Member Functions | |
std::string | className () const override |
Returns class name as string. More... | |
std::unique_ptr< CompObj > | clone () const |
Clone of this. More... | |
CompObj () | |
Constructor. More... | |
std::string | display () const override |
Displays the object as #number. More... | |
std::string | displayAddress () const override |
Returns the memory address as a string. More... | |
Rule * | findKey (const int i) override |
This is a complementary object and we dont search into CompObjs. More... | |
int | findLeaf (const Rule *) const override |
Check to see if this is a copy of a given Rule. More... | |
void | getBoundingBox (double &xmax, double &ymax, double &zmax, double &xmin, double &ymin, double &zmin) override |
gets the bounding box for the Complementary of the object More... | |
CSGObject * | getObj () const |
Get Object Ptr. More... | |
int | getObjN () const |
Get object number of component. More... | |
int | isComplementary () const override |
Always returns true (1) More... | |
bool | isValid (const Kernel::V3D &) const override |
Determines if a point is valid. More... | |
bool | isValid (const std::map< int, int > &) const override |
Determines if a point is valid. More... | |
void | setLeaf (std::unique_ptr< Rule >, const int=0) override |
Replaces a leaf with a rule. More... | |
void | setLeaves (std::unique_ptr< Rule >, std::unique_ptr< Rule >) override |
Replaces a leaf with a rule. More... | |
void | setObj (CSGObject *) |
Set a Object state. More... | |
void | setObjN (const int Ky) |
set object Number More... | |
int | simplify () override |
Impossible to simplify a simple rule leaf. More... | |
int | type () const override |
Is it a branched object. More... | |
Public Member Functions inherited from Mantid::Geometry::Rule | |
int | checkParents () const |
Debug test for parents. More... | |
virtual std::string | className () const |
Returns class name as string. More... | |
std::unique_ptr< Rule > | clone () const |
int | commonType () const |
Gets a common type. More... | |
virtual std::string | display () const =0 |
Abstract Display. More... | |
virtual std::string | displayAddress () const =0 |
Abstract Display Address. More... | |
int | Eliminate () |
elimination not written More... | |
virtual Rule * | findKey (const int)=0 |
Abstract key find. More... | |
virtual int | findLeaf (const Rule *) const =0 |
Abstract find. More... | |
virtual void | getBoundingBox (double &xmax, double &ymax, double &zmax, double &xmin, double &ymin, double &zmin)=0 |
Abstract getBoundingBox. More... | |
int | getKeyList (std::vector< int > &) const |
Generate the key list given an insertion type object. More... | |
Rule * | getParent () const |
Returns the parent object. More... | |
virtual int | isComplementary () const |
Always returns false (0) More... | |
virtual bool | isValid (const Kernel::V3D &) const =0 |
Abstract: The point is within the object. More... | |
virtual bool | isValid (const std::map< int, int > &) const =0 |
Abstract Validity based on surface true/false map. More... | |
virtual Rule * | leaf (const int=0) const |
No leaf for a base rule. More... | |
void | makeParents () |
This is initialisation code that populates all the parents in the rule tree. More... | |
Rule () | |
Standard Constructor. More... | |
Rule (Rule *) | |
Constructor copies. More... | |
virtual void | setLeaf (std::unique_ptr< Rule >, const int=0)=0 |
Abstract set. More... | |
virtual void | setLeaves (std::unique_ptr< Rule >, std::unique_ptr< Rule >)=0 |
abstract set leaves More... | |
void | setParent (Rule *) |
Sets the parent object (not check for A==this) More... | |
virtual int | simplify ()=0 |
Abstract: Can the rule be simplified. More... | |
int | substituteSurf (const int SurfN, const int newSurfN, const std::shared_ptr< Surface > &SPtr) |
Substitues a surface item if within a rule. More... | |
virtual int | type () const |
Null rule. More... | |
virtual | ~Rule ()=default |
Protected Member Functions | |
CompObj (const CompObj &)=default | |
CompObj & | operator= (const CompObj &)=default |
Protected Member Functions inherited from Mantid::Geometry::Rule | |
Rule & | operator= (const Rule &) |
Assignment operator= does not set parent as Rules are cloned. More... | |
Rule (const Rule &) | |
Constructor copies. More... | |
Private Member Functions | |
CompObj * | doClone () const override |
Clone of this. More... | |
Private Attributes | |
CSGObject * | key |
Object Pointer. More... | |
int | objN |
Object number. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Mantid::Geometry::Rule | |
static int | makeCNF (std::unique_ptr< Rule > &) |
Make Rule into a CNF format. More... | |
static int | makeCNFcopy (std::unique_ptr< Rule > &) |
Make Rule into a CNF format (slow) More... | |
static int | makeFullDNF (std::unique_ptr< Rule > &) |
Make Rule into a full DNF format. More... | |
static int | removeComplementary (std::unique_ptr< Rule > &) |
NOT WORKING. More... | |
static int | removeItem (std::unique_ptr< Rule > &TRule, const int SurfN) |
Given an item as a surface name, remove the surface from the Rule tree. More... | |
Compemented Object.
This class holds a complement object of a single object group. Care must be taken to avoid a cyclic loop
|
protecteddefault |
Mantid::Geometry::CompObj::CompObj | ( | ) |
|
inlineoverridevirtual |
Returns class name as string.
Reimplemented from Mantid::Geometry::Rule.
std::unique_ptr< CompObj > Mantid::Geometry::CompObj::clone | ( | ) | const |
Clone of this.
Definition at line 947 of file RuleItems.cpp.
References doClone().
|
overridevirtual |
Displays the object as #number.
Implements Mantid::Geometry::Rule.
Definition at line 1061 of file RuleItems.cpp.
References objN.
|
overridevirtual |
Returns the memory address as a string.
Implements Mantid::Geometry::Rule.
Definition at line 1072 of file RuleItems.cpp.
|
overrideprivatevirtual |
Clone of this.
Implements Mantid::Geometry::Rule.
Definition at line 938 of file RuleItems.cpp.
References CompObj().
Referenced by clone().
|
overridevirtual |
This is a complementary object and we dont search into CompObjs.
If that is needed then the CompObj should be removed first
i | :: Null index key |
Implements Mantid::Geometry::Rule.
Definition at line 1003 of file RuleItems.cpp.
|
overridevirtual |
Check to see if this is a copy of a given Rule.
A | :: Rule Ptr to find |
0 | on success -ve on failuire |
Implements Mantid::Geometry::Rule.
Definition at line 1016 of file RuleItems.cpp.
|
overridevirtual |
gets the bounding box for the Complementary of the object
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 |
To calculate the bounding box is formed by the all the points in input box that are not in object bounding box and all the points in object bounding box that are in the input box
Implements Mantid::Geometry::Rule.
Definition at line 1093 of file RuleItems.cpp.
References Mantid::Geometry::CSGObject::getBoundingBox(), and key.
|
inline |
|
inline |
|
inlineoverridevirtual |
Always returns true (1)
Reimplemented from Mantid::Geometry::Rule.
|
overridevirtual |
Determines if a point is valid.
Checks to see if the point is valid in the object and returns ture if it is not valid.
Pt | :: Point to test |
not | valid in the object |
true | is no object is set |
Implements Mantid::Geometry::Rule.
Definition at line 1026 of file RuleItems.cpp.
|
overridevirtual |
Determines if a point is valid.
SMap | :: map of surface number and true values |
Implements Mantid::Geometry::Rule.
Definition at line 1041 of file RuleItems.cpp.
|
overridevirtual |
Replaces a leaf with a rule.
This REQUIRES that aR is of type SurfPoint
aR | :: new rule |
: | Null side point |
Implements Mantid::Geometry::Rule.
Definition at line 974 of file RuleItems.cpp.
|
overridevirtual |
Replaces a leaf with a rule.
This REQUIRES that aR is of type CompObj
aR | :: new rule |
oR | :: Null other rule |
Implements Mantid::Geometry::Rule.
Definition at line 988 of file RuleItems.cpp.
void Mantid::Geometry::CompObj::setObj | ( | CSGObject * | val | ) |
Set a Object state.
Sets the object.
val | :: Object value |
Definition at line 965 of file RuleItems.cpp.
References key.
void Mantid::Geometry::CompObj::setObjN | ( | const int | Ky | ) |
set object Number
Sets the object Number.
Ky | :: key value |
Definition at line 956 of file RuleItems.cpp.
References objN.
|
overridevirtual |
Impossible to simplify a simple rule leaf.
Therefore returns 0
Implements Mantid::Geometry::Rule.
Definition at line 1051 of file RuleItems.cpp.
|
inlineoverridevirtual |
Is it a branched object.
Reimplemented from Mantid::Geometry::Rule.
|
private |
Object Pointer.
Definition at line 265 of file Rules.h.
Referenced by getBoundingBox(), and setObj().
|
private |