ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4GeomTools Class Reference

#include <geant4/tree/geant4-10.6-release/source/geometry/management/include/G4GeomTools.hh>

Static Public Member Functions

static G4double TriangleArea (G4double Ax, G4double Ay, G4double Bx, G4double By, G4double Cx, G4double Cy)
 
static G4double TriangleArea (const G4TwoVector &A, const G4TwoVector &B, const G4TwoVector &C)
 
static G4double QuadArea (const G4TwoVector &A, const G4TwoVector &B, const G4TwoVector &C, const G4TwoVector &D)
 
static G4double PolygonArea (const G4TwoVectorList &polygon)
 
static G4bool PointInTriangle (G4double Px, G4double Py, G4double Ax, G4double Ay, G4double Bx, G4double By, G4double Cx, G4double Cy)
 
static G4bool PointInTriangle (const G4TwoVector &P, const G4TwoVector &A, const G4TwoVector &B, const G4TwoVector &C)
 
static G4bool PointInPolygon (const G4TwoVector &P, const G4TwoVectorList &Polygon)
 
static G4bool IsConvex (const G4TwoVectorList &polygon)
 
static G4bool TriangulatePolygon (const G4TwoVectorList &polygon, G4TwoVectorList &result)
 
static G4bool TriangulatePolygon (const G4TwoVectorList &polygon, std::vector< G4int > &result)
 
static void RemoveRedundantVertices (G4TwoVectorList &polygon, std::vector< G4int > &iout, G4double tolerance=0.0)
 
static G4bool DiskExtent (G4double rmin, G4double rmax, G4double startPhi, G4double delPhi, G4TwoVector &pmin, G4TwoVector &pmax)
 
static void DiskExtent (G4double rmin, G4double rmax, G4double sinPhiStart, G4double cosPhiStart, G4double sinPhiEnd, G4double cosPhiEnd, G4TwoVector &pmin, G4TwoVector &pmax)
 
static G4double EllipsePerimeter (G4double a, G4double b)
 
static G4double EllipticConeLateralArea (G4double a, G4double b, G4double h)
 
static G4ThreeVector TriangleAreaNormal (const G4ThreeVector &A, const G4ThreeVector &B, const G4ThreeVector &C)
 
static G4ThreeVector QuadAreaNormal (const G4ThreeVector &A, const G4ThreeVector &B, const G4ThreeVector &C, const G4ThreeVector &D)
 
static G4ThreeVector PolygonAreaNormal (const G4ThreeVectorList &polygon)
 
static G4double DistancePointSegment (const G4ThreeVector &P, const G4ThreeVector &A, const G4ThreeVector &B)
 
static G4ThreeVector ClosestPointOnSegment (const G4ThreeVector &P, const G4ThreeVector &A, const G4ThreeVector &B)
 
static G4ThreeVector ClosestPointOnTriangle (const G4ThreeVector &P, const G4ThreeVector &A, const G4ThreeVector &B, const G4ThreeVector &C)
 
static G4bool SphereExtent (G4double rmin, G4double rmax, G4double startTheta, G4double delTheta, G4double startPhi, G4double delPhi, G4ThreeVector &pmin, G4ThreeVector &pmax)
 

Static Private Member Functions

static G4bool CheckSnip (const G4TwoVectorList &contour, G4int a, G4int b, G4int c, G4int n, const G4int *V)
 
static G4double comp_ellint_2 (G4double e)
 

Detailed Description

Definition at line 45 of file G4GeomTools.hh.

View newest version in sPHENIX GitHub at line 45 of file G4GeomTools.hh

Member Function Documentation

G4bool G4GeomTools::CheckSnip ( const G4TwoVectorList contour,
G4int  a,
G4int  b,
G4int  c,
G4int  n,
const G4int V 
)
staticprivate

Definition at line 271 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 271 of file G4GeomTools.cc

References a, b, c, G4GeometryTolerance::GetInstance(), G4GeometryTolerance::GetSurfaceTolerance(), kCarTolerance, max, min, n, PointInTriangle(), xmax, xmin, ymax, and ymin.

Referenced by TriangulatePolygon().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4ThreeVector G4GeomTools::ClosestPointOnSegment ( const G4ThreeVector P,
const G4ThreeVector A,
const G4ThreeVector B 
)
static

Definition at line 658 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 658 of file G4GeomTools.cc

References A(), B(), CLHEP::Hep3Vector::dot(), CLHEP::Hep3Vector::mag2(), t, and Acts::UnitConstants::u.

+ Here is the call graph for this function:

G4ThreeVector G4GeomTools::ClosestPointOnTriangle ( const G4ThreeVector P,
const G4ThreeVector A,
const G4ThreeVector B,
const G4ThreeVector C 
)
static

Definition at line 687 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 687 of file G4GeomTools.cc

References a, A(), b, C(), c, d, denom, CLHEP::Hep3Vector::dot(), e, kInfinity, CLHEP::Hep3Vector::mag2(), P, t1, and tmp1.

+ Here is the call graph for this function:

G4double G4GeomTools::comp_ellint_2 ( G4double  e)
staticprivate

Definition at line 570 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 570 of file G4GeomTools.cc

References a, b, eps, CLHEP::halfpi, S(), tmp, x, and y.

Referenced by EllipsePerimeter(), and EllipticConeLateralArea().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4bool G4GeomTools::DiskExtent ( G4double  rmin,
G4double  rmax,
G4double  startPhi,
G4double  delPhi,
G4TwoVector pmin,
G4TwoVector pmax 
)
static

Definition at line 390 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 390 of file G4GeomTools.cc

References G4GeometryTolerance::GetInstance(), G4GeometryTolerance::GetSurfaceTolerance(), kCarTolerance, CLHEP::Hep2Vector::set(), and CLHEP::twopi.

Referenced by G4GenericPolycone::BoundingLimits(), G4Polycone::BoundingLimits(), G4CutTubs::BoundingLimits(), G4Tubs::BoundingLimits(), G4Torus::BoundingLimits(), G4Cons::BoundingLimits(), G4Sphere::BoundingLimits(), G4Torus::CalculateExtent(), and SphereExtent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4GeomTools::DiskExtent ( G4double  rmin,
G4double  rmax,
G4double  sinPhiStart,
G4double  cosPhiStart,
G4double  sinPhiEnd,
G4double  cosPhiEnd,
G4TwoVector pmin,
G4TwoVector pmax 
)
static

Definition at line 423 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 423 of file G4GeomTools.cc

References kdfinder::abs(), G4GeometryTolerance::GetInstance(), G4GeometryTolerance::GetSurfaceTolerance(), kCarTolerance, max, min, and CLHEP::Hep2Vector::set().

+ Here is the call graph for this function:

G4double G4GeomTools::DistancePointSegment ( const G4ThreeVector P,
const G4ThreeVector A,
const G4ThreeVector B 
)
static

Definition at line 637 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 637 of file G4GeomTools.cc

References A(), CLHEP::Hep3Vector::dot(), CLHEP::Hep3Vector::mag(), CLHEP::Hep3Vector::mag2(), and Acts::UnitConstants::u.

+ Here is the call graph for this function:

G4double G4GeomTools::EllipsePerimeter ( G4double  a,
G4double  b 
)
static

Definition at line 532 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 532 of file G4GeomTools.cc

References a, kdfinder::abs(), b, comp_ellint_2(), e, max, min, x, and y.

Referenced by G4EllipticalTube::GetCachedSurfaceArea().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4double G4GeomTools::EllipticConeLateralArea ( G4double  a,
G4double  b,
G4double  h 
)
static

Definition at line 546 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 546 of file G4GeomTools.cc

References a, kdfinder::abs(), b, comp_ellint_2(), e, Acts::UnitConstants::h, max, min, x, and y.

Referenced by G4EllipticalCone::GetPointOnSurface(), and G4EllipticalCone::GetSurfaceArea().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4bool G4GeomTools::IsConvex ( const G4TwoVectorList polygon)
static

Definition at line 165 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 165 of file G4GeomTools.cc

References kdfinder::abs(), Acts::VectorHelpers::cross(), e1, e2, G4GeometryTolerance::GetInstance(), G4GeometryTolerance::GetSurfaceTolerance(), kCarTolerance, n, CLHEP::Hep2Vector::x(), and CLHEP::Hep2Vector::y().

Referenced by G4ExtrudedSolid::G4ExtrudedSolid().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4bool G4GeomTools::PointInPolygon ( const G4TwoVector P,
const G4TwoVectorList Polygon 
)
static

Definition at line 145 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 145 of file G4GeomTools.cc

References in, k, CLHEP::Hep2Vector::x(), x, CLHEP::Hep2Vector::y(), and y.

+ Here is the call graph for this function:

G4bool G4GeomTools::PointInTriangle ( G4double  Px,
G4double  Py,
G4double  Ax,
G4double  Ay,
G4double  Bx,
G4double  By,
G4double  Cx,
G4double  Cy 
)
static

Definition at line 92 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 92 of file G4GeomTools.cc

Referenced by CheckSnip().

+ Here is the caller graph for this function:

G4bool G4GeomTools::PointInTriangle ( const G4TwoVector P,
const G4TwoVector A,
const G4TwoVector B,
const G4TwoVector C 
)
static

Definition at line 117 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 117 of file G4GeomTools.cc

References CLHEP::Hep2Vector::x(), and CLHEP::Hep2Vector::y().

+ Here is the call graph for this function:

G4double G4GeomTools::PolygonArea ( const G4TwoVectorList polygon)
static

Definition at line 76 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 76 of file G4GeomTools.cc

References n.

Referenced by G4GenericPolycone::CalculateExtent(), G4Polycone::CalculateExtent(), G4Polyhedra::CalculateExtent(), G4ExtrudedSolid::G4ExtrudedSolid(), and TriangulatePolygon().

+ Here is the caller graph for this function:

G4ThreeVector G4GeomTools::PolygonAreaNormal ( const G4ThreeVectorList polygon)
static

Definition at line 621 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 621 of file G4GeomTools.cc

References CLHEP::Hep3Vector::cross(), n, and CLHEP::normal().

+ Here is the call graph for this function:

G4double G4GeomTools::QuadArea ( const G4TwoVector A,
const G4TwoVector B,
const G4TwoVector C,
const G4TwoVector D 
)
static

Definition at line 64 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 64 of file G4GeomTools.cc

References CLHEP::Hep2Vector::x(), and CLHEP::Hep2Vector::y().

+ Here is the call graph for this function:

G4ThreeVector G4GeomTools::QuadAreaNormal ( const G4ThreeVector A,
const G4ThreeVector B,
const G4ThreeVector C,
const G4ThreeVector D 
)
static

Definition at line 609 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 609 of file G4GeomTools.cc

References Acts::VectorHelpers::cross().

Referenced by G4Trap::GetPointOnSurface(), and G4Trap::GetSurfaceArea().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4GeomTools::RemoveRedundantVertices ( G4TwoVectorList polygon,
std::vector< G4int > &  iout,
G4double  tolerance = 0.0 
)
static

Definition at line 305 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 305 of file G4GeomTools.cc

References kdfinder::abs(), Acts::Test::delta, e1, e2, k, kInfinity, CLHEP::Hep2Vector::mag2(), max, sqr(), CLHEP::Hep2Vector::x(), x, and CLHEP::Hep2Vector::y().

Referenced by G4Polycone::CalculateExtent(), G4Polyhedra::CalculateExtent(), and G4ExtrudedSolid::G4ExtrudedSolid().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4bool G4GeomTools::SphereExtent ( G4double  rmin,
G4double  rmax,
G4double  startTheta,
G4double  delTheta,
G4double  startPhi,
G4double  delPhi,
G4ThreeVector pmin,
G4ThreeVector pmax 
)
static

Definition at line 790 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 790 of file G4GeomTools.cc

References DiskExtent(), G4GeometryTolerance::GetInstance(), G4GeometryTolerance::GetSurfaceTolerance(), CLHEP::halfpi, kCarTolerance, max, min, CLHEP::pi, rmax(), CLHEP::Hep3Vector::set(), CLHEP::twopi, CLHEP::Hep2Vector::x(), and CLHEP::Hep2Vector::y().

+ Here is the call graph for this function:

G4double G4GeomTools::TriangleArea ( G4double  Ax,
G4double  Ay,
G4double  Bx,
G4double  By,
G4double  Cx,
G4double  Cy 
)
static

Definition at line 41 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 41 of file G4GeomTools.cc

G4double G4GeomTools::TriangleArea ( const G4TwoVector A,
const G4TwoVector B,
const G4TwoVector C 
)
static

Definition at line 52 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 52 of file G4GeomTools.cc

References CLHEP::Hep2Vector::x(), and CLHEP::Hep2Vector::y().

+ Here is the call graph for this function:

G4ThreeVector G4GeomTools::TriangleAreaNormal ( const G4ThreeVector A,
const G4ThreeVector B,
const G4ThreeVector C 
)
static

Definition at line 598 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 598 of file G4GeomTools.cc

References Acts::VectorHelpers::cross().

Referenced by G4Trd::GetPointOnSurface(), and G4Trap::GetPointOnSurface().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4bool G4GeomTools::TriangulatePolygon ( const G4TwoVectorList polygon,
G4TwoVectorList result 
)
static

Definition at line 193 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 193 of file G4GeomTools.cc

References n.

Referenced by G4GenericPolycone::CalculateExtent(), G4Polycone::CalculateExtent(), G4Polyhedra::CalculateExtent(), and G4ExtrudedSolid::CalculateExtent().

+ Here is the caller graph for this function:

G4bool G4GeomTools::TriangulatePolygon ( const G4TwoVectorList polygon,
std::vector< G4int > &  result 
)
static

Definition at line 209 of file G4GeomTools.cc.

View newest version in sPHENIX GitHub at line 209 of file G4GeomTools.cc

References a, b, c, CheckSnip(), n, PolygonArea(), and reverse.

+ Here is the call graph for this function:


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