MURE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Node.hxx
Go to the documentation of this file.
1 #ifndef _NODE_HXX_
2 #define _NODE_HXX_
3 
9 #include <vector>
10 #include "MureHeaders.hxx"
11 using namespace std;
12 
14 
24 class Node : public Shape
25 {
26  public :
31  Node(double Signe=+1);
32  Node(const Node &n);
33  ~Node();
34  virtual Shape_ptr Clone(int count=0);
35 
40  unsigned IsNode() {return 1;}
41  unsigned IsFullVoid() {return (fShapeVector.size()==0);}
42  unsigned IsVoid() {return (fShapeVector.size()==0 && fSigne==1);}
43  unsigned IsFull() {return (fShapeVector.size()==0 && fSigne==-1);}
44  double GetVolume();
45 
46  Shape_ptr GetLeaf(int i) {return fShapeVector[i];}
47  int GetNumberOfLeaves(){return fShapeVector.size();}
48 
49  unsigned Add(Shape_ptr OtherShape);
50 
52 
57  void SetBoundingShape(Shape_ptr theShape);
58  Shape_ptr GetBoundingShape(){if(fBoundingShape.Get()) return fBoundingShape; else return Shape_ptr(0);}
59 
61 
66  void SetIncludedShape(Shape_ptr theShape);
67  Shape_ptr GetIncludedShape(){if(fIncludedShape.Get())return fIncludedShape;else return Shape_ptr(0);}
68  virtual void SetMirrorBoundary(bool state=true);
69  virtual void SetTopBottomPlanesOpen() {fOpenZPlanes=true;}
70  virtual bool GetTopBottomPlanesOpen() {return fOpenZPlanes;}
71  virtual void SetSidePlanesOpen() {fOpenXYPlanes=true;}
72  virtual bool GetSidePlanesOpen() {return fOpenXYPlanes;}
73  virtual void SetWhiteBoundary(bool state=true);
74 
75 
77 
81 
88  virtual void Translate(double dx,double dy, double dz,int count=0);
90 
97  virtual void Rotate(double phi,double theta=0,double psi=0,double *center=0,int count=0);
99 
104  virtual unsigned Inclus(Shape_ptr OtherShape);
105  virtual unsigned Disjoint(Shape_ptr OtherShape);
106  virtual unsigned Contain(Shape_ptr OtherShape);
107 
108 
113 
117  void Simplify(bool violent=false);
119 
122  void ElagueRoot();
123  virtual void UnSetMouvement();
124  void ClearVectorShape(int UMVT=0);
125 
126 
131  virtual string Print();
132 
134 
137  void SetUniverse(int u=0);
138 
139  virtual double GetVirtualSphereRadius();
140  virtual double* GetVirtualSphereCenter(){return 0;}
141  void AlreadyDefine(bool state=true);
142 
144 
149  bool PointInShape(double *P,int border);
150 
151  void PrintX(int count=0);
152  void PrintY(int count=0);
153 #ifdef _PTODEBUG_
154  void PrintLatex(int count=0);
155 #endif
156  virtual void ReplaceNode(Shape_ptr C);
157  int NumberOfShapes();
158  virtual void CalculNot();
159 
160 
161  private:
163 
169  void DevElague(int count=0,bool violent=false);
170 
171 
172  protected :
173  void RemoveSurface();
174  void Remove(vector<Shape_ptr>::iterator Iterator);
175 
176  vector <Shape_ptr> fShapeVector;
177  vector <Shape_ptr> fDestroyShape;
178 
181  bool fTube;
182  bool fHexagon;
183  int fCount;
184 
185 };
186 
187 #endif
vector< Shape_ptr > fShapeVector
a vector of Shape_ptr of a Node
Definition: Node.hxx:176
Shape_ptr GetBoundingShape()
return the BoundingShape if exist
Definition: Node.hxx:58
vector< Shape_ptr > fDestroyShape
a vector of destroyed Shape_ptr of a Node (for UnSetMouvement())
Definition: Node.hxx:177
virtual double * GetVirtualSphereCenter()
returns the center of a Sphere containing the Shape
Definition: Node.hxx:140
Node allows to construct Union or Intersection of Shape.
Definition: Node.hxx:24
unsigned IsFull()
1 if the node is Full.
Definition: Node.hxx:43
virtual void SetTopBottomPlanesOpen()
Set Top and bottom planes open.
Definition: Node.hxx:69
virtual bool GetSidePlanesOpen()
Get The side planes open.
Definition: Node.hxx:72
int GetNumberOfLeaves()
returns the number of leaves (Shape) of a Node
Definition: Node.hxx:47
unsigned IsNode()
+1 for a Node
Definition: Node.hxx:40
unsigned IsFullVoid()
1 if the Node is void or full.
Definition: Node.hxx:41
virtual bool GetTopBottomPlanesOpen()
Get Top and bottom planes open.
Definition: Node.hxx:70
File including all headers.
Shape_ptr GetIncludedShape()
return the IncludedShape if exist
Definition: Node.hxx:67
bool fHexagon
true if the Node is an Hexagon
Definition: Node.hxx:182
Reference_ptr< Shape > Shape_ptr
Definition: MCNPSource.hxx:17
Shape_ptr fBoundingShape
Shape containing the Node, 0 for none.
Definition: Node.hxx:179
virtual void SetSidePlanesOpen()
The side planes are NOT mirrors.
Definition: Node.hxx:71
Shape_ptr GetLeaf(int i)
returns the i-th leaf (Shape) of a Node
Definition: Node.hxx:46
unsigned IsVoid()
1 if the node is void.
Definition: Node.hxx:42
bool fTube
true if the Node is a Tube
Definition: Node.hxx:181
Shape_ptr fIncludedShape
Shape included in the Node, 0 for none.
Definition: Node.hxx:180
int fCount
count flag to unset mvt
Definition: Node.hxx:183
Base class to define shapes.
Definition: Shape.hxx:54

MURE Project, documentation generated by Doxygen 1.8.5 - Mon Nov 17 2014