|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
G4BooleanSolid is the base class for solids created by Boolean operations between other solids. More...
#include <G4BooleanSolid.hh>
Static Public Member Functions | |
| static G4VBooleanProcessor * | GetExternalBooleanProcessor () |
| static void | SetExternalBooleanProcessor (G4VBooleanProcessor *extProcessor) |
Protected Member Functions | |
| void | GetListOfPrimitives (std::vector< std::pair< G4VSolid *, G4Transform3D > > &, const G4Transform3D &) const |
| G4Polyhedron * | StackPolyhedron (HepPolyhedronProcessor &, const G4VSolid *) 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 |
Protected Attributes | |
| G4VSolid * | fPtrSolidA = nullptr |
| G4VSolid * | fPtrSolidB = nullptr |
| G4double | fCubicVolume = -1.0 |
| G4double | fSurfaceArea = -1.0 |
| Protected Attributes inherited from G4VSolid | |
| G4double | kCarTolerance |
Static Protected Attributes | |
| static G4VBooleanProcessor * | fExternalBoolProcessor = nullptr |
G4BooleanSolid is the base class for solids created by Boolean operations between other solids.
Definition at line 52 of file G4BooleanSolid.hh.
Constructor of a Boolean composition between two solids with no displacement.
| [in] | pName | The name of the Boolean composition. |
| [in] | pSolidA | Pointer to the first reference solid. |
| [in] | pSolidB | Pointer to the second solid to form the composition. |
Definition at line 55 of file G4BooleanSolid.cc.
Referenced by G4BooleanSolid(), G4IntersectionSolid::G4IntersectionSolid(), G4IntersectionSolid::G4IntersectionSolid(), G4IntersectionSolid::G4IntersectionSolid(), G4IntersectionSolid::G4IntersectionSolid(), G4SubtractionSolid::G4SubtractionSolid(), G4SubtractionSolid::G4SubtractionSolid(), G4SubtractionSolid::G4SubtractionSolid(), G4SubtractionSolid::G4SubtractionSolid(), G4UnionSolid::G4UnionSolid(), G4UnionSolid::G4UnionSolid(), G4UnionSolid::G4UnionSolid(), G4UnionSolid::G4UnionSolid(), G4UnionSolid::G4UnionSolid(), GetListOfPrimitives(), operator=(), SetCubVolEpsilon(), and SetCubVolStatistics().
| G4BooleanSolid::G4BooleanSolid | ( | const G4String & | pName, |
| G4VSolid * | pSolidA, | ||
| G4VSolid * | pSolidB, | ||
| G4RotationMatrix * | rotMatrix, | ||
| const G4ThreeVector & | transVector ) |
Constructor of a Boolean composition between two solids with rotation and translation, used to transform the coordinate system of the second solid to the coordinate system of the first solid.
| [in] | pName | The name of the Boolean composition. |
| [in] | pSolidA | Pointer to the first reference solid. |
| [in] | pSolidB | Pointer to the second solid to form the composition. |
| [in] | rotMatrix | Pointer to the rotation vector. |
| [in] | transVector | The translation vector. |
Definition at line 66 of file G4BooleanSolid.cc.
| G4BooleanSolid::G4BooleanSolid | ( | const G4String & | pName, |
| G4VSolid * | pSolidA, | ||
| G4VSolid * | pSolidB, | ||
| const G4Transform3D & | transform ) |
Constructor of a Boolean composition between two solids with a transformation that moves the second solid from its desired position to its standard position.
| [in] | pName | The name of the Boolean composition. |
| [in] | pSolidA | Pointer to the first reference solid. |
| [in] | pSolidB | Pointer to the second solid to form the composition. |
| [in] | transform | The composed 3D transformation. |
Definition at line 81 of file G4BooleanSolid.cc.
|
override |
Destructor. If using a displaced solid, deletes all cached transformations.
Definition at line 105 of file G4BooleanSolid.cc.
| G4BooleanSolid::G4BooleanSolid | ( | __void__ & | a | ) |
Fake default constructor for usage restricted to direct object persistency for clients requiring preallocation of memory for persistifiable objects.
Definition at line 96 of file G4BooleanSolid.cc.
| G4BooleanSolid::G4BooleanSolid | ( | const G4BooleanSolid & | rhs | ) |
Copy constructor and assignment operator.
Definition at line 118 of file G4BooleanSolid.cc.
|
inline |
Accessor and setter for controlling/tuning the level of accuracy used for computing the surface area.
|
inline |
Accessor and setter for controlling/tuning the number of random points to be used for computing the surface area.
Methods returning the component solids of the Boolean composition. If the solid is made up from a Boolean operation of two solids, return the corresponding solid (for no=0 and 1). A fatal exception is thrown if the index provided is different from 0 or 1.
| [in] | no | Index 0/1 of the components. |
Reimplemented from G4VSolid.
Definition at line 165 of file G4BooleanSolid.cc.
Referenced by G4tgbGeometryDumper::DumpBooleanVolume().
Reimplemented from G4VSolid.
Definition at line 191 of file G4BooleanSolid.cc.
|
overridevirtual |
Methods returning the computed capacity and surface area of the composition. The quantities returned are an estimate obtained by randomly sampling the Boolean composition and caching them for reuse.
Reimplemented from G4VSolid.
Reimplemented in G4SubtractionSolid, and G4UnionSolid.
Definition at line 590 of file G4BooleanSolid.cc.
Referenced by G4SubtractionSolid::GetCubicVolume(), and G4UnionSolid::GetCubicVolume().
|
inline |
Accessor and setter for controlling/tuning the epsilon used for computing the cubic volume.
Referenced by G4SubtractionSolid::GetCubicVolume(), and G4UnionSolid::GetCubicVolume().
|
inline |
Accessor and setter for controlling/tuning the number of random points to be used for computing the cubic volume.
Referenced by G4SubtractionSolid::GetCubicVolume(), and G4UnionSolid::GetCubicVolume().
|
overridevirtual |
Returns the type ID, "G4BooleanSolid" of the solid.
Implements G4VSolid.
Reimplemented in G4IntersectionSolid, G4SubtractionSolid, and G4UnionSolid.
Definition at line 215 of file G4BooleanSolid.cc.
Referenced by StreamInfo().
|
static |
Gets/sets the Boolean processor for polyhedron to replace the default processor.
Definition at line 630 of file G4BooleanSolid.cc.
Referenced by G4MultiUnion::CreatePolyhedron().
|
protected |
Gets the list of constituent primitives of the solid and their placements.
Definition at line 383 of file G4BooleanSolid.cc.
Referenced by GetPointOnSurface().
|
overridevirtual |
Returns the total number of constituent solids forming the Boolean composition.
Reimplemented from G4VSolid.
Definition at line 496 of file G4BooleanSolid.cc.
Referenced by G4SubtractionSolid::GetCubicVolume(), and G4UnionSolid::GetCubicVolume().
|
overridevirtual |
Returns a point (G4ThreeVector) randomly and uniformly generated on the surface of the solid.
Reimplemented from G4VSolid.
Definition at line 447 of file G4BooleanSolid.cc.
|
overridevirtual |
Returns a pointer to the generated polyhedron representation of the composition, for use in visualisation.
Reimplemented from G4VSolid.
Definition at line 514 of file G4BooleanSolid.cc.
|
overridevirtual |
Returns an estimation of the solid surface area in internal units. This method may be overloaded by derived classes to compute the exact geometrical quantity for solids where this is possible, or anyway to cache the computed value. Note: the computed value is NOT cached.
Reimplemented from G4VSolid.
Definition at line 605 of file G4BooleanSolid.cc.
|
overridevirtual |
Return true if the resulting solid has only planar faces.
Reimplemented from G4VSolid.
Definition at line 505 of file G4BooleanSolid.cc.
| G4BooleanSolid & G4BooleanSolid::operator= | ( | const G4BooleanSolid & | rhs | ) |
Definition at line 134 of file G4BooleanSolid.cc.
Referenced by G4IntersectionSolid::operator=(), G4SubtractionSolid::operator=(), and G4UnionSolid::operator=().
|
inline |
|
inline |
| void G4BooleanSolid::SetCubVolEpsilon | ( | G4double | ep | ) |
Definition at line 294 of file G4BooleanSolid.cc.
Referenced by G4SubtractionSolid::GetCubicVolume(), and G4UnionSolid::GetCubicVolume().
| void G4BooleanSolid::SetCubVolStatistics | ( | G4int | st | ) |
Definition at line 224 of file G4BooleanSolid.cc.
Referenced by G4SubtractionSolid::GetCubicVolume(), and G4UnionSolid::GetCubicVolume().
|
static |
Definition at line 621 of file G4BooleanSolid.cc.
|
protected |
Stacks the polyhedra for processing.
Definition at line 535 of file G4BooleanSolid.cc.
Referenced by G4IntersectionSolid::CreatePolyhedron(), G4SubtractionSolid::CreatePolyhedron(), G4UnionSolid::CreatePolyhedron(), and StackPolyhedron().
|
overridevirtual |
Streams the object contents to an output stream.
Implements G4VSolid.
Definition at line 364 of file G4BooleanSolid.cc.
|
protected |
Cached value of the capacity.
Definition at line 227 of file G4BooleanSolid.hh.
Referenced by G4BooleanSolid(), GetCubicVolume(), G4SubtractionSolid::GetCubicVolume(), G4UnionSolid::GetCubicVolume(), operator=(), SetCubVolEpsilon(), and SetCubVolStatistics().
|
staticprotected |
Static pointer to the external Boolean processor.
Definition at line 233 of file G4BooleanSolid.hh.
Referenced by G4IntersectionSolid::CreatePolyhedron(), G4SubtractionSolid::CreatePolyhedron(), G4UnionSolid::CreatePolyhedron(), GetExternalBooleanProcessor(), and SetExternalBooleanProcessor().
|
protected |
Pointers to the costituent solids.
Definition at line 223 of file G4BooleanSolid.hh.
Referenced by G4IntersectionSolid::BoundingLimits(), G4SubtractionSolid::BoundingLimits(), G4UnionSolid::BoundingLimits(), G4IntersectionSolid::CalculateExtent(), G4SubtractionSolid::CalculateExtent(), G4UnionSolid::CalculateExtent(), G4IntersectionSolid::DistanceToIn(), G4IntersectionSolid::DistanceToIn(), G4SubtractionSolid::DistanceToIn(), G4SubtractionSolid::DistanceToIn(), G4UnionSolid::DistanceToIn(), G4UnionSolid::DistanceToIn(), G4IntersectionSolid::DistanceToOut(), G4IntersectionSolid::DistanceToOut(), G4SubtractionSolid::DistanceToOut(), G4SubtractionSolid::DistanceToOut(), G4UnionSolid::DistanceToOut(), G4UnionSolid::DistanceToOut(), G4BooleanSolid(), G4BooleanSolid(), G4BooleanSolid(), G4BooleanSolid(), GetConstituentSolid(), GetConstituentSolid(), G4SubtractionSolid::GetCubicVolume(), G4UnionSolid::GetCubicVolume(), GetListOfPrimitives(), GetNumOfConstituents(), G4IntersectionSolid::Inside(), G4SubtractionSolid::Inside(), G4UnionSolid::Inside(), IsFaceted(), operator=(), SetCubVolEpsilon(), SetCubVolStatistics(), StreamInfo(), G4IntersectionSolid::SurfaceNormal(), G4SubtractionSolid::SurfaceNormal(), and G4UnionSolid::SurfaceNormal().
|
protected |
Definition at line 224 of file G4BooleanSolid.hh.
Referenced by G4IntersectionSolid::BoundingLimits(), G4UnionSolid::BoundingLimits(), G4IntersectionSolid::CalculateExtent(), G4UnionSolid::CalculateExtent(), G4IntersectionSolid::DistanceToIn(), G4IntersectionSolid::DistanceToIn(), G4SubtractionSolid::DistanceToIn(), G4SubtractionSolid::DistanceToIn(), G4UnionSolid::DistanceToIn(), G4UnionSolid::DistanceToIn(), G4IntersectionSolid::DistanceToOut(), G4IntersectionSolid::DistanceToOut(), G4SubtractionSolid::DistanceToOut(), G4SubtractionSolid::DistanceToOut(), G4UnionSolid::DistanceToOut(), G4UnionSolid::DistanceToOut(), G4BooleanSolid(), G4BooleanSolid(), G4BooleanSolid(), G4BooleanSolid(), GetConstituentSolid(), GetConstituentSolid(), G4SubtractionSolid::GetCubicVolume(), G4UnionSolid::GetCubicVolume(), GetListOfPrimitives(), GetNumOfConstituents(), G4IntersectionSolid::Inside(), G4SubtractionSolid::Inside(), G4UnionSolid::Inside(), IsFaceted(), operator=(), SetCubVolEpsilon(), SetCubVolStatistics(), StreamInfo(), G4IntersectionSolid::SurfaceNormal(), G4SubtractionSolid::SurfaceNormal(), G4UnionSolid::SurfaceNormal(), and ~G4BooleanSolid().
|
protected |
Cached value of the surface area.
Definition at line 230 of file G4BooleanSolid.hh.
Referenced by G4BooleanSolid(), GetSurfaceArea(), and operator=().