|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
G4ExtrudedSolid is a is a solid which represents the extrusion of an arbitrary polygon with fixed outline in the defined Z sections. The z-sides of the solid are the scaled versions of the same polygon. The solid is implemented as a specification of a G4TessellatedSolid. More...
#include <G4ExtrudedSolid.hh>
Classes | |
| struct | ZSection |
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 |
| Protected Attributes inherited from G4TessellatedSolid | |
| G4double | kCarToleranceHalf |
| Protected Attributes inherited from G4VSolid | |
| G4double | kCarTolerance |
G4ExtrudedSolid is a is a solid which represents the extrusion of an arbitrary polygon with fixed outline in the defined Z sections. The z-sides of the solid are the scaled versions of the same polygon. The solid is implemented as a specification of a G4TessellatedSolid.
Definition at line 78 of file G4ExtrudedSolid.hh.
| G4ExtrudedSolid::G4ExtrudedSolid | ( | const G4String & | pName, |
| const std::vector< G4TwoVector > & | polygon, | ||
| const std::vector< ZSection > & | zsections ) |
General constructor for an extruded polygon, through contour and polyline.
| [in] | pName | The solid name. |
| [in] | polygon | The 2D polygonal contour, i.e. the vertices of the outlined polygon defined in clock-wise order. |
| [in] | zsections | The 3D polyline with scale factors, i.e. the Z-sections defined by Z position in increasing order. |
Definition at line 66 of file G4ExtrudedSolid.cc.
Referenced by Clone(), G4ExtrudedSolid(), and operator=().
| G4ExtrudedSolid::G4ExtrudedSolid | ( | const G4String & | pName, |
| const std::vector< G4TwoVector > & | polygon, | ||
| G4double | halfZ, | ||
| const G4TwoVector & | off1 = G4TwoVector(0.,0.), | ||
| G4double | scale1 = 1., | ||
| const G4TwoVector & | off2 = G4TwoVector(0.,0.), | ||
| G4double | scale2 = 1. ) |
Special constructor for an extruded polygon with 2 Z-sections.
| [in] | pName | The solid name. |
| [in] | polygon | The 2D polygonal contour, i.e. the vertices of the outlined polygon defined in clock-wise order. |
| [in] | halfZ | Half length in Z, i.e. the distance from the origin to the sections. |
| [in] | off1 | (X, Y) position of the first polygon in -halfZ. |
| [in] | scale1 | Scale factor at -halfZ. |
| [in] | off2 | (X, Y) position of the second polygon in +halfZ. |
| [in] | scale2 | Scale factor at +halfZ. |
Definition at line 190 of file G4ExtrudedSolid.cc.
|
overridedefault |
Default Destructor.
| G4ExtrudedSolid::G4ExtrudedSolid | ( | __void__ & | a | ) |
Fake default constructor for usage restricted to direct object persistency for clients requiring preallocation of memory for persistifiable objects.
Definition at line 287 of file G4ExtrudedSolid.cc.
|
default |
Copy constructor and assignment operator.
|
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 1323 of file G4ExtrudedSolid.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 1380 of file G4ExtrudedSolid.cc.
|
overridevirtual |
Makes a clone of the object for use in multi-treading.
Reimplemented from G4VSolid.
Definition at line 806 of file G4ExtrudedSolid.cc.
|
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 1173 of file G4ExtrudedSolid.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 1112 of file G4ExtrudedSolid.cc.
|
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 1292 of file G4ExtrudedSolid.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 1210 of file G4ExtrudedSolid.cc.
|
overridevirtual |
Returns the type ID, "G4ExtrudedSolid" of the solid.
Implements G4VSolid.
Definition at line 790 of file G4ExtrudedSolid.cc.
|
inline |
Accessors.
Referenced by BoundingLimits(), and G4GDMLWriteSolids::XtruWrite().
|
inline |
Referenced by BoundingLimits(), CalculateExtent(), and G4GDMLWriteSolids::XtruWrite().
|
inline |
|
inline |
Referenced by G4GDMLWriteSolids::XtruWrite().
Referenced by BoundingLimits(), CalculateExtent(), and G4GDMLWriteSolids::XtruWrite().
|
inline |
|
overridevirtual |
Concrete implementations of the expected query interfaces for solids, as defined in the base class G4VSolid.
Implements G4VSolid.
Definition at line 813 of file G4ExtrudedSolid.cc.
|
overridevirtual |
Returns true as the solid has only planar faces.
Reimplemented from G4VSolid.
Definition at line 799 of file G4ExtrudedSolid.cc.
| G4ExtrudedSolid & G4ExtrudedSolid::operator= | ( | const G4ExtrudedSolid & | rhs | ) |
Definition at line 296 of file G4ExtrudedSolid.cc.
|
overridevirtual |
Streams the object contents to an output stream.
Implements G4VSolid.
Definition at line 1481 of file G4ExtrudedSolid.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 919 of file G4ExtrudedSolid.cc.