Geant4  10.00.p02
UPolyhedraSide Class Reference

#include <UPolyhedraSide.hh>

+ Inheritance diagram for UPolyhedraSide:
+ Collaboration diagram for UPolyhedraSide:

Classes

struct  sUPolyhedraSideEdge
 
struct  sUPolyhedraSideVec
 

Public Member Functions

 UPolyhedraSide (const UPolyhedraSideRZ *prevRZ, const UPolyhedraSideRZ *tail, const UPolyhedraSideRZ *head, const UPolyhedraSideRZ *nextRZ, int numSide, double phiStart, double phiTotal, bool phiIsOpen, bool isAllBehind=false)
 
virtual ~UPolyhedraSide ()
 
 UPolyhedraSide (const UPolyhedraSide &source)
 
UPolyhedraSideoperator= (const UPolyhedraSide &source)
 
bool Distance (const UVector3 &p, const UVector3 &v, bool outgoing, double surfTolerance, double &distance, double &distFromSurface, UVector3 &normal, bool &allBehind)
 
double Safety (const UVector3 &p, bool outgoing)
 
VUSolid::EnumInside Inside (const UVector3 &p, double tolerance, double *bestDistance)
 
UVector3 Normal (const UVector3 &p, double *bestDistance)
 
double Extent (const UVector3 axis)
 
UVCSGfaceClone ()
 
double SurfaceTriangle (UVector3 p1, UVector3 p2, UVector3 p3, UVector3 *p4)
 
UVector3 GetPointOnPlane (UVector3 p0, UVector3 p1, UVector3 p2, UVector3 p3, double *Area)
 
double SurfaceArea ()
 
UVector3 GetPointOnFace ()
 
 UPolyhedraSide (__void__ &)
 
- Public Member Functions inherited from UVCSGface
 UVCSGface ()
 
virtual ~UVCSGface ()
 

Protected Types

typedef struct
UPolyhedraSide::sUPolyhedraSideEdge 
UPolyhedraSideEdge
 
typedef struct
UPolyhedraSide::sUPolyhedraSideVec 
UPolyhedraSideVec
 

Protected Member Functions

bool IntersectSidePlane (const UVector3 &p, const UVector3 &v, const UPolyhedraSideVec &vec, double normSign, double surfTolerance, double &distance, double &distFromSurface)
 
int LineHitsSegments (const UVector3 &p, const UVector3 &v, int *i1, int *i2)
 
int ClosestPhiSegment (double phi)
 
int PhiSegment (double phi)
 
double GetPhi (const UVector3 &p)
 
double DistanceToOneSide (const UVector3 &p, const UPolyhedraSideVec &vec, double *normDist)
 
double DistanceAway (const UVector3 &p, const UPolyhedraSideVec &vec, double *normDist)
 
void CopyStuff (const UPolyhedraSide &source)
 

Protected Attributes

int numSide
 
double r [2]
 
double z [2]
 
double startPhi
 
double deltaPhi
 
double endPhi
 
bool phiIsOpen
 
bool allBehind
 
UIntersectingConecone
 
UPolyhedraSideVecvecs
 
UPolyhedraSideEdgeedges
 
double lenRZ
 
double lenPhi [2]
 
double edgeNorm
 

Private Attributes

std::pair< UVector3, double > fPhi
 
double kCarTolerance
 
double fSurfaceArea
 

Friends

struct sUPolyhedraSideVec
 

Detailed Description

Definition at line 45 of file UPolyhedraSide.hh.

Member Typedef Documentation

Constructor & Destructor Documentation

UPolyhedraSide::UPolyhedraSide ( const UPolyhedraSideRZ prevRZ,
const UPolyhedraSideRZ tail,
const UPolyhedraSideRZ head,
const UPolyhedraSideRZ nextRZ,
int  numSide,
double  phiStart,
double  phiTotal,
bool  phiIsOpen,
bool  isAllBehind = false 
)
UPolyhedraSide::~UPolyhedraSide ( )
virtual

Definition at line 289 of file UPolyhedraSide.cc.

References cone, edges, and vecs.

UPolyhedraSide::UPolyhedraSide ( const UPolyhedraSide source)

Definition at line 300 of file UPolyhedraSide.cc.

References CopyStuff().

+ Here is the call graph for this function:

UPolyhedraSide::UPolyhedraSide ( __void__ &  )

Definition at line 275 of file UPolyhedraSide.cc.

References lenPhi, r, and z.

Member Function Documentation

UVCSGface* UPolyhedraSide::Clone ( )
inlinevirtual

Implements UVCSGface.

Definition at line 76 of file UPolyhedraSide.hh.

References UPolyhedraSide().

+ Here is the call graph for this function:

int UPolyhedraSide::ClosestPhiSegment ( double  phi)
protected

Definition at line 867 of file UPolyhedraSide.cc.

References d1, d2, endPhi, UUtils::kPi, numSide, PhiSegment(), and startPhi.

Referenced by Inside(), Normal(), and Safety().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UPolyhedraSide::CopyStuff ( const UPolyhedraSide source)
protected

Definition at line 327 of file UPolyhedraSide.cc.

