19#ifndef _MathBRICK_HXX_
20#define _MathBRICK_HXX_
72 MathBrick(
double HalfX = 0.01,
double HalfY = 0.01,
double HalfZ = 0.01,
int Sign = - 1);
86 MathBrick(
double *Origin,
double *Ux,
double *Uy,
double *Uz,
double HalfX = 0.01,
double HalfY = 0.01,
double HalfZ = 0.01,
int Sign = - 1);
96 MathBrick(
const char *Infinite,
double HalfX = 0.01,
double HalfY = 0.01,
int Sign = - 1);
161 void Translate(
double dx,
double dy,
double dz,
int count = 0)
override;
170 void Rotate(
double phi,
double theta = 0,
double psi = 0,
double *center =
nullptr,
int count = 0)
override;
213 MathBrick(
double HalfX,
double HalfY,
double HalfZ,
int Sign,
bool Infinite);
217 void Init(
double HalfX,
double HalfY,
double HalfZ);
255 unsigned LineCrossPlane(
double *X, vector < double > N,
double *P, vector < double > U,
double *D);
269 unsigned PointInSegment(
double *X,
double *A,
double *B,
int border);
306 double MinDist1Point2Face(vector < double > U0, vector < double > U1, vector < double > U2,
double *P0,
double *S,
int whichplane);
#define sign(a)
Definition GenericReactorAssembly.cxx:43
Header file for Monte-Carlo Source abstract class.
Header file for MathCylinder class.
Header file for Shape class and Shape_ptr type.
A rectangular parallepipede box.
Definition MathBrick.hxx:58
double GetHalfZ()
Definition MathBrick.hxx:117
unsigned TwoFaces3Segments(MathBrick *brick, vector< double > N, int whichSize, double *C0, double C1[3][3])
Definition MathBrick.cxx:1046
unsigned TwoFaces2Segments(MathBrick *brick, vector< double > N, int whichSize, double *C0, double C1[2][3])
Definition MathBrick.cxx:1070
double fHalfSize[3]
Half sizes of the brick.
Definition MathBrick.hxx:317
bool PointInShape(double *P, int border) override
True if the point P is in the Shape.
Definition MathBrick.cxx:922
void FindBrickProjection(MathCylinder *cyl, double Segment[6][2], double C0[6][2], double Origin[2])
Definition MathBrick.cxx:1339
void SetPeriodicBoundary(bool state=true, string TopBottPlaneBC="mirror") override
Periodic boundary (WARNING: only for MathBrick and MathHexagon).
Definition MathBrick.cxx:1454
double Dist2Segment(MathCylinder *cyl, double Segment[6][2], double C0[6][2], int &segmentNum)
Definition MathBrick.cxx:1426
unsigned IsDisjoint(Shape_ptr OtherShape) override
return 1 if the MathBrick is disjoint of OtherShape otherwise 0
Definition MathBrick.cxx:467
double GetHalfY()
Definition MathBrick.hxx:113
unsigned PointInSegment(double *X, double *A, double *B, int border)
Definition MathBrick.cxx:964
double GetHalfX()
Definition MathBrick.hxx:109
double * GetVirtualSphereCenter() override
returns the center of a Sphere containing the Shape
Definition MathBrick.cxx:1649
void Copy(Shape_ptr B) override
Copy all attributes of a Shape (but not attributes of the ancestor classes).
Definition MathBrick.cxx:1503
double GetVirtualSphereRadius() override
returns the radius of a Sphere containing the Shape
Definition MathBrick.cxx:1531
int NumberOfShapes() override
Number of shapes/surfaces this shape consists of.
Definition MathBrick.hxx:204
unsigned LineCrossPlane(double *X, vector< double > N, double *P, vector< double > U, double *D)
Definition MathBrick.cxx:986
vector< double > fUz
Normal vector to the 2 Z planes.
Definition MathBrick.hxx:321
vector< double > GetUx()
Definition MathBrick.hxx:125
unsigned GeneralIntersectionOf2Brick(MathBrick *brick)
return 1 if there is an intersection of the segment of this with the MathBrick brick
Definition MathBrick.cxx:1148
unsigned IsIncluded(Shape_ptr OtherShape) override
return 1 if the MathBrick is included in OtherShape otherwise 0
Definition MathBrick.cxx:140
Shape_ptr Clone(int count=0) override
Clone a Shape.
Definition MathBrick.cxx:1463
void Translate(double dx, double dy, double dz, int count=0) override
Translate the Shape by (dx, dy, dz).
Definition MathBrick.cxx:888
unsigned CornerInBrick(MathBrick *brick, int all, int border)
Return 1 if corner(s) of this shape are in a brick.
Definition MathBrick.cxx:1282
vector< double > fOrigin
Origin of the brick.
Definition MathBrick.hxx:318
void CalculNot() override
Allocates and calculs the complement of a brick.
Definition MathBrick.cxx:862
MathBrick * CreateNewInstance(int sign=1) override
a new MathBrick instance.
Definition MathBrick.cxx:1641
vector< double > fUy
Normal vector to the 2 Y planes.
Definition MathBrick.hxx:320
vector< double > fUx
Normal vector to the 2 X planes.
Definition MathBrick.hxx:319
vector< double > GetOrigin()
Definition MathBrick.hxx:121
double MinDist1Point2Face(vector< double > U0, vector< double > U1, vector< double > U2, double *P0, double *S, int whichplane)
Definition MathBrick.cxx:1541
double MinDistanceFrom2OppositeFace(vector< double > N, int whichplane, double *S)
Definition MathBrick.cxx:1094
unsigned CornerInCylinder(MathCylinder *cyl, int all, int border)
Return 1 if corner(s) of this shape are in a cylinder.
Definition MathBrick.cxx:1309
void Rotate(double phi, double theta=0, double psi=0, double *center=nullptr, int count=0) override
Rotate the Shape clockwise.
Definition MathBrick.cxx:904
vector< double > GetUy()
Definition MathBrick.hxx:129
unsigned CylinderCrossBrick(MathCylinder *Cyl)
Definition MathBrick.cxx:1006
vector< double > GetUz()
Definition MathBrick.hxx:133
double MinDist1Point2FaceInfinite(vector< double > U0, vector< double > U1, double *P0, double *S, int whichplane)
Definition MathBrick.cxx:1613
unsigned IsBrick() override
Definition MathBrick.hxx:105
void Init(double HalfX, double HalfY, double HalfZ)
Definition MathBrick.cxx:118
Infinite cylinder Shape.
Definition MathCylinder.hxx:47
Abstract class to define geometrical shapes.
Definition Shape.hxx:85
bool fInfinite
Determines whether the shape is infinite or not.
Definition Shape.hxx:549
the namespace of the Standard C++