|
Geant4
10.01
|
#include <UGenericTrap.hh>
Inheritance diagram for UGenericTrap:
Collaboration diagram for UGenericTrap:Public Member Functions | |
| UGenericTrap (const std::string &name, double halfZ, const std::vector< UVector2 > &vertices) | |
| ~UGenericTrap () | |
| double | GetZHalfLength () const |
| void | SetZHalfLength (double) |
| int | GetNofVertices () const |
| UVector2 | GetVertex (int index) const |
| const std::vector< UVector2 > & | GetVertices () const |
| double | GetTwistAngle (int index) const |
| bool | IsTwisted () const |
| int | GetVisSubdivisions () const |
| void | SetVisSubdivisions (int subdiv) |
| EnumInside | Inside (const UVector3 &aPoint) const |
| bool | Normal (const UVector3 &aPoint, UVector3 &aNormal) const |
| double | SafetyFromInside (const UVector3 &aPoint, bool aAccurate=false) const |
| double | SafetyFromOutside (const UVector3 &aPoint, bool aAccurate=false) const |
| double | DistanceToIn (const UVector3 &aPoint, const UVector3 &aDirection, double aPstep=UUtils::kInfinity) const |
| double | DistanceToOut (const UVector3 &aPoint, const UVector3 &aDirection, UVector3 &aNormalVector, bool &aConvex, double aPstep=UUtils::kInfinity) const |
| void | Extent (UVector3 &aMin, UVector3 &aMax) const |
| double | Capacity () |
| double | SurfaceArea () |
| VUSolid * | Clone () const |
| UGeometryType | GetEntityType () const |
| void | ComputeBBox (UBBox *, bool) |
| void | GetParametersList (int, double *) const |
| UVector3 | GetPointOnSurface () const |
| std::ostream & | StreamInfo (std::ostream &os) const |
| UGenericTrap () | |
| UGenericTrap (const UGenericTrap &rhs) | |
| UGenericTrap & | operator= (const UGenericTrap &rhs) |
| void | Initialise (const std::vector< UVector2 > &vertices) |
| UVector3 | GetMinimumBBox () const |
| UVector3 | GetMaximumBBox () const |
Public Member Functions inherited from VUSolid | |
| VUSolid () | |
| VUSolid (const std::string &name) | |
| virtual | ~VUSolid () |
| double | GetCarTolerance () const |
| double | GetRadTolerance () const |
| double | GetAngTolerance () const |
| void | SetCarTolerance (double eps) |
| void | SetRadTolerance (double eps) |
| void | SetAngTolerance (double eps) |
| virtual void | ExtentAxis (EAxisType aAxis, double &aMin, double &aMax) const |
| const std::string & | GetName () const |
| void | SetName (const std::string &aName) |
| virtual void | SamplePointsInside (int, UVector3 *) const |
| virtual void | SamplePointsOnSurface (int, UVector3 *) const |
| virtual void | SamplePointsOnEdge (int, UVector3 *) const |
| double | EstimateCubicVolume (int nStat, double epsilon) const |
| double | EstimateSurfaceArea (int nStat, double ell) const |
Private Types | |
| enum | ESide { kUndefined, kXY0, kXY1, kXY2, kXY3, kMZ, kPZ } |
Private Member Functions | |
| void | SetTwistAngle (int index, double twist) |
| bool | ComputeIsTwisted () |
| bool | CheckOrder (const std::vector< UVector2 > &vertices) const |
| bool | IsSegCrossing (const UVector2 &a, const UVector2 &b, const UVector2 &c, const UVector2 &d) const |
| bool | IsSegCrossingZ (const UVector2 &a, const UVector2 &b, const UVector2 &c, const UVector2 &d) const |
| bool | IsSameLineSegment (const UVector2 &p, const UVector2 &l1, const UVector2 &l2) const |
| bool | IsSameLine (const UVector2 &p, const UVector2 &l1, const UVector2 &l2) const |
| void | ReorderVertices (std::vector< UVector3 > &vertices) const |
| void | ComputeBBox () |
| VUFacet * | MakeDownFacet (const std::vector< UVector3 > &fromVertices, int ind1, int ind2, int ind3) const |
| VUFacet * | MakeUpFacet (const std::vector< UVector3 > &fromVertices, int ind1, int ind2, int ind3) const |
| VUFacet * | MakeSideFacet (const UVector3 &downVertex0, const UVector3 &downVertex1, const UVector3 &upVertex1, const UVector3 &upVertex0) const |
| UTessellatedSolid * | CreateTessellatedSolid () const |
| EnumInside | InsidePolygone (const UVector3 &p, const UVector2 *poly) const |
| double | DistToPlane (const UVector3 &p, const UVector3 &v, const int ipl) const |
| double | DistToTriangle (const UVector3 &p, const UVector3 &v, const int ipl) const |
| UVector3 | NormalToPlane (const UVector3 &p, const int ipl) const |
| double | SafetyToFace (const UVector3 &p, const int iseg) const |
| double | GetFaceSurfaceArea (const UVector3 &p0, const UVector3 &p1, const UVector3 &p2, const UVector3 &p3) const |
Private Attributes | |
| double | fDz |
| std::vector< UVector2 > | fVertices |
| bool | fIsTwisted |
| double | fTwist [4] |
| UTessellatedSolid * | fTessellatedSolid |
| UVector3 | fMinBBoxVector |
| UVector3 | fMaxBBoxVector |
| int | fVisSubdivisions |
| UBox * | fBoundBox |
| double | fSurfaceArea |
| double | fCubicVolume |
Static Private Attributes | |
| static const int | fgkNofVertices = 8 |
| static const double | fgkTolerance = 1E-3 |
Additional Inherited Members | |
Public Types inherited from VUSolid | |
| enum | EnumInside { eInside =0, eSurface =1, eOutside =2 } |
| enum | EAxisType { eXaxis =0, eYaxis =1, eZaxis =2 } |
Static Public Member Functions inherited from VUSolid | |
| static double | Tolerance () |
Static Protected Attributes inherited from VUSolid | |
| static double | fgTolerance = 1.0E-9 |
| static double | frTolerance = 1.0E-9 |
| static double | faTolerance = 1.0E-9 |
Definition at line 62 of file UGenericTrap.hh.
|
private |
| Enumerator | |
|---|---|
| kUndefined | |
| kXY0 | |
| kXY1 | |
| kXY2 | |
| kXY3 | |
| kMZ | |
| kPZ | |
Definition at line 191 of file UGenericTrap.hh.
| UGenericTrap::UGenericTrap | ( | const std::string & | name, |
| double | halfZ, | ||
| const std::vector< UVector2 > & | vertices | ||
| ) |
Definition at line 35 of file UGenericTrap.cc.
References Initialise().
Here is the call graph for this function:| UGenericTrap::~UGenericTrap | ( | ) |
Definition at line 75 of file UGenericTrap.cc.
References fBoundBox, and fTessellatedSolid.
| UGenericTrap::UGenericTrap | ( | ) |
Definition at line 56 of file UGenericTrap.cc.
Referenced by Clone().
Here is the caller graph for this function:| UGenericTrap::UGenericTrap | ( | const UGenericTrap & | rhs | ) |
Definition at line 84 of file UGenericTrap.cc.
References ComputeBBox(), CreateTessellatedSolid(), fIsTwisted, fTessellatedSolid, and fTwist.
Here is the call graph for this function:
|
virtual |
Implements VUSolid.
Definition at line 1562 of file UGenericTrap.cc.
References VUSolid::Capacity(), and fCubicVolume.
Here is the call graph for this function:
|
private |
Definition at line 1710 of file UGenericTrap.cc.
References UUtils::Exception(), FatalError, fgkTolerance, VUSolid::GetName(), IsSegCrossing(), IsSegCrossingZ(), and Warning.
Referenced by Initialise().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Implements VUSolid.
Definition at line 1429 of file UGenericTrap.cc.
References UGenericTrap().
Here is the call graph for this function:
|
inlinevirtual |
Implements VUSolid.
Definition at line 108 of file UGenericTrap.hh.
|
private |
Definition at line 2166 of file UGenericTrap.cc.
References fBoundBox, fDz, fgkNofVertices, fMaxBBoxVector, fMinBBoxVector, fVertices, and G4INCL::Math::max().
Referenced by Initialise(), operator=(), and UGenericTrap().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1653 of file UGenericTrap.cc.
References UUtils::Exception(), fgkNofVertices, fgkTolerance, VUSolid::fgTolerance, fVertices, VUSolid::GetName(), UUtils::kPi, SetTwistAngle(), and Warning.
Referenced by Initialise().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 2090 of file UGenericTrap.cc.
References UTessellatedSolid::AddFacet(), fDz, fgkNofVertices, fVertices, VUSolid::GetName(), MakeDownFacet(), MakeSideFacet(), MakeUpFacet(), ReorderVertices(), UTessellatedSolid::SetSolidClosed(), and UVector3::z.
Referenced by Initialise(), operator=(), and UGenericTrap().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Implements VUSolid.
Definition at line 870 of file UGenericTrap.cc.
References UBox::DistanceToIn(), UTessellatedSolid::DistanceToIn(), DistToPlane(), UVector3::Dot(), VUSolid::eOutside, fBoundBox, fDz, VUSolid::fgTolerance, fTessellatedSolid, Inside(), UUtils::kInfinity, n, and UVector3::z.
Here is the call graph for this function:
|
virtual |
Implements VUSolid.
Definition at line 1075 of file UGenericTrap.cc.
References a, DistToTriangle(), UVector3::Dot(), VUSolid::eOutside, UUtils::Exception(), fDz, VUSolid::fgTolerance, fTessellatedSolid, fVertices, InsidePolygone(), UUtils::kInfinity, kMZ, kPZ, kUndefined, kXY0, kXY1, kXY2, kXY3, NormalToPlane(), UVector3::Set(), Warning, UVector3::x, UVector3::y, and UVector3::z.
Here is the call graph for this function:
|
private |
Definition at line 656 of file UGenericTrap.cc.
References a, UVector3::Dot(), VUSolid::eOutside, fDz, VUSolid::fgTolerance, fVertices, Inside(), UUtils::kInfinity, NormalToPlane(), UVector3::x, UVector3::y, and UVector3::z.
Referenced by DistanceToIn().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1016 of file UGenericTrap.cc.
References a, UVector3::Dot(), VUSolid::eSurface, fDz, VUSolid::fgTolerance, fVertices, Inside(), UUtils::kInfinity, NormalToPlane(), UVector3::x, UVector3::y, and UVector3::z.
Referenced by DistanceToOut().
Here is the call graph for this function:
Here is the caller graph for this function:Implements VUSolid.
Definition at line 1409 of file UGenericTrap.cc.
References fTessellatedSolid, GetMaximumBBox(), and GetMinimumBBox().
Here is the call graph for this function:
|
inlinevirtual |
Implements VUSolid.
Definition at line 107 of file UGenericTrap.hh.
Referenced by StreamInfo().
Here is the caller graph for this function:
|
private |
Definition at line 1627 of file UGenericTrap.cc.
References UVector3::Cross(), UVector3::Mag(), and CLHEP::normal().
Referenced by GetPointOnSurface(), and SurfaceArea().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Referenced by G4UGenericTrap::CreatePolyhedron(), and Extent().
Here is the caller graph for this function:
|
inline |
Referenced by G4UGenericTrap::CreatePolyhedron(), and Extent().
Here is the caller graph for this function:
|
inline |
|
inlinevirtual |
Implements VUSolid.
Definition at line 109 of file UGenericTrap.hh.
|
virtual |
Implements VUSolid.
Definition at line 1459 of file UGenericTrap.cc.
References fDz, fTessellatedSolid, fVertices, GetFaceSurfaceArea(), UUtils::Random(), UVector2::x, and UVector2::y.
Here is the call graph for this function:
|
inline |
Referenced by G4UGenericTrap::GetTwistAngle(), Normal(), and NormalToPlane().
Here is the caller graph for this function:
|
inline |
|
inline |
|
inline |
|
inline |
| void UGenericTrap::Initialise | ( | const std::vector< UVector2 > & | vertices | ) |
Definition at line 131 of file UGenericTrap.cc.
References CheckOrder(), ComputeBBox(), ComputeIsTwisted(), CreateTessellatedSolid(), UUtils::Exception(), FatalErrorInArguments, fDz, fgkNofVertices, VUSolid::fgTolerance, fIsTwisted, fTessellatedSolid, fTwist, fVertices, VUSolid::GetName(), and Warning.
Referenced by G4UGenericTrap::G4UGenericTrap(), and UGenericTrap().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Implements VUSolid.
Definition at line 357 of file UGenericTrap.cc.
References VUSolid::eInside, VUSolid::eOutside, VUSolid::eSurface, fBoundBox, fDz, VUSolid::fgTolerance, fTessellatedSolid, fVertices, UBox::Inside(), UTessellatedSolid::Inside(), InsidePolygone(), and UVector3::z.
Referenced by DistanceToIn(), DistToPlane(), DistToTriangle(), and Normal().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 225 of file UGenericTrap.cc.
References VUSolid::eInside, VUSolid::eOutside, VUSolid::eSurface, VUSolid::fgTolerance, UVector3::x, UVector2::x, UVector3::y, and UVector2::y.
Referenced by DistanceToOut(), and Inside().
Here is the caller graph for this function:
|
private |
Definition at line 309 of file UGenericTrap.cc.
References VUSolid::fgTolerance, UVector2::x, and UVector2::y.
Referenced by IsSameLineSegment().
Here is the caller graph for this function:
|
private |
Definition at line 338 of file UGenericTrap.cc.
References VUSolid::fgTolerance, IsSameLine(), G4INCL::Math::max(), G4INCL::Math::min(), UVector2::x, and UVector2::y.
Here is the call graph for this function:
|
private |
Definition at line 1806 of file UGenericTrap.cc.
References a, a1, a2, b1, b2, fgkTolerance, UVector2::x, and UVector2::y.
Referenced by CheckOrder().
Here is the caller graph for this function:
|
private |
Definition at line 1917 of file UGenericTrap.cc.
References UVector3::Cross(), UVector3::Dot(), fDz, VUSolid::fgTolerance, UVector3::Mag(), UVector3::x, UVector2::x, UVector3::y, UVector2::y, and UVector3::z.
Referenced by CheckOrder().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
|
private |
Definition at line 1982 of file UGenericTrap.cc.
References UUtils::Exception(), FatalError, VUSolid::GetName(), UABSOLUTE, and UVector3::z.
Referenced by CreateTessellatedSolid().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 2061 of file UGenericTrap.cc.
References UABSOLUTE.
Referenced by CreateTessellatedSolid().
Here is the caller graph for this function:
|
private |
Definition at line 2021 of file UGenericTrap.cc.
References UUtils::Exception(), FatalError, VUSolid::GetName(), UABSOLUTE, and UVector3::z.
Referenced by CreateTessellatedSolid().
Here is the call graph for this function:
Here is the caller graph for this function:Implements VUSolid.
Definition at line 398 of file UGenericTrap.cc.
References UVector3::Cross(), VUSolid::eSurface, UUtils::Exception(), fDz, VUSolid::fgTolerance, fIsTwisted, fTessellatedSolid, fVertices, GetTwistAngle(), Inside(), UVector3::Unit(), Warning, and UVector3::z.
Here is the call graph for this function:Definition at line 557 of file UGenericTrap.cc.
References UVector3::Cross(), fDz, VUSolid::fgTolerance, fIsTwisted, fTessellatedSolid, fVertices, GetTwistAngle(), UVector3::Unit(), UVector2::x, UVector2::y, and UVector3::z.
Referenced by DistanceToOut(), DistToPlane(), DistToTriangle(), and SafetyToFace().
Here is the call graph for this function:
Here is the caller graph for this function:| UGenericTrap & UGenericTrap::operator= | ( | const UGenericTrap & | rhs | ) |
Definition at line 102 of file UGenericTrap.cc.
References ComputeBBox(), CreateTessellatedSolid(), fBoundBox, fCubicVolume, fDz, fIsTwisted, fMaxBBoxVector, fMinBBoxVector, fSurfaceArea, fTessellatedSolid, fTwist, fVertices, and fVisSubdivisions.
Here is the call graph for this function:
|
private |
Definition at line 1791 of file UGenericTrap.cc.
Referenced by CreateTessellatedSolid().
Here is the caller graph for this function:
|
virtual |
Implements VUSolid.
Definition at line 1377 of file UGenericTrap.cc.
References UTessellatedSolid::DistanceToOut(), fDz, fTessellatedSolid, SafetyToFace(), and UVector3::z.
Here is the call graph for this function:
|
virtual |
Implements VUSolid.
Definition at line 961 of file UGenericTrap.cc.
References UTessellatedSolid::DistanceToIn(), fBoundBox, fDz, fTessellatedSolid, UBox::SafetyFromOutside(), SafetyToFace(), and UVector3::z.
Here is the call graph for this function:
|
private |
Definition at line 997 of file UGenericTrap.cc.
References fDz, fVertices, and NormalToPlane().
Referenced by SafetyFromInside(), and SafetyFromOutside().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
|
inline |
|
inline |
|
virtual |
Implements VUSolid.
Definition at line 1436 of file UGenericTrap.cc.
References fDz, fgkNofVertices, fVertices, GetEntityType(), and VUSolid::GetName().
Here is the call graph for this function:
|
virtual |
Implements VUSolid.
Definition at line 1577 of file UGenericTrap.cc.
References fDz, fIsTwisted, fSurfaceArea, fVertices, GetFaceSurfaceArea(), and VUSolid::SurfaceArea().
Here is the call graph for this function:
|
private |
Definition at line 189 of file UGenericTrap.hh.
Referenced by ComputeBBox(), DistanceToIn(), Inside(), operator=(), SafetyFromOutside(), and ~UGenericTrap().
|
private |
Definition at line 195 of file UGenericTrap.hh.
Referenced by Capacity(), and operator=().
|
private |
Definition at line 181 of file UGenericTrap.hh.
Referenced by ComputeBBox(), CreateTessellatedSolid(), DistanceToIn(), DistanceToOut(), DistToPlane(), DistToTriangle(), GetPointOnSurface(), Initialise(), Inside(), IsSegCrossingZ(), Normal(), NormalToPlane(), operator=(), SafetyFromInside(), SafetyFromOutside(), SafetyToFace(), StreamInfo(), and SurfaceArea().
|
staticprivate |
Definition at line 176 of file UGenericTrap.hh.
Referenced by ComputeBBox(), ComputeIsTwisted(), CreateTessellatedSolid(), Initialise(), and StreamInfo().
|
staticprivate |
Definition at line 177 of file UGenericTrap.hh.
Referenced by CheckOrder(), ComputeIsTwisted(), and IsSegCrossing().
|
private |
Definition at line 183 of file UGenericTrap.hh.
Referenced by Initialise(), Normal(), NormalToPlane(), operator=(), SurfaceArea(), and UGenericTrap().
|
private |
Definition at line 187 of file UGenericTrap.hh.
Referenced by ComputeBBox(), and operator=().
|
private |
Definition at line 186 of file UGenericTrap.hh.
Referenced by ComputeBBox(), and operator=().
|
private |
Definition at line 194 of file UGenericTrap.hh.
Referenced by operator=(), and SurfaceArea().
|
private |
Definition at line 185 of file UGenericTrap.hh.
Referenced by DistanceToIn(), DistanceToOut(), Extent(), GetPointOnSurface(), Initialise(), Inside(), Normal(), NormalToPlane(), operator=(), SafetyFromInside(), SafetyFromOutside(), UGenericTrap(), and ~UGenericTrap().
|
private |
Definition at line 184 of file UGenericTrap.hh.
Referenced by Initialise(), operator=(), and UGenericTrap().
|
private |
Definition at line 182 of file UGenericTrap.hh.
Referenced by ComputeBBox(), ComputeIsTwisted(), CreateTessellatedSolid(), DistanceToOut(), DistToPlane(), DistToTriangle(), GetPointOnSurface(), Initialise(), Inside(), Normal(), NormalToPlane(), operator=(), SafetyToFace(), StreamInfo(), and SurfaceArea().
|
private |
Definition at line 188 of file UGenericTrap.hh.
Referenced by operator=().