References allBehind, cone, deltaPhi, edgeNorm, UPolyhedraSide::sUPolyhedraSideVec::edges, edges, endPhi, fSurfaceArea, kCarTolerance, lenPhi, lenRZ, numSide, phiIsOpen, r, startPhi, vecs, and z.

Referenced by operator=(), and UPolyhedraSide().

+ Here is the caller graph for this function:

bool UPolyhedraSide::Distance ( const UVector3 p,
const UVector3 v,
bool  outgoing,
double  surfTolerance,
double &  distance,
double &  distFromSurface,
UVector3 normal,
bool &  allBehind 
)
virtual
double UPolyhedraSide::DistanceAway ( const UVector3 p,
const UPolyhedraSideVec vec,
double *  normDist 
)
protected

Definition at line 980 of file UPolyhedraSide.cc.

References UPolyhedraSide::sUPolyhedraSideVec::center, UPolyhedraSide::sUPolyhedraSideEdge::corner, UPolyhedraSide::sUPolyhedraSideEdge::cornNorm, UVector3::Dot(), UPolyhedraSide::sUPolyhedraSideVec::edgeNorm, edgeNorm, UPolyhedraSide::sUPolyhedraSideVec::edges, lenPhi, lenRZ, UPolyhedraSide::sUPolyhedraSideEdge::normal, UPolyhedraSide::sUPolyhedraSideVec::surfPhi, and UPolyhedraSide::sUPolyhedraSideVec::surfRZ.

Referenced by DistanceToOneSide(), and Safety().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UPolyhedraSide::DistanceToOneSide ( const UVector3 p,
const UPolyhedraSideVec vec,
double *  normDist 
)
protected

Definition at line 956 of file UPolyhedraSide.cc.

References UPolyhedraSide::sUPolyhedraSideVec::center, DistanceAway(), UVector3::Dot(), and UPolyhedraSide::sUPolyhedraSideVec::normal.

Referenced by Inside(), and Normal().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UPolyhedraSide::Extent ( const UVector3  axis)
virtual

Implements UVCSGface.

Definition at line 640 of file UPolyhedraSide.cc.

References cone, UPolyhedraSide::sUPolyhedraSideEdge::corner, DBL_MIN, UVector3::Dot(), UPolyhedraSide::sUPolyhedraSideVec::edges, GetPhi(), UUtils::kInfinity, numSide, UVector3::Perp2(), PhiSegment(), vecs, UVector3::z, UIntersectingCone::ZHi(), and UIntersectingCone::ZLo().

+ Here is the call graph for this function:

double UPolyhedraSide::GetPhi ( const UVector3 p)
protected

Definition at line 929 of file UPolyhedraSide.cc.

References fPhi, and UVector3::Phi().

Referenced by Extent(), Inside(), Normal(), and Safety().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UVector3 UPolyhedraSide::GetPointOnFace ( )
virtual

Implements UVCSGface.

Definition at line 1207 of file UPolyhedraSide.cc.

References UPolyhedraSide::sUPolyhedraSideEdge::corner, UPolyhedraSide::sUPolyhedraSideVec::edges, GetPointOnPlane(), numSide, UUtils::Random(), and vecs.

+ Here is the call graph for this function:

UVector3 UPolyhedraSide::GetPointOnPlane ( UVector3  p0,
UVector3  p1,
UVector3  p2,
UVector3  p3,
double *  Area 
)

Definition at line 1148 of file UPolyhedraSide.cc.

References UUtils::Random(), and SurfaceTriangle().

Referenced by GetPointOnFace(), and SurfaceArea().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VUSolid::EnumInside UPolyhedraSide::Inside ( const UVector3 p,
double  tolerance,
double *  bestDistance 
)
virtual

Implements UVCSGface.

Definition at line 589 of file UPolyhedraSide.cc.

References ClosestPhiSegment(), DistanceToOneSide(), VUSolid::eInside, VUSolid::eOutside, VUSolid::eSurface, GetPhi(), and vecs.

+ Here is the call graph for this function:

bool UPolyhedraSide::IntersectSidePlane ( const UVector3 p,
const UVector3 v,
const UPolyhedraSideVec vec,
double  normSign,
double  surfTolerance,
double &  distance,
double &  distFromSurface 
)
protected

Definition at line 726 of file UPolyhedraSide.cc.

References UPolyhedraSide::sUPolyhedraSideVec::center, UPolyhedraSide::sUPolyhedraSideEdge::corner, UVector3::Cross(), UVector3::Dot(), UPolyhedraSide::sUPolyhedraSideVec::edges, lenRZ, UPolyhedraSide::sUPolyhedraSideVec::normal, r, and UPolyhedraSide::sUPolyhedraSideVec::surfRZ.

+ Here is the call graph for this function:

int UPolyhedraSide::LineHitsSegments ( const UVector3 p,
const UVector3 v,
int *  i1,
int *  i2 
)
protected

Definition at line 821 of file UPolyhedraSide.cc.

References cone, UIntersectingCone::LineHitsCone(), n, PhiSegment(), UVector3::x, and UVector3::y.

+ Here is the call graph for this function:

UVector3 UPolyhedraSide::Normal ( const UVector3 p,
double *  bestDistance 
)
virtual

Implements UVCSGface.

Definition at line 619 of file UPolyhedraSide.cc.

References ClosestPhiSegment(), DistanceToOneSide(), GetPhi(), UPolyhedraSide::sUPolyhedraSideVec::normal, and vecs.

+ Here is the call graph for this function:

UPolyhedraSide & UPolyhedraSide::operator= ( const UPolyhedraSide source)

Definition at line 310 of file UPolyhedraSide.cc.

References cone, CopyStuff(), edges, and vecs.

+ Here is the call graph for this function:

int UPolyhedraSide::PhiSegment ( double  phi)
protected

Definition at line 895 of file UPolyhedraSide.cc.

References deltaPhi, UUtils::kPi, numSide, phiIsOpen, and startPhi.

Referenced by ClosestPhiSegment(), Distance(), Extent(), and LineHitsSegments().

+ Here is the caller graph for this function:

double UPolyhedraSide::Safety ( const UVector3 p,
bool  outgoing 
)
virtual

Implements UVCSGface.

Definition at line 556 of file UPolyhedraSide.cc.

References UPolyhedraSide::sUPolyhedraSideVec::center, ClosestPhiSegment(), DistanceAway(), UVector3::Dot(), GetPhi(), UUtils::kInfinity, CLHEP::normal(), VUSolid::Tolerance(), and vecs.

+ Here is the call graph for this function:

double UPolyhedraSide::SurfaceArea ( )
virtual

Implements UVCSGface.

Definition at line 1171 of file UPolyhedraSide.cc.

References UPolyhedraSide::sUPolyhedraSideEdge::corner, UPolyhedraSide::sUPolyhedraSideVec::edges, fSurfaceArea, GetPointOnPlane(), numSide, and vecs.

+ Here is the call graph for this function:

double UPolyhedraSide::SurfaceTriangle ( UVector3  p1,
UVector3  p2,
UVector3  p3,
UVector3 p4 
)

Definition at line 1125 of file UPolyhedraSide.cc.

References UUtils::Random().

Referenced by GetPointOnPlane().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend struct sUPolyhedraSideVec
friend

Definition at line 107 of file UPolyhedraSide.hh.

Member Data Documentation

bool UPolyhedraSide::allBehind
protected

Definition at line 163 of file UPolyhedraSide.hh.

Referenced by CopyStuff(), Distance(), and UPolyhedraSide().

UIntersectingCone* UPolyhedraSide::cone
protected
double UPolyhedraSide::deltaPhi
protected

Definition at line 159 of file UPolyhedraSide.hh.

Referenced by CopyStuff(), PhiSegment(), and UPolyhedraSide().

double UPolyhedraSide::edgeNorm
protected

Definition at line 171 of file UPolyhedraSide.hh.

Referenced by CopyStuff(), DistanceAway(), and UPolyhedraSide().

UPolyhedraSideEdge* UPolyhedraSide::edges
protected

Definition at line 168 of file UPolyhedraSide.hh.

Referenced by CopyStuff(), operator=(), UPolyhedraSide(), and ~UPolyhedraSide().

double UPolyhedraSide::endPhi
protected

Definition at line 159 of file UPolyhedraSide.hh.

Referenced by ClosestPhiSegment(), CopyStuff(), and UPolyhedraSide().

std::pair<UVector3, double> UPolyhedraSide::fPhi
private

Definition at line 175 of file UPolyhedraSide.hh.

Referenced by GetPhi(), and UPolyhedraSide().

double UPolyhedraSide::fSurfaceArea
private

Definition at line 177 of file UPolyhedraSide.hh.

Referenced by CopyStuff(), SurfaceArea(), and UPolyhedraSide().

double UPolyhedraSide::kCarTolerance
private

Definition at line 176 of file UPolyhedraSide.hh.

Referenced by CopyStuff(), and UPolyhedraSide().

double UPolyhedraSide::lenPhi[2]
protected

Definition at line 169 of file UPolyhedraSide.hh.

Referenced by CopyStuff(), Distance(), DistanceAway(), and UPolyhedraSide().

double UPolyhedraSide::lenRZ
protected
int UPolyhedraSide::numSide
protected
bool UPolyhedraSide::phiIsOpen
protected

Definition at line 162 of file UPolyhedraSide.hh.

Referenced by CopyStuff(), PhiSegment(), and UPolyhedraSide().

double UPolyhedraSide::r[2]
protected

Definition at line 158 of file UPolyhedraSide.hh.

Referenced by CopyStuff(), Distance(), IntersectSidePlane(), and UPolyhedraSide().

double UPolyhedraSide::startPhi
protected

Definition at line 159 of file UPolyhedraSide.hh.

Referenced by ClosestPhiSegment(), CopyStuff(), PhiSegment(), and UPolyhedraSide().

double UPolyhedraSide::z[2]
protected

Definition at line 158 of file UPolyhedraSide.hh.

Referenced by CopyStuff(), and UPolyhedraSide().


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