Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4BREPSolidBox Class Reference

#include <G4BREPSolidBox.hh>

+ Inheritance diagram for G4BREPSolidBox:

Public Member Functions

 G4BREPSolidBox (const G4String &, const G4Point3D &, const G4Point3D &, const G4Point3D &, const G4Point3D &, const G4Point3D &, const G4Point3D &, const G4Point3D &, const G4Point3D &)
 
 ~G4BREPSolidBox ()
 
EInside Inside (register const G4ThreeVector &Pt) const
 
G4VSolidClone () const
 
std::ostream & StreamInfo (std::ostream &os) const
 
 G4BREPSolidBox (__void__ &)
 
 G4BREPSolidBox (const G4BREPSolidBox &rhs)
 
G4BREPSolidBoxoperator= (const G4BREPSolidBox &rhs)
 
- Public Member Functions inherited from G4BREPSolid
 G4BREPSolid (const G4String &name)
 
 G4BREPSolid (const G4String &, G4Surface **, G4int)
 
virtual ~G4BREPSolid ()
 
virtual void Initialize ()
 
G4bool CalculateExtent (const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
 
virtual EInside Inside (register const G4ThreeVector &Pt) const
 
virtual G4ThreeVector SurfaceNormal (const G4ThreeVector &) const
 
virtual G4double DistanceToIn (const G4ThreeVector &) const
 
virtual G4double DistanceToIn (register const G4ThreeVector &Pt, register const G4ThreeVector &V) const
 
virtual G4double DistanceToOut (const G4ThreeVector &) const
 
virtual G4double DistanceToOut (register const G4ThreeVector &Pt, register const G4ThreeVector &V, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
 
G4Point3D Scope () const
 
virtual G4String GetEntityType () const
 
virtual G4VSolidClone () const
 
virtual std::ostream & StreamInfo (std::ostream &os) const
 
void DescribeYourselfTo (G4VGraphicsScene &scene) const
 
G4PolyhedronCreatePolyhedron () const
 
G4NURBSCreateNURBS () const
 
virtual G4PolyhedronGetPolyhedron () const
 
G4int Intersect (register const G4Ray &) const
 
G4SurfaceGetSurface (G4int) const
 
void Active (G4int) const
 
G4int Active () const
 
G4double GetShortestDistance () const
 
G4int GetId () const
 
void SetId (G4int)
 
const G4StringGetName () const
 
void SetName (const G4String &name)
 
G4int GetNumberOfFaces () const
 
G4int GetNumberOfSolids () const
 
const G4Axis2Placement3DGetPlace () const
 
const G4BoundingBox3DGetBBox () const
 
G4int GetCubVolStatistics () const
 
G4double GetCubVolEpsilon () const
 
void SetCubVolStatistics (G4int st)
 
void SetCubVolEpsilon (G4double ep)
 
G4int GetAreaStatistics () const
 
G4double GetAreaAccuracy () const
 
void SetAreaStatistics (G4int st)
 
void SetAreaAccuracy (G4double ep)
 
G4double GetCubicVolume ()
 
G4double GetSurfaceArea ()
 
G4double IntersectionDistance () const
 
void IntersectionDistance (G4double) const
 
virtual void Reset () const
 
 G4BREPSolid (__void__ &)
 
 G4BREPSolid (const G4BREPSolid &rhs)
 
G4BREPSolidoperator= (const G4BREPSolid &rhs)
 
- Public Member Functions inherited from G4VSolid
 G4VSolid (const G4String &name)
 
virtual ~G4VSolid ()
 
G4bool operator== (const G4VSolid &s) const
 
G4String GetName () const
 
void SetName (const G4String &name)
 
G4double GetTolerance () const
 
virtual G4bool CalculateExtent (const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const =0
 
virtual EInside Inside (const G4ThreeVector &p) const =0
 
virtual G4ThreeVector SurfaceNormal (const G4ThreeVector &p) const =0
 
virtual G4double DistanceToIn (const G4ThreeVector &p, const G4ThreeVector &v) const =0
 
virtual G4double DistanceToIn (const G4ThreeVector &p) const =0
 
virtual G4double DistanceToOut (const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const =0
 
virtual G4double DistanceToOut (const G4ThreeVector &p) const =0
 
virtual void ComputeDimensions (G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
 
virtual G4double GetCubicVolume ()
 
virtual G4double GetSurfaceArea ()
 
virtual G4GeometryType GetEntityType () const =0
 
virtual G4ThreeVector GetPointOnSurface () const
 
virtual G4VSolidClone () const
 
virtual std::ostream & StreamInfo (std::ostream &os) const =0
 
void DumpInfo () const
 
virtual void DescribeYourselfTo (G4VGraphicsScene &scene) const =0
 
virtual G4VisExtent GetExtent () const
 
virtual G4PolyhedronCreatePolyhedron () const
 
virtual G4NURBSCreateNURBS () const
 
virtual G4PolyhedronGetPolyhedron () const
 
virtual const G4VSolidGetConstituentSolid (G4int no) const
 
virtual G4VSolidGetConstituentSolid (G4int no)
 
virtual const G4DisplacedSolidGetDisplacedSolidPtr () const
 
virtual G4DisplacedSolidGetDisplacedSolidPtr ()
 
 G4VSolid (__void__ &)
 
 G4VSolid (const G4VSolid &rhs)
 
G4VSolidoperator= (const G4VSolid &rhs)
 

Additional Inherited Members

- Protected Member Functions inherited from G4BREPSolid
G4ThreeVectorListCreateRotatedVertices (const G4AffineTransform &) const
 
G4bool IsConvex ()
 
virtual void CalcBBoxes ()
 
void CheckSurfaceNormals ()
 
void RemoveHiddenFaces (register const G4Ray &G4Rayref, G4int) const
 
void TestSurfaceBBoxes (register const G4Ray &) const
 
G4int StartInside () const
 
void StartInside (G4int si) const
 
void QuickSort (register G4Surface **SrfVec, register G4int left, register G4int right) const
 
- Protected Member Functions inherited from G4VSolid
void CalculateClippedPolygonExtent (G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipCrossSection (G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipBetweenSections (G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipPolygon (G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis) const
 
G4double EstimateCubicVolume (G4int nStat, G4double epsilon) const
 
G4double EstimateSurfaceArea (G4int nStat, G4double ell) const
 
- Protected Attributes inherited from G4BREPSolid
G4int Box
 
G4int Convex
 
G4int AxisBox
 
G4int PlaneSolid
 
G4Axis2Placement3Dplace
 
G4BoundingBox3Dbbox
 
G4double intersectionDistance
 
G4int active
 
G4int startInside
 
G4int nb_of_surfaces
 
G4Point3D intersection_point
 
G4Surface ** SurfaceVec
 
G4double RealDist
 
G4String solidname
 
G4int Id
 
- Protected Attributes inherited from G4VSolid
G4double kCarTolerance
 
- Static Protected Attributes inherited from G4BREPSolid
static G4int NumberOfSolids =0
 
static G4Ray Track
 
static G4double ShortestDistance = kInfinity
 

Detailed Description

Definition at line 62 of file G4BREPSolidBox.hh.

Constructor & Destructor Documentation

◆ G4BREPSolidBox() [1/3]

G4BREPSolidBox::G4BREPSolidBox ( const G4String name,
const G4Point3D Pt1,
const G4Point3D Pt2,
const G4Point3D Pt3,
const G4Point3D Pt4,
const G4Point3D Pt5,
const G4Point3D Pt6,
const G4Point3D Pt7,
const G4Point3D Pt8 
)

Definition at line 40 of file G4BREPSolidBox.cc.

48 : G4BREPSolid(name)
49{
51 active=1; PlaneSolid=1;
52
53 // Save the constructor parameters
54 constructorParams[0] = Pt1;
55 constructorParams[1] = Pt2;
56 constructorParams[2] = Pt3;
57 constructorParams[3] = Pt4;
58 constructorParams[4] = Pt5;
59 constructorParams[5] = Pt6;
60 constructorParams[6] = Pt7;
61 constructorParams[7] = Pt8;
62
63 InitializeBox();
64}
G4int nb_of_surfaces
Definition: G4BREPSolid.hh:229
G4int PlaneSolid
Definition: G4BREPSolid.hh:223

◆ ~G4BREPSolidBox()

G4BREPSolidBox::~G4BREPSolidBox ( )

Definition at line 71 of file G4BREPSolidBox.cc.

72{
73}

◆ G4BREPSolidBox() [2/3]

G4BREPSolidBox::G4BREPSolidBox ( __void__ &  a)

Definition at line 66 of file G4BREPSolidBox.cc.

67 : G4BREPSolid(a)
68{
69}

◆ G4BREPSolidBox() [3/3]

G4BREPSolidBox::G4BREPSolidBox ( const G4BREPSolidBox rhs)

Definition at line 75 of file G4BREPSolidBox.cc.

76 : G4BREPSolid(rhs), Rotation(rhs.Rotation)
77{
78 for (size_t i=0; i<8; ++i) { constructorParams[i]= rhs.constructorParams[i]; }
79 InitializeBox();
80}

Member Function Documentation

◆ Clone()

G4VSolid * G4BREPSolidBox::Clone ( ) const
virtual

Reimplemented from G4BREPSolid.

Definition at line 168 of file G4BREPSolidBox.cc.

169{
170 return new G4BREPSolidBox(*this);
171}

◆ Inside()

EInside G4BREPSolidBox::Inside ( register const G4ThreeVector Pt) const
virtual

Reimplemented from G4BREPSolid.

Definition at line 144 of file G4BREPSolidBox.cc.

145{
146 G4Point3D Point(Pt);
147
148 // Get the bounding box extent
149 G4Point3D min = bbox->GetBoxMin();
150 min += G4Point3D(-0.5*kCarTolerance,-0.5*kCarTolerance,-0.5*kCarTolerance);
151
152 G4Point3D max = bbox->GetBoxMax();
154
155 if( (Point.x() < min.x() || Point.x() > max.x()) ||
156 (Point.y() < min.y() || Point.y() > max.y()) ||
157 (Point.z() < min.z() || Point.z() > max.z()) )
158 return kOutside;
159
160 if( (Point.x() > min.x() && Point.x() < max.x())&&
161 (Point.y() > min.y() && Point.y() < max.y())&&
162 (Point.z() > min.z() && Point.z() < max.z()) )
163 return kInside;
164
165 return kSurface;
166}
HepGeom::Point3D< G4double > G4Point3D
Definition: G4Point3D.hh:35
G4BoundingBox3D * bbox
Definition: G4BREPSolid.hh:225
G4Point3D GetBoxMin() const
G4Point3D GetBoxMax() const
G4double kCarTolerance
Definition: G4VSolid.hh:307
@ kInside
Definition: geomdefs.hh:58
@ kOutside
Definition: geomdefs.hh:58
@ kSurface
Definition: geomdefs.hh:58

◆ operator=()

G4BREPSolidBox & G4BREPSolidBox::operator= ( const G4BREPSolidBox rhs)

Definition at line 82 of file G4BREPSolidBox.cc.

83{
84 // Check assignment to self
85 //
86 if (this == &rhs) { return *this; }
87
88 // Copy base class data
89 //
91
92 // Copy data
93 //
94 Rotation= rhs.Rotation;
95 for (size_t i=0; i<8; ++i) { constructorParams[i]= rhs.constructorParams[i]; }
96 InitializeBox();
97
98 return *this;
99}
G4BREPSolid & operator=(const G4BREPSolid &rhs)
Definition: G4BREPSolid.cc:138

◆ StreamInfo()

std::ostream & G4BREPSolidBox::StreamInfo ( std::ostream &  os) const
virtual

Reimplemented from G4BREPSolid.

Definition at line 173 of file G4BREPSolidBox.cc.

174{
175 // Streams solid contents to output stream.
176
178 << "\n"
179 << " Pt1: " << constructorParams[0]
180 << " Pt2: " << constructorParams[1]
181 << " Pt3: " << constructorParams[2]
182 << " Pt4: " << constructorParams[3]
183 << "\n Pt5: " << constructorParams[4]
184 << " Pt6: " << constructorParams[5]
185 << " Pt7: " << constructorParams[6]
186 << " Pt8: " << constructorParams[7]
187 << "\n-----------------------------------------------------------\n";
188
189 return os;
190}
virtual std::ostream & StreamInfo(std::ostream &os) const

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