|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
G4TessellatedSolid is a solid defined by a number of facets. It is important that the supplied facets shall form a fully enclose space which is the solid. The facets can be of two types, G4TriangularFacet and G4QuadrangularFacet. More...
#include <G4TessellatedSolid.hh>
Protected Attributes | |
| G4double | kCarToleranceHalf |
| Protected Attributes inherited from G4VSolid | |
| G4double | kCarTolerance |
Additional Inherited Members | |
| 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 |
G4TessellatedSolid is a solid defined by a number of facets. It is important that the supplied facets shall form a fully enclose space which is the solid. The facets can be of two types, G4TriangularFacet and G4QuadrangularFacet.
Definition at line 135 of file G4TessellatedSolid.hh.
| G4TessellatedSolid::G4TessellatedSolid | ( | ) |
Default Constructor.
Definition at line 86 of file G4TessellatedSolid.cc.
Referenced by Clone(), G4ExtrudedSolid::G4ExtrudedSolid(), G4ExtrudedSolid::G4ExtrudedSolid(), G4ExtrudedSolid::G4ExtrudedSolid(), G4TessellatedSolid(), operator+=(), and operator=().
| G4TessellatedSolid::G4TessellatedSolid | ( | const G4String & | name | ) |
Constructor with solid's name.
| [in] | name | The name of the solid. |
Definition at line 96 of file G4TessellatedSolid.cc.
|
override |
Destructor. Clearing all allocated facets and data.
Definition at line 116 of file G4TessellatedSolid.cc.
| G4TessellatedSolid::G4TessellatedSolid | ( | __void__ & | a | ) |
Fake default constructor for usage restricted to direct object persistency for clients requiring preallocation of memory for persistifiable objects.
Definition at line 107 of file G4TessellatedSolid.cc.
| G4TessellatedSolid::G4TessellatedSolid | ( | const G4TessellatedSolid & | ts | ) |
Copy constructor and assignment operator.
Definition at line 125 of file G4TessellatedSolid.cc.
Methods for adding or retrieving a facet given an index.
Definition at line 211 of file G4TessellatedSolid.cc.
Referenced by G4tgbVolume::FindOrConstructG4Solid(), operator+=(), and G4GDMLReadSolids::TessellatedRead().
| G4int G4TessellatedSolid::AllocatedMemory | ( | ) |
Definition at line 2293 of file G4TessellatedSolid.cc.
Referenced by DisplayAllocatedMemory().
| G4int G4TessellatedSolid::AllocatedMemoryWithoutVoxels | ( | ) |
Loggers reporting the total allocated memory.
Definition at line 2270 of file G4TessellatedSolid.cc.
Referenced by AllocatedMemory(), and DisplayAllocatedMemory().
|
overridevirtual |
Computes the bounding limits of the solid.
| [out] | pMin | The minimum bounding limit point. |
| [out] | pMax | The maximum bounding limit point. |
Reimplemented from G4VSolid.
Definition at line 2018 of file G4TessellatedSolid.cc.
Referenced by CalculateExtent().
|
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 2044 of file G4TessellatedSolid.cc.
| G4int G4TessellatedSolid::CheckStructure | ( | ) | const |
Checks the structure of the solid.
Definition at line 701 of file G4TessellatedSolid.cc.
Referenced by SetSolidClosed().
|
overridevirtual |
Makes a clone of the object for use in multi-treading.
Reimplemented from G4VSolid.
Definition at line 1822 of file G4TessellatedSolid.cc.
|
overridevirtual |
Methods for creating graphical representations (i.e. for visualisation).
Reimplemented from G4VSolid.
Definition at line 1967 of file G4TessellatedSolid.cc.
Referenced by GetPolyhedron().
|
overridevirtual |
A "double dispatch" function which identifies the solid to the graphics scene for visualization.
Implements G4VSolid.
Definition at line 1960 of file G4TessellatedSolid.cc.
| void G4TessellatedSolid::DisplayAllocatedMemory | ( | ) |
|
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 1868 of file G4TessellatedSolid.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 1875 of file G4TessellatedSolid.cc.
Referenced by G4ExtrudedSolid::DistanceToIn(), G4ExtrudedSolid::DistanceToIn(), and SafetyFromInside().
|
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 1903 of file G4TessellatedSolid.cc.
Referenced by G4ExtrudedSolid::DistanceToOut(), G4ExtrudedSolid::DistanceToOut(), and SafetyFromOutside().
|
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 1926 of file G4TessellatedSolid.cc.
|
overridevirtual |
Returns an estimation of the solid volume 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 2161 of file G4TessellatedSolid.cc.
|
overridevirtual |
Returns the type ID, "G4TessellatedSolid" of the solid.
Implements G4VSolid.
Definition at line 1783 of file G4TessellatedSolid.cc.
|
overridevirtual |
Provides extent (bounding box) as possible hint to the graphics view.
Reimplemented from G4VSolid.
Definition at line 2152 of file G4TessellatedSolid.cc.
Definition at line 476 of file G4TessellatedSolid.hh.
Referenced by CalculateExtent(), operator+=(), and G4GDMLWriteSolids::TessellatedWrite().
| G4int G4TessellatedSolid::GetFacetIndex | ( | const G4ThreeVector & | p | ) | const |
Definition at line 1143 of file G4TessellatedSolid.cc.
| G4double G4TessellatedSolid::GetMaxXExtent | ( | ) | const |
Definition at line 2117 of file G4TessellatedSolid.cc.
Referenced by G4ExtrudedSolid::Inside().
| G4double G4TessellatedSolid::GetMaxYExtent | ( | ) | const |
Definition at line 2131 of file G4TessellatedSolid.cc.
Referenced by G4ExtrudedSolid::Inside().
| G4double G4TessellatedSolid::GetMaxZExtent | ( | ) | const |
Definition at line 2145 of file G4TessellatedSolid.cc.
Referenced by G4ExtrudedSolid::Inside().
| G4double G4TessellatedSolid::GetMinXExtent | ( | ) | const |
Definition at line 2110 of file G4TessellatedSolid.cc.
Referenced by G4ExtrudedSolid::Inside().
| G4double G4TessellatedSolid::GetMinYExtent | ( | ) | const |
Definition at line 2124 of file G4TessellatedSolid.cc.
Referenced by G4ExtrudedSolid::Inside().
| G4double G4TessellatedSolid::GetMinZExtent | ( | ) | const |
Definition at line 2138 of file G4TessellatedSolid.cc.
Referenced by G4ExtrudedSolid::Inside().
| G4int G4TessellatedSolid::GetNumberOfFacets | ( | ) | const |
Accessors.
Definition at line 786 of file G4TessellatedSolid.cc.
Referenced by CalculateExtent(), operator+=(), and G4GDMLWriteSolids::TessellatedWrite().
|
overridevirtual |
Returns a random point located and uniformly distributed on the surface of the solid.
Reimplemented from G4VSolid.
Definition at line 2204 of file G4TessellatedSolid.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 1998 of file G4TessellatedSolid.cc.
| G4bool G4TessellatedSolid::GetSolidClosed | ( | ) | const |
Definition at line 686 of file G4TessellatedSolid.cc.
|
overridevirtual |
Returning an estimation of the solid volume (capacity) and surface area, in internal units.
Reimplemented from G4VSolid.
Definition at line 2186 of file G4TessellatedSolid.cc.
|
inline |
Returns the voxels structure.
Definition at line 486 of file G4TessellatedSolid.hh.
|
overridevirtual |
Concrete implementations of the expected query interfaces for solids, as defined in the base class G4VSolid.
Implements G4VSolid.
Definition at line 1837 of file G4TessellatedSolid.cc.
Referenced by DistanceToIn(), DistanceToOut(), SafetyFromInside(), and SafetyFromOutside().
|
overridevirtual |
Returns true as the solid has only planar faces.
Reimplemented from G4VSolid.
Definition at line 1792 of file G4TessellatedSolid.cc.
|
virtual |
Returns the outwards pointing unit normal of the shape for the surface closest to the point at offset 'p'.
| [in] | p | The point coordinates. |
| [out] | n | The returned normal vector. |
Definition at line 1192 of file G4TessellatedSolid.cc.
Referenced by SurfaceNormal().
| G4TessellatedSolid & G4TessellatedSolid::operator+= | ( | const G4TessellatedSolid & | right | ) |
Operator +=, allowing to add two tessellated solids together, so that the solid on the left includes all of the facets in the solid on the right. To note that copies of the facets are generated, rather than using the original facet set of the solid on the right.
Definition at line 772 of file G4TessellatedSolid.cc.
| G4TessellatedSolid & G4TessellatedSolid::operator= | ( | const G4TessellatedSolid & | right | ) |
Definition at line 138 of file G4TessellatedSolid.cc.
Referenced by G4ExtrudedSolid::operator=().
|
virtual |
Returns the the safety distance from inside the solid at a point 'p'.
| [in] | p | The point coordinates. |
| [in] | aAccurate | Not used. |
Definition at line 1734 of file G4TessellatedSolid.cc.
Referenced by DistanceToOut().
|
virtual |
Returns the the safety distance from outside the solid at a point 'p'.
| [in] | p | The point coordinates. |
| [in] | aAccurate | Accuracy flag, if false quickly computes and returns the distance to the voxels bounding-box. |
Definition at line 1676 of file G4TessellatedSolid.cc.
Referenced by DistanceToIn().
|
inline |
Allowing to tune the maximum number of voxels to use for optimisation.
Definition at line 481 of file G4TessellatedSolid.hh.
| void G4TessellatedSolid::SetSolidClosed | ( | const G4bool | t | ) |
Modifier and accessor to close/finalise the solid.
Definition at line 622 of file G4TessellatedSolid.cc.
Referenced by G4GDMLReadSolids::TessellatedRead().
|
overridevirtual |
Streams the object contents to an output stream.
Implements G4VSolid.
Definition at line 1799 of file G4TessellatedSolid.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 1854 of file G4TessellatedSolid.cc.
Referenced by G4ExtrudedSolid::SurfaceNormal().
|
protected |
Definition at line 440 of file G4TessellatedSolid.hh.
Referenced by CalculateExtent(), G4ExtrudedSolid::DistanceToIn(), G4ExtrudedSolid::DistanceToOut(), G4ExtrudedSolid::G4ExtrudedSolid(), GetFacetIndex(), G4ExtrudedSolid::Inside(), Normal(), and G4ExtrudedSolid::SurfaceNormal().