|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
G4ReduciblePolygon is a utility class used to specify, test, reduce, and/or otherwise manipulate a 2D polygon. More...
#include <G4ReduciblePolygon.hh>
Public Member Functions | |
| G4ReduciblePolygon (const G4double a[], const G4double b[], G4int n) | |
| G4ReduciblePolygon (const G4double rmin[], const G4double rmax[], const G4double z[], G4int n) | |
| G4ReduciblePolygon (const G4ReduciblePolygon &)=delete | |
| G4ReduciblePolygon & | operator= (const G4ReduciblePolygon &)=delete |
| ~G4ReduciblePolygon () | |
| G4int | NumVertices () const |
| G4double | Amin () const |
| G4double | Amax () const |
| G4double | Bmin () const |
| G4double | Bmax () const |
| void | CopyVertices (G4double a[], G4double b[]) const |
| void | ScaleA (G4double scale) |
| void | ScaleB (G4double scale) |
| G4bool | RemoveDuplicateVertices (G4double tolerance) |
| G4bool | RemoveRedundantVertices (G4double tolerance) |
| void | ReverseOrder () |
| void | StartWithZMin () |
| G4double | Area () |
| G4bool | CrossesItself (G4double tolerance) |
| G4bool | BisectedBy (G4double a1, G4double b1, G4double a2, G4double b2, G4double tolerance) |
| void | Print () |
| G4ReduciblePolygon (__void__ &) | |
Friends | |
| class | G4ReduciblePolygonIterator |
| struct | ABVertex |
G4ReduciblePolygon is a utility class used to specify, test, reduce, and/or otherwise manipulate a 2D polygon.
Definition at line 57 of file G4ReduciblePolygon.hh.
Constructor of G4ReduciblePolygon via simple a/b arrays.
| [in] | a | First array of points. |
| [in] | b | Second array of points. |
| [in] | n | The number of vertices of the polygon (has to be >=3). |
Definition at line 38 of file G4ReduciblePolygon.cc.
Referenced by G4ReduciblePolygon(), and operator=().
| G4ReduciblePolygon::G4ReduciblePolygon | ( | const G4double | rmin[], |
| const G4double | rmax[], | ||
| const G4double | z[], | ||
| G4int | n ) |
Special constructor version for G4Polyhedra and G4Polycone, that takes two a points at planes of b (where a==r and b==z).
| [in] | rmin | Array of r-min coordinates of corners. |
| [in] | rmax | Array of r-max coordinates of corners. |
| [in] | z | Array of Z coordinates of corners. |
| [in] | n | The number of vertices of the polygon. |
Definition at line 51 of file G4ReduciblePolygon.cc.
|
delete |
Copy constructor and assignment operator not allowed.
| G4ReduciblePolygon::~G4ReduciblePolygon | ( | ) |
Destructor, taking care to clear allocated lists.
Definition at line 131 of file G4ReduciblePolygon.cc.
| G4ReduciblePolygon::G4ReduciblePolygon | ( | __void__ & | ) |
Fake default constructor for usage restricted to direct object persistency for clients requiring preallocation of memory for persistifiable objects.
Definition at line 122 of file G4ReduciblePolygon.cc.
|
inline |
Definition at line 98 of file G4ReduciblePolygon.hh.
Referenced by G4EnclosingCylinder::G4EnclosingCylinder(), and G4PolyPhiFace::G4PolyPhiFace().
|
inline |
Definition at line 97 of file G4ReduciblePolygon.hh.
Referenced by G4PolyPhiFace::G4PolyPhiFace().
| G4double G4ReduciblePolygon::Area | ( | ) |
Calculates signed polygon area, where polygons specified in a clockwise manner have negative area.
Definition at line 531 of file G4ReduciblePolygon.cc.
| G4bool G4ReduciblePolygon::BisectedBy | ( | G4double | a1, |
| G4double | b1, | ||
| G4double | a2, | ||
| G4double | b2, | ||
| G4double | tolerance ) |
Decides if a line through two points crosses the polygon, within tolerance.
Definition at line 489 of file G4ReduciblePolygon.cc.
|
inline |
Definition at line 100 of file G4ReduciblePolygon.hh.
Referenced by G4EnclosingCylinder::G4EnclosingCylinder(), and G4PolyPhiFace::G4PolyPhiFace().
|
inline |
Definition at line 99 of file G4ReduciblePolygon.hh.
Referenced by G4EnclosingCylinder::G4EnclosingCylinder(), and G4PolyPhiFace::G4PolyPhiFace().
Copies contents of provided arrays into simple linear arrays.
Definition at line 148 of file G4ReduciblePolygon.cc.
Returns "true" if the polygon crosses itself.
Definition at line 434 of file G4ReduciblePolygon.cc.
|
inline |
Accessors.
Definition at line 96 of file G4ReduciblePolygon.hh.
Referenced by G4PolyPhiFace::G4PolyPhiFace().
|
delete |
| void G4ReduciblePolygon::Print | ( | ) |
Print function for debugging.
Definition at line 550 of file G4ReduciblePolygon.cc.
Removes adjacent vertices that are equal.
| [in] | tolerance | Provided tolerance for adjacent vertices. |
Definition at line 193 of file G4ReduciblePolygon.cc.
Removes any unneeded vertices, i.e. those vertices which are on the line connecting the previous and next vertices.
| [in] | tolerance | Provided tolerance for parallel line segments. |
Definition at line 252 of file G4ReduciblePolygon.cc.
| void G4ReduciblePolygon::ReverseOrder | ( | ) |
Reverses the order of the vertices.
Definition at line 351 of file G4ReduciblePolygon.cc.
| void G4ReduciblePolygon::ScaleA | ( | G4double | scale | ) |
Methods to multiply all a or b values by a common scale.
Definition at line 164 of file G4ReduciblePolygon.cc.
| void G4ReduciblePolygon::ScaleB | ( | G4double | scale | ) |
Definition at line 178 of file G4ReduciblePolygon.cc.
| void G4ReduciblePolygon::StartWithZMin | ( | ) |
Method is used for G4GenericPolycone; starting always with Zmin=bMin.
Definition at line 404 of file G4ReduciblePolygon.cc.
|
friend |
Definition at line 194 of file G4ReduciblePolygon.hh.
|
friend |
Definition at line 59 of file G4ReduciblePolygon.hh.
Referenced by G4ReduciblePolygonIterator.