MURE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Sphere.hxx
Go to the documentation of this file.
1 #ifndef _SPHERE_
2 #define _SPHERE_
3 
9 #include "Shape.hxx"
10 
12 
21 class Sphere : public Shape
22 {
23  public :
25 
33  Sphere(double R=0.01, double X=0, double Y=0, double Z=0, double Signe=-1);
34  void Copy(Shape_ptr S);
35  Shape_ptr Clone(int count=0);
36  unsigned IsSphere() {return 1;}
37 
42  double GetR() {return fR;}
43  double GetX() {return fX;}
44  double GetY() {return fY;}
45  double GetZ() {return fZ;}
46 
47 
52 
59  virtual void Translate(double dx,double dy,double dz,int count=0);
61 
68  virtual void Rotate(double phi,double theta=0,double psi=0,double *center=0,int count=0);
70 
75  unsigned Inclus(Shape_ptr OtherShape);
76  unsigned Disjoint(Shape_ptr OtherShape);
77 
78 
83  double GetVirtualSphereRadius();
84  double *GetVirtualSphereCenter();
85  void DefineSurface();
86 
88 
93  bool PointInShape(double *P,int border);
94  void CalculNot();
95 
97 
102 
103  protected :
104  double fR;
105  double fX;
106  double fY;
107  double fZ;
108 };
109 
110 #endif
unsigned IsSphere()
1 if Shape is a Sphere
Definition: Sphere.hxx:36
double fY
y-position of its center
Definition: Sphere.hxx:106
Shape_ptr Clone(int count=0)
Clone a Shape.
Definition: Sphere.cxx:471
double fX
x-position of its center
Definition: Sphere.hxx:105
Surface class is design to define MCNP surface format.
Definition: Surface.hxx:26
double * GetVirtualSphereCenter()
returns the center of a Sphere containing the Shape
Definition: Sphere.cxx:521
double GetX()
return x-position of its center
Definition: Sphere.hxx:43
void DefineSurface()
Define surface in MCNP format.
Definition: Sphere.cxx:420
double fR
Radius of the Sphere.
Definition: Sphere.hxx:104
Surface * GetTheSurface()
return the Sphere Surface.
Definition: Sphere.cxx:358
unsigned Disjoint(Shape_ptr OtherShape)
return 1 if the Sphere is Disjointed of OtherShape otherwise 0
Definition: Sphere.cxx:207
Sphere(double R=0.01, double X=0, double Y=0, double Z=0, double Signe=-1)
Normal Constructor.
Definition: Sphere.cxx:6
void Copy(Shape_ptr S)
Copy all attributs of a Shape (but not attributs of the father classes).
Definition: Sphere.cxx:500
virtual void Translate(double dx, double dy, double dz, int count=0)
Translate the Node of (dx,dy,dz).
Definition: Sphere.cxx:327
Header file for Shape class and Shape_ptr type.
double GetR()
return Radius of the Sphere
Definition: Sphere.hxx:42
bool PointInShape(double *P, int border)
true if the point P is in the Shape.
Definition: Sphere.cxx:402
unsigned Inclus(Shape_ptr OtherShape)
return 1 if the Sphere is included in OtherShape otherwise 0
Definition: Sphere.cxx:27
void CalculNot()
Allocates and calculs the complement of a Sphere.
Definition: Sphere.cxx:312
Define a Sphere Shape.
Definition: Sphere.hxx:21
double GetY()
return y-position of its center
Definition: Sphere.hxx:44
double GetVirtualSphereRadius()
returns the radius of a Sphere containing the Shape
Definition: Sphere.cxx:515
virtual void Rotate(double phi, double theta=0, double psi=0, double *center=0, int count=0)
Rotate the Shape clockwise.
Definition: Sphere.cxx:342
double GetZ()
return z-position of its center
Definition: Sphere.hxx:45
double fZ
z-position of its center
Definition: Sphere.hxx:107
Base class to define shapes.
Definition: Shape.hxx:54

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