Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VCSGface Class Referenceabstract

G4VCSGface is virtual base class, representing one side (or face) of a CSG-like solid. It should be possible to build a CSG entirely out of connecting CSG faces. Each face has an inside and outside surface, the former represents the inside of the volume, the latter, the outside. More...

#include <G4VCSGface.hh>

Inheritance diagram for G4VCSGface:

Public Member Functions

 G4VCSGface ()=default
virtual ~G4VCSGface ()=default
virtual G4bool Intersect (const G4ThreeVector &p, const G4ThreeVector &v, G4bool outgoing, G4double surfTolerance, G4double &distance, G4double &distFromSurface, G4ThreeVector &normal, G4bool &allBehind)=0
virtual G4double Distance (const G4ThreeVector &p, G4bool outgoing)=0
virtual EInside Inside (const G4ThreeVector &p, G4double tolerance, G4double *bestDistance)=0
virtual G4ThreeVector Normal (const G4ThreeVector &p, G4double *bestDistance)=0
virtual G4double Extent (const G4ThreeVector axis)=0
virtual void CalculateExtent (const EAxis axis, const G4VoxelLimits &voxelLimit, const G4AffineTransform &tranform, G4SolidExtentList &extentList)=0
virtual G4VCSGfaceClone ()=0
virtual G4double SurfaceArea ()=0
virtual G4ThreeVector GetPointOnFace ()=0

Detailed Description

G4VCSGface is virtual base class, representing one side (or face) of a CSG-like solid. It should be possible to build a CSG entirely out of connecting CSG faces. Each face has an inside and outside surface, the former represents the inside of the volume, the latter, the outside.

Definition at line 149 of file G4VCSGface.hh.

Constructor & Destructor Documentation

◆ G4VCSGface()

G4VCSGface::G4VCSGface ( )
default

Default Constructor and Destructor.

Referenced by G4PolyconeSide::Clone(), G4PolyhedraSide::Clone(), G4PolyPhiFace::Clone(), and Clone().

◆ ~G4VCSGface()

virtual G4VCSGface::~G4VCSGface ( )
virtualdefault

Member Function Documentation

◆ CalculateExtent()

virtual void G4VCSGface::CalculateExtent ( const EAxis axis,
const G4VoxelLimits & voxelLimit,
const G4AffineTransform & tranform,
G4SolidExtentList & extentList )
pure virtual

Calculates the extent of the face for the voxel navigator.

Parameters
[in]axisThe axis in which to check the shapes 3D extent against.
[in]voxelLimitLimits along x, y, and/or z axes.
[in]tranformA coordinate transformation on which to apply to the shape before testing.
[out]extentListThe list of (voxel) extents along the axis.

Implemented in G4PolyconeSide, G4PolyhedraSide, and G4PolyPhiFace.

◆ Clone()

virtual G4VCSGface * G4VCSGface::Clone ( )
pure virtual

Method invoked by the copy constructor or the assignment operator. Its purpose is to return a pointer to a duplicate copy of the face.

Implemented in G4PolyconeSide, G4PolyhedraSide, and G4PolyPhiFace.

Referenced by G4VCSGfaceted::CopyStuff().

◆ Distance()

virtual G4double G4VCSGface::Distance ( const G4ThreeVector & p,
G4bool outgoing )
pure virtual

Determines the distance of a point from either the inside or outside surfaces of the face.

Parameters
[in]pPosition.
[in]outgoingFlag, true, to consider only inside surfaces or false, to consider only outside surfaces.
Returns
The distance to the closest surface satisfying requirements or kInfinity if no such surface exists.

Implemented in G4PolyconeSide, G4PolyhedraSide, and G4PolyPhiFace.

Referenced by G4VCSGfaceted::DistanceToIn(), and G4VCSGfaceted::DistanceToOut().

◆ Extent()

virtual G4double G4VCSGface::Extent ( const G4ThreeVector axis)
pure virtual

Returns the face extent along the axis.

Parameters
[in]axisUnit vector defining the direction.
Returns
The largest point along the given axis of the face's extent.

Implemented in G4PolyconeSide, G4PolyhedraSide, and G4PolyPhiFace.

◆ GetPointOnFace()

virtual G4ThreeVector G4VCSGface::GetPointOnFace ( )
pure virtual

Auxiliary method for GetPointOnSurface().

Implemented in G4PolyconeSide.

◆ Inside()

virtual EInside G4VCSGface::Inside ( const G4ThreeVector & p,
G4double tolerance,
G4double * bestDistance )
pure virtual

Determines whether a point is inside, outside, or on the surface of the face.

Parameters
[in]pPosition.
[in]toleranceTolerance defining the bounds of the "kSurface", nominally equal to kCarTolerance/2.
[out]bestDistanceDistance to the closest surface (in or out).
Returns
kInside if the point is closest to the inside surface; kOutside if the point is closest to the outside surface; kSurface if the point is withing tolerance of the surface.

Implemented in G4PolyconeSide, G4PolyhedraSide, and G4PolyPhiFace.

◆ Intersect()

virtual G4bool G4VCSGface::Intersect ( const G4ThreeVector & p,
const G4ThreeVector & v,
G4bool outgoing,
G4double surfTolerance,
G4double & distance,
G4double & distFromSurface,
G4ThreeVector & normal,
G4bool & allBehind )
pure virtual

Determines the distance along a line to the face.

Parameters
[in]pPosition.
[in]vDirection (assumed to be a unit vector).
[in]outgoingFlag true, to consider only inside surfaces; false, to consider only outside surfaces.
[in]surfToleranceMinimum distance from the surface.
[out]distanceDistance to intersection.
[out]distFromSurfaceDistance from surface (along surface normal), < 0 if the point is in front of the surface.
[out]normalNormal of surface at intersection point.
[out]allBehindFlag, true, if entire surface is behind normal.
Returns
true if there is an intersection, false otherwise.

Implemented in G4PolyconeSide, G4PolyhedraSide, and G4PolyPhiFace.

◆ Normal()

virtual G4ThreeVector G4VCSGface::Normal ( const G4ThreeVector & p,
G4double * bestDistance )
pure virtual

Returns the normal of surface closest to the point.

Parameters
[in]pPosition.
[out]bestDistanceDistance to the closest surface (in or out).
Returns
The normal of the surface nearest the point.

Implemented in G4PolyconeSide, G4PolyhedraSide, and G4PolyPhiFace.

◆ SurfaceArea()

virtual G4double G4VCSGface::SurfaceArea ( )
pure virtual

Returning an estimation of the face surface area, in internal units.

Implemented in G4PolyconeSide, G4PolyhedraSide, and G4PolyPhiFace.


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