|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
G4GeomTools is a collecting utilities which can be helpful for a wide range of geometry-related tasks. More...
#include <G4GeomTools.hh>
G4GeomTools is a collecting utilities which can be helpful for a wide range of geometry-related tasks.
Definition at line 50 of file G4GeomTools.hh.
|
static |
Finds a point on a 3D line segment AB closest to point 'P'.
Definition at line 667 of file G4GeomTools.cc.
|
static |
Finds a point on a 3D triangle ABC closest to point 'P'.
Definition at line 696 of file G4GeomTools.cc.
|
static |
Calculates the bounding rectangle of a disk sector. Faster version without check of parameters.
Definition at line 432 of file G4GeomTools.cc.
|
static |
Calculates the bounding rectangle of a disk sector. It returns false if the input parameters do not meet the following criteria: rmin >= 0 rmax > rmin + kCarTolerance delPhi > 0 + kCarTolerance.
Definition at line 399 of file G4GeomTools.cc.
Referenced by G4Cons::BoundingLimits(), G4CutTubs::BoundingLimits(), G4GenericPolycone::BoundingLimits(), G4Polycone::BoundingLimits(), G4Sphere::BoundingLimits(), G4Torus::BoundingLimits(), G4Tubs::BoundingLimits(), G4TwistedTubs::BoundingLimits(), G4Torus::CalculateExtent(), DiskExtent(), and SphereExtent().
|
static |
Calculates the distance between a point 'P' and line segment AB in 3D.
Definition at line 646 of file G4GeomTools.cc.
Computes the circumference (perimeter) of an ellipse.
Definition at line 541 of file G4GeomTools.cc.
Computes the lateral surface area of an elliptic cone.
Definition at line 555 of file G4GeomTools.cc.
Referenced by G4EllipticalCone::GetSurfaceArea().
|
static |
Calculate surface area of the hyperboloid between 'zmin' and 'zmax'.
| [in] | dphi | Delta phi. |
| [in] | r0 | The radius at z = 0. |
| [in] | tanstereo | The tangent of the stereo angle. |
| [in] | zmin | Minimum Z. |
| [in] | zmax | Maximum Z. |
Definition at line 913 of file G4GeomTools.cc.
Referenced by G4Hype::SetInnerRadius(), G4Hype::SetInnerStereo(), G4Hype::SetOuterRadius(), G4Hype::SetOuterStereo(), and G4Hype::SetZHalfLength().
Calculates the hyperbolic surface stereo. Stereo is a half angle at the intersection point of the two lines in the tangent plane cross-section.
Definition at line 861 of file G4GeomTools.cc.
|
static |
Decides if a 2D 'polygon' is convex, i.e. if all internal angles are less than pi.
Definition at line 166 of file G4GeomTools.cc.
Referenced by G4ExtrudedSolid::G4ExtrudedSolid(), and G4ExtrudedSolid::G4ExtrudedSolid().
|
static |
Decides if a point P is inside the 'Polygon'.
Definition at line 146 of file G4GeomTools.cc.
|
static |
Decides if a point P is inside the triangle ABC.
Definition at line 118 of file G4GeomTools.cc.
|
static |
Decides if a point (Px,Py) is inside the triangle (Ax,Ay)(Bx,By)(Cx,Cy).
Definition at line 93 of file G4GeomTools.cc.
|
static |
Calculates the area of a 2D polygon, returned value is positive if the vertices of the polygon are defined in anticlockwise order, otherwise it is negative.
Definition at line 76 of file G4GeomTools.cc.
Referenced by G4GenericPolycone::CalculateExtent(), G4Polycone::CalculateExtent(), G4Polyhedra::CalculateExtent(), G4ExtrudedSolid::G4ExtrudedSolid(), G4ExtrudedSolid::G4ExtrudedSolid(), and TriangulatePolygon().
|
static |
Finds the normal to the plane of a 3D polygon; the length of the normal is equal to the area of the polygon.
Definition at line 630 of file G4GeomTools.cc.
|
static |
Calculates the area of a 2D quadrilateral, returned value is positive if the vertices of the quadrilateral are given in anticlockwise order, otherwise it is negative.
Definition at line 64 of file G4GeomTools.cc.
|
static |
Finds the normal to the plane of a 3D quadrilateral ABCD; the length of the normal is equal to the area of the quadrilateral.
Definition at line 618 of file G4GeomTools.cc.
Referenced by G4Polyhedra::GetSurfaceArea(), G4Trap::GetSurfaceArea(), and G4Trap::SetCachedValues().
|
static |
Removes collinear and coincident points from a 2D 'polygon'. Indices of removed points are available in 'iout'. Allows to specify a 'tolerance'.
Definition at line 310 of file G4GeomTools.cc.
Referenced by G4Polycone::CalculateExtent(), G4Polyhedra::CalculateExtent(), G4ExtrudedSolid::G4ExtrudedSolid(), and G4ExtrudedSolid::G4ExtrudedSolid().
|
static |
Calculates the bounding box of a spherical sector,
Definition at line 803 of file G4GeomTools.cc.
|
static |
|
static |
Functions to calculate the area of 2D triangle, returned value is positive if the vertices of the triangle are given in anticlockwise order, otherwise it is negative.
Definition at line 41 of file G4GeomTools.cc.
|
static |
Finds the normal to the plane of a 3D triangle ABC; the length of the normal is equal to the area of the triangle.
Definition at line 607 of file G4GeomTools.cc.
Referenced by G4Trap::GetPointOnSurface().
|
static |
Same using the function above and returning as 'result' a list of triangles.
Definition at line 194 of file G4GeomTools.cc.
|
static |
Simple implementation of "ear clipping" algorithm for triangulation of a simple contour/polygon, it places results in a std::vector as triplets of vertices. If triangulation is successful the function returns true, otherwise false.
Definition at line 210 of file G4GeomTools.cc.
Referenced by G4ExtrudedSolid::CalculateExtent(), G4GenericPolycone::CalculateExtent(), G4Polycone::CalculateExtent(), G4Polyhedra::CalculateExtent(), and TriangulatePolygon().
|
static |
Finds the XY-coordinates of the corners of a generic trap that bounds specified twisted tube.
| [in] | twistAng | The twist angle. |
| [in] | endInnerRad | The inner radius at z = halfZ. |
| [in] | endOuterRad | The outer radius at z = halfZ. |
| [in] | dPhi | Delta phi. |
| [in] | vertices | The corners of the generic trap. |
Definition at line 875 of file G4GeomTools.cc.