|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
G4VCSGfaceted is a virtual class defining a CSG-like type shape that is built entirely of G4CSGface faces. More...
#include <G4VCSGfaceted.hh>
Protected Member Functions | |
| virtual G4double | DistanceTo (const G4ThreeVector &p, const G4bool outgoing) const |
| G4ThreeVector | GetPointOnSurfaceGeneric () const |
| void | CopyStuff (const G4VCSGfaceted &source) |
| void | DeleteStuff () |
| 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 | |
| G4int | numFace = 0 |
| G4VCSGface ** | faces = nullptr |
| G4double | fCubicVolume = 0.0 |
| G4double | fSurfaceArea = 0.0 |
| G4bool | fRebuildPolyhedron = false |
| G4Polyhedron * | fpPolyhedron = nullptr |
| Protected Attributes inherited from G4VSolid | |
| G4double | kCarTolerance |
G4VCSGfaceted is a virtual class defining a CSG-like type shape that is built entirely of G4CSGface faces.
Definition at line 48 of file G4VCSGfaceted.hh.
| G4VCSGfaceted::G4VCSGfaceted | ( | const G4String & | name | ) |
Constructor taking a 'name'.
Definition at line 56 of file G4VCSGfaceted.cc.
Referenced by CopyStuff(), CreatePolyhedron(), G4GenericPolycone::G4GenericPolycone(), G4GenericPolycone::G4GenericPolycone(), G4GenericPolycone::G4GenericPolycone(), G4Polycone::G4Polycone(), G4Polycone::G4Polycone(), G4Polycone::G4Polycone(), G4Polycone::G4Polycone(), G4Polyhedra::G4Polyhedra(), G4Polyhedra::G4Polyhedra(), G4Polyhedra::G4Polyhedra(), G4Polyhedra::G4Polyhedra(), G4VCSGfaceted(), and operator=().
|
override |
| G4VCSGfaceted::G4VCSGfaceted | ( | const G4VCSGfaceted & | source | ) |
Copy constructor and assignment operator.
Definition at line 86 of file G4VCSGfaceted.cc.
| G4VCSGfaceted::G4VCSGfaceted | ( | __void__ & | a | ) |
Fake default constructor for usage restricted to direct object persistency for clients requiring preallocation of memory for persistifiable objects.
Definition at line 67 of file G4VCSGfaceted.cc.
|
overridevirtual |
Calculates the minimum and maximum extent of the solid, when under the specified transform, and within the specified limits.
| [in] | pAxis | The axis along which compute the extent. |
| [in] | pVoxelLimit | The limiting space dictated by voxels. |
| [in] | pTransform | The internal transformation applied to the solid. |
| [out] | pMin | The minimum extent value. |
| [out] | pMax | The maximum extent value. |
Implements G4VSolid.
Definition at line 170 of file G4VCSGfaceted.cc.
|
protected |
Copy parameters from other solid or reset them. Used in copy constructor and assignment operator.
Definition at line 126 of file G4VCSGfaceted.cc.
Referenced by G4VCSGfaceted(), and operator=().
|
overridepure virtual |
Returns a pointer to a generated polyhedron used for visualisation.
Reimplemented from G4VSolid.
Implemented in G4GenericPolycone, G4Polycone, and G4Polyhedra.
Referenced by GetPolyhedron().
|
protected |
Definition at line 151 of file G4VCSGfaceted.cc.
Referenced by operator=(), G4Polycone::Reset(), G4Polyhedra::Reset(), and ~G4VCSGfaceted().
|
overridevirtual |
Methods for creating graphical representations (i.e. for visualisation).
Implements G4VSolid.
Definition at line 397 of file G4VCSGfaceted.cc.
|
protectedvirtual |
Protected method used in DistanceToIn() and DistanceToOut().
Definition at line 379 of file G4VCSGfaceted.cc.
Referenced by DistanceToIn(), and DistanceToOut().
|
overridevirtual |
Calculates the distance to the nearest surface of a shape from an outside point. The distance can be an underestimate.
| [in] | p | The point at offset p. |
Implements G4VSolid.
Definition at line 291 of file G4VCSGfaceted.cc.
|
overridevirtual |
Returns the distance along the normalised vector 'v' to the shape, from the point at offset 'p'. If there is no intersection, returns kInfinity. The first intersection resulting from 'leaving' a surface/volume is discarded. Hence, it is tolerant of points on the surface of the shape.
| [in] | p | The point at offset p. |
| [in] | v | The normalised direction vector. |
Implements G4VSolid.
Definition at line 249 of file G4VCSGfaceted.cc.
Referenced by G4GenericPolycone::DistanceToIn(), G4GenericPolycone::DistanceToIn(), G4Polycone::DistanceToIn(), G4Polycone::DistanceToIn(), G4Polyhedra::DistanceToIn(), and G4Polyhedra::DistanceToIn().
|
overridevirtual |
Calculates the distance to the nearest surface of a shape from an inside point 'p'. The distance can be an underestimate.
| [in] | p | The point at offset p. |
Implements G4VSolid.
Definition at line 368 of file G4VCSGfaceted.cc.
|
overridevirtual |
Returns the distance along the normalised vector 'v' to the shape, from a point at an offset 'p' inside or on the surface of the shape. Intersections with surfaces, when the point is less than Tolerance/2 from a surface must be ignored.
| [in] | p | The point at offset p. |
| [in] | v | The normalised direction vector. |
| [in] | calcNorm | Flag to indicate if to calculate the normal or not. |
| [out] | validNorm | Flag set to true if the solid lies entirely behind or on the exiting surface. It is set false if the solid does not lie entirely behind or on the exiting surface. 'calcNorm' must be true, otherwise it is unused. |
| [out] | n | The exiting outwards normal vector (undefined Magnitude). 'calcNorm' must be true, otherwise it is unused. |
Implements G4VSolid.
Definition at line 300 of file G4VCSGfaceted.cc.
| G4double G4VCSGfaceted::GetAreaAccuracy | ( | ) | const |
Definition at line 515 of file G4VCSGfaceted.cc.
| G4int G4VCSGfaceted::GetAreaStatistics | ( | ) | const |
Definition at line 506 of file G4VCSGfaceted.cc.
|
overridevirtual |
Returning an estimation of the solid volume (capacity) and surface area, in internal units. Caches the computed value once computed the first time.
Reimplemented from G4VSolid.
Definition at line 544 of file G4VCSGfaceted.cc.
| G4double G4VCSGfaceted::GetCubVolEpsilon | ( | ) | const |
Definition at line 477 of file G4VCSGfaceted.cc.
| G4int G4VCSGfaceted::GetCubVolStatistics | ( | ) | const |
Accessors and modifiers for capacity and area computation.
Definition at line 468 of file G4VCSGfaceted.cc.
|
overridevirtual |
Returns the type ID, "G4CSGfaceted" of the solid.
Implements G4VSolid.
Definition at line 442 of file G4VCSGfaceted.cc.
|
overridevirtual |
Provides extent (bounding box) as possible hint to the graphics view.
Reimplemented from G4VSolid.
Definition at line 408 of file G4VCSGfaceted.cc.
|
protected |
Returns a random point located on the surface of the solid in case of generic Polycone or generic Polyhedra.
Definition at line 595 of file G4VCSGfaceted.cc.
|
overridevirtual |
Smart access function - creates on request and stores for future access. A null pointer means "not available".
Reimplemented from G4VSolid.
Definition at line 574 of file G4VCSGfaceted.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 559 of file G4VCSGfaceted.cc.
|
overridevirtual |
Concrete implementations of the expected query interfaces for solids, as defined in G4VSolid.
Implements G4VSolid.
Definition at line 202 of file G4VCSGfaceted.cc.
Referenced by DistanceToOut(), G4GenericPolycone::Inside(), G4Polycone::Inside(), and G4Polyhedra::Inside().
| G4VCSGfaceted & G4VCSGfaceted::operator= | ( | const G4VCSGfaceted & | source | ) |
Definition at line 100 of file G4VCSGfaceted.cc.
Referenced by G4GenericPolycone::operator=(), G4Polycone::operator=(), and G4Polyhedra::operator=().
| void G4VCSGfaceted::SetAreaAccuracy | ( | G4double | ep | ) |
Definition at line 534 of file G4VCSGfaceted.cc.
| void G4VCSGfaceted::SetAreaStatistics | ( | G4int | st | ) |
Definition at line 524 of file G4VCSGfaceted.cc.
| void G4VCSGfaceted::SetCubVolEpsilon | ( | G4double | ep | ) |
Definition at line 496 of file G4VCSGfaceted.cc.
| void G4VCSGfaceted::SetCubVolStatistics | ( | G4int | st | ) |
Definition at line 486 of file G4VCSGfaceted.cc.
|
overridevirtual |
Streams the object contents to an output stream.
Implements G4VSolid.
Definition at line 451 of file G4VCSGfaceted.cc.
|
overridevirtual |
Returns the outwards pointing unit normal of the shape for the surface closest to the point at offset 'p'.
| [in] | p | The point at offset p. |
Implements G4VSolid.
Definition at line 226 of file G4VCSGfaceted.cc.
|
protected |
Definition at line 172 of file G4VCSGfaceted.hh.
Referenced by CalculateExtent(), CopyStuff(), DeleteStuff(), DistanceTo(), DistanceToIn(), DistanceToOut(), GetExtent(), GetPointOnSurfaceGeneric(), Inside(), and SurfaceNormal().
|
protected |
Definition at line 173 of file G4VCSGfaceted.hh.
Referenced by CopyStuff(), G4GenericPolycone::GetCubicVolume(), G4Polycone::GetCubicVolume(), G4Polyhedra::GetCubicVolume(), GetCubicVolume(), SetCubVolEpsilon(), and SetCubVolStatistics().
|
mutableprotected |
Definition at line 176 of file G4VCSGfaceted.hh.
Referenced by CopyStuff(), DeleteStuff(), GetPolyhedron(), G4GenericPolycone::~G4GenericPolycone(), G4Polycone::~G4Polycone(), G4Polyhedra::~G4Polyhedra(), and ~G4VCSGfaceted().
|
mutableprotected |
Definition at line 175 of file G4VCSGfaceted.hh.
Referenced by CopyStuff(), and GetPolyhedron().
|
protected |
Definition at line 174 of file G4VCSGfaceted.hh.
Referenced by CopyStuff(), G4GenericPolycone::GetSurfaceArea(), G4Polycone::GetSurfaceArea(), G4Polyhedra::GetSurfaceArea(), GetSurfaceArea(), SetAreaAccuracy(), and SetAreaStatistics().
|
protected |
Definition at line 171 of file G4VCSGfaceted.hh.
Referenced by CalculateExtent(), CopyStuff(), DeleteStuff(), DistanceTo(), DistanceToIn(), DistanceToOut(), GetExtent(), GetPointOnSurfaceGeneric(), Inside(), StreamInfo(), and SurfaceNormal().