|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
G4VFacet is a base class defining the facets which are components of a G4TessellatedSolid shape. More...
#include <G4VFacet.hh>
Public Member Functions | |
| G4VFacet () | |
| virtual | ~G4VFacet ()=default |
| G4bool | operator== (const G4VFacet &right) const |
| virtual G4int | GetNumberOfVertices () const =0 |
| virtual G4ThreeVector | GetVertex (G4int i) const =0 |
| virtual void | SetVertex (G4int i, const G4ThreeVector &val)=0 |
| virtual void | SetVertices (std::vector< G4ThreeVector > *vertices)=0 |
| virtual G4GeometryType | GetEntityType () const =0 |
| virtual G4ThreeVector | GetSurfaceNormal () const =0 |
| virtual G4bool | IsDefined () const =0 |
| virtual G4ThreeVector | GetCircumcentre () const =0 |
| virtual G4double | GetRadius () const =0 |
| virtual G4VFacet * | GetClone ()=0 |
| virtual G4double | Distance (const G4ThreeVector &, G4double minDist)=0 |
| virtual G4double | Distance (const G4ThreeVector &, G4double minDist, const G4bool)=0 |
| virtual G4double | Extent (const G4ThreeVector axis)=0 |
| virtual G4bool | Intersect (const G4ThreeVector &p, const G4ThreeVector &v, const G4bool outgoing, G4double &distance, G4double &distFromSurface, G4ThreeVector &normal)=0 |
| virtual G4double | GetArea () const =0 |
| virtual G4ThreeVector | GetPointOnFace () const =0 |
| void | ApplyTranslation (const G4ThreeVector &v) |
| std::ostream & | StreamInfo (std::ostream &os) const |
| G4bool | IsInside (const G4ThreeVector &p) const |
| virtual G4int | AllocatedMemory ()=0 |
| virtual void | SetVertexIndex (G4int i, G4int j)=0 |
| virtual G4int | GetVertexIndex (G4int i) const =0 |
Protected Attributes | |
| G4double | kCarTolerance |
Static Protected Attributes | |
| static const G4double | dirTolerance = 1.0E-14 |
G4VFacet is a base class defining the facets which are components of a G4TessellatedSolid shape.
Definition at line 55 of file G4VFacet.hh.
| G4VFacet::G4VFacet | ( | ) |
Constructor and default Destructor.
Definition at line 44 of file G4VFacet.cc.
Referenced by G4QuadrangularFacet::G4QuadrangularFacet(), G4TriangularFacet::G4TriangularFacet(), G4TriangularFacet::G4TriangularFacet(), G4QuadrangularFacet::GetClone(), G4TriangularFacet::GetClone(), GetClone(), operator==(), G4QuadrangularFacet::~G4QuadrangularFacet(), and ~G4VFacet().
|
virtualdefault |
|
pure virtual |
Logger methods for allocated memory of facets.
Implemented in G4TriangularFacet.
Referenced by G4TessellatedSolid::AllocatedMemoryWithoutVoxels().
| void G4VFacet::ApplyTranslation | ( | const G4ThreeVector & | v | ) |
Adds a translation 'v' to the vertices of the facet.
Definition at line 85 of file G4VFacet.cc.
|
pure virtual |
Determines the closest distance between point p and the facet.
Implemented in G4QuadrangularFacet, and G4TriangularFacet.
Referenced by G4TessellatedSolid::GetFacetIndex(), G4TessellatedSolid::Normal(), G4TessellatedSolid::SafetyFromInside(), and G4TessellatedSolid::SafetyFromOutside().
|
pure virtual |
Determines the distance to point 'p'. kInfinity is returned if either: (1) outgoing is TRUE and the dot product of the normal vector to the facet and the displacement vector from p to the triangle is negative. (2) outgoing is FALSE and the dot product of the normal vector to the facet and the displacement vector from p to the triangle is positive.
Implemented in G4QuadrangularFacet, and G4TriangularFacet.
|
pure virtual |
Calculates the furthest the triangle extends in fA particular direction defined by the vector axis.
Implemented in G4QuadrangularFacet, and G4TriangularFacet.
|
pure virtual |
Auxiliary method for returning the surface area.
Implemented in G4QuadrangularFacet, and G4TriangularFacet.
Referenced by G4TessellatedSolid::CheckStructure(), G4TessellatedSolid::GetCubicVolume(), and G4TessellatedSolid::GetSurfaceArea().
|
pure virtual |
Returns the circumcentre point of the facet.
Implemented in G4QuadrangularFacet, and G4TriangularFacet.
Referenced by G4TessellatedSolid::AddFacet(), and operator==().
|
pure virtual |
Returns a pointer to a newly allocated duplicate copy of the facet.
Implemented in G4QuadrangularFacet, and G4TriangularFacet.
Referenced by G4TessellatedSolid::operator+=().
|
pure virtual |
Returns the type ID of the facet.
Implemented in G4QuadrangularFacet, and G4TriangularFacet.
Referenced by StreamInfo().
|
pure virtual |
Returns the number of vertices of the facet.
Implemented in G4QuadrangularFacet, and G4TriangularFacet.
Referenced by ApplyTranslation(), G4TessellatedSolid::CalculateExtent(), G4TessellatedSolid::CheckStructure(), G4TessellatedSolid::CreatePolyhedron(), operator==(), StreamInfo(), and G4GDMLWriteSolids::TessellatedWrite().
|
pure virtual |
Auxiliary method to get a uniform random point on the facet.
Implemented in G4QuadrangularFacet, and G4TriangularFacet.
|
pure virtual |
Returns the radius to the anchor point and centered on the circumcentre.
Implemented in G4QuadrangularFacet, and G4TriangularFacet.
|
pure virtual |
Returns the normal vector to the facet.
Implemented in G4QuadrangularFacet, and G4TriangularFacet.
Referenced by G4TessellatedSolid::CalculateExtent(), G4TessellatedSolid::CheckStructure(), G4TessellatedSolid::GetCubicVolume(), IsInside(), G4TessellatedSolid::Normal(), and operator==().
|
pure virtual |
Returns the vertex based on the index 'i'.
Implemented in G4QuadrangularFacet, and G4TriangularFacet.
Referenced by ApplyTranslation(), G4TessellatedSolid::CalculateExtent(), G4TessellatedSolid::CheckStructure(), G4TessellatedSolid::GetCubicVolume(), IsInside(), operator==(), StreamInfo(), and G4GDMLWriteSolids::TessellatedWrite().
Implemented in G4TriangularFacet.
Referenced by G4TessellatedSolid::CheckStructure(), and G4TessellatedSolid::CreatePolyhedron().
|
pure virtual |
Finds the next intersection when going from 'p' in the direction of 'v'. If 'outgoing' is true, only consider the face if we are going out through the face; otherwise, if false, only consider the face if we are going in through the face.
Implemented in G4QuadrangularFacet, and G4TriangularFacet.
|
pure virtual |
Returns true if the facet is defined.
Implemented in G4QuadrangularFacet, and G4TriangularFacet.
Referenced by G4TessellatedSolid::AddFacet().
| G4bool G4VFacet::IsInside | ( | const G4ThreeVector & | p | ) | const |
Returns true if point 'p' is inside the facet.
Definition at line 114 of file G4VFacet.cc.
Equality operator.
Definition at line 51 of file G4VFacet.cc.
|
pure virtual |
Methods to set the vertices.
Implemented in G4QuadrangularFacet, and G4TriangularFacet.
Referenced by ApplyTranslation().
Implemented in G4TriangularFacet.
|
pure virtual |
Implemented in G4QuadrangularFacet, and G4TriangularFacet.
| std::ostream & G4VFacet::StreamInfo | ( | std::ostream & | os | ) | const |
Streams the object contents to an output stream.
Definition at line 96 of file G4VFacet.cc.
Referenced by G4TessellatedSolid::AddFacet(), and G4TessellatedSolid::StreamInfo().
|
staticprotected |
Definition at line 184 of file G4VFacet.hh.
Referenced by G4QuadrangularFacet::Distance(), and G4TriangularFacet::Intersect().
|
protected |
Definition at line 185 of file G4VFacet.hh.
Referenced by G4TriangularFacet::Distance(), G4QuadrangularFacet::G4QuadrangularFacet(), G4TriangularFacet::G4TriangularFacet(), G4VFacet(), G4TriangularFacet::Intersect(), and operator==().