Geant4  10.01.p02
UTriangularFacet Class Reference

#include <UTriangularFacet.hh>

+ Inheritance diagram for UTriangularFacet:
+ Collaboration diagram for UTriangularFacet:

Public Member Functions

 UTriangularFacet (const UVector3 &vt0, const UVector3 &vt1, const UVector3 &vt2, UFacetVertexType)
 
 UTriangularFacet ()
 
 ~UTriangularFacet ()
 
 UTriangularFacet (const UTriangularFacet &right)
 
UTriangularFacetoperator= (const UTriangularFacet &right)
 
VUFacetGetClone ()
 
UTriangularFacetGetFlippedFacet ()
 
UVector3 Distance (const UVector3 &p)
 
double Distance (const UVector3 &p, const double minDist)
 
double Distance (const UVector3 &p, const double minDist, const bool outgoing)
 
double Extent (const UVector3 axis)
 
bool Intersect (const UVector3 &p, const UVector3 &v, const bool outgoing, double &distance, double &distFromSurface, UVector3 &normal)
 
double GetArea ()
 
UVector3 GetPointOnFace () const
 
UVector3 GetSurfaceNormal () const
 
bool IsDefined () const
 
UGeometryType GetEntityType () const
 
int GetNumberOfVertices () const
 
UVector3 GetVertex (int i) const
 
void SetVertex (int i, const UVector3 &val)
 
UVector3 GetCircumcentre () const
 
double GetRadius () const
 
void SetSurfaceNormal (UVector3 normal)
 
int AllocatedMemory ()
 
int GetVertexIndex (int i) const
 
void SetVertexIndex (int i, int j)
 
void SetVertices (std::vector< UVector3 > *v)
 
- Public Member Functions inherited from VUFacet
virtual ~VUFacet ()
 
bool operator== (const VUFacet &right) const
 
void ApplyTranslation (const UVector3 v)
 
std::ostream & StreamInfo (std::ostream &os) const
 
bool IsInside (const UVector3 &p) const
 

Private Member Functions

void CopyFrom (const UTriangularFacet &rhs)
 

Private Attributes

UVector3 fSurfaceNormal
 
double fArea
 
UVector3 fCircumcentre
 
double fRadius
 
int fIndices [3]
 
std::vector< UVector3 > * fVertices
 
double fA
 
double fB
 
double fC
 
double fDet
 
double fSqrDist
 
UVector3 fE1
 
UVector3 fE2
 
bool fIsDefined
 

Additional Inherited Members

- Static Protected Attributes inherited from VUFacet
static const double dirTolerance = 1.0E-14
 
static const double kCarTolerance = VUSolid::Tolerance()
 

Detailed Description

Definition at line 42 of file UTriangularFacet.hh.

Constructor & Destructor Documentation

UTriangularFacet::UTriangularFacet ( const UVector3 vt0,
const UVector3 vt1,
const UVector3 vt2,
UFacetVertexType  vertexType 
)

Definition at line 35 of file UTriangularFacet.cc.

References UVector3::Cross(), UVector3::Dot(), UUtils::Exception(), fA, fArea, fB, fC, fCircumcentre, fDet, fE1, fE2, fIndices, fIsDefined, fRadius, fSurfaceNormal, fVertices, GetVertex(), VUFacet::kCarTolerance, UVector3::Mag(), UVector3::Mag2(), p0, UVector3::Set(), SetVertex(), UABSOLUTE, UVector3::Unit(), and UWarning.

+ Here is the call graph for this function:

UTriangularFacet::UTriangularFacet ( )

Definition at line 123 of file UTriangularFacet.cc.

References fA, fArea, fB, fC, fDet, fE1, fE2, fIndices, fIsDefined, fRadius, fSurfaceNormal, fVertices, UVector3::Set(), and SetVertex().

Referenced by GetClone(), and GetFlippedFacet().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UTriangularFacet::~UTriangularFacet ( )

Definition at line 141 of file UTriangularFacet.cc.

References SetVertices().

+ Here is the call graph for this function:

UTriangularFacet::UTriangularFacet ( const UTriangularFacet right)

Definition at line 168 of file UTriangularFacet.cc.

References CopyFrom().

+ Here is the call graph for this function:

Member Function Documentation

int UTriangularFacet::AllocatedMemory ( )
inlinevirtual

Implements VUFacet.

Definition at line 105 of file UTriangularFacet.hh.

Referenced by UQuadrangularFacet::AllocatedMemory().

+ Here is the caller graph for this function:

void UTriangularFacet::CopyFrom ( const UTriangularFacet rhs)
private

Definition at line 147 of file UTriangularFacet.cc.

References copy(), fA, fArea, fB, fC, fDet, fE1, fE2, fIndices, fIsDefined, fRadius, fSqrDist, fSurfaceNormal, and fVertices.

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UVector3 UTriangularFacet::Distance ( const UVector3 p)

Definition at line 222 of file UTriangularFacet.cc.

References UVector3::Dot(), fA, fB, fC, fDet, fE1, fE2, fSqrDist, GetVertex(), and UVector3::Mag2().

Referenced by UQuadrangularFacet::Distance(), and Distance().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UTriangularFacet::Distance ( const UVector3 p,
const double  minDist 
)
virtual

Implements VUFacet.

Definition at line 488 of file UTriangularFacet.cc.

References Distance(), fCircumcentre, fRadius, UUtils::kInfinity, and UVector3::Mag().

+ Here is the call graph for this function:

double UTriangularFacet::Distance ( const UVector3 p,
const double  minDist,
const bool  outgoing 
)
virtual

Implements VUFacet.

Definition at line 523 of file UTriangularFacet.cc.

References Distance(), UVector3::Dot(), fCircumcentre, fRadius, fSqrDist, fSurfaceNormal, VUFacet::kCarTolerance, and UUtils::kInfinity.

+ Here is the call graph for this function:

double UTriangularFacet::Extent ( const UVector3  axis)
virtual

Implements VUFacet.

Definition at line 562 of file UTriangularFacet.cc.

References UVector3::Dot(), GetVertex(), and G4InuclParticleNames::sp.

+ Here is the call graph for this function:

double UTriangularFacet::GetArea ( )
virtual

Implements VUFacet.

Definition at line 827 of file UTriangularFacet.cc.

References fArea.

Referenced by UQuadrangularFacet::GetArea().

+ Here is the caller graph for this function:

UVector3 UTriangularFacet::GetCircumcentre ( ) const
inlinevirtual

Implements VUFacet.

Definition at line 93 of file UTriangularFacet.hh.

References fCircumcentre.

VUFacet * UTriangularFacet::GetClone ( )
virtual

Implements VUFacet.

Definition at line 189 of file UTriangularFacet.cc.

References GetVertex(), UABSOLUTE, and UTriangularFacet().

+ Here is the call graph for this function:

UGeometryType UTriangularFacet::GetEntityType ( ) const
virtual

Implements VUFacet.

Definition at line 832 of file UTriangularFacet.cc.

UTriangularFacet * UTriangularFacet::GetFlippedFacet ( )

Definition at line 202 of file UTriangularFacet.cc.

References GetVertex(), UABSOLUTE, and UTriangularFacet().

+ Here is the call graph for this function:

int UTriangularFacet::GetNumberOfVertices ( ) const
inlinevirtual

Implements VUFacet.

Definition at line 77 of file UTriangularFacet.hh.

UVector3 UTriangularFacet::GetPointOnFace ( ) const
virtual

Implements VUFacet.

Definition at line 811 of file UTriangularFacet.cc.

References alpha, fE1, fE2, GetVertex(), and UUtils::Random().

Referenced by UQuadrangularFacet::GetPointOnFace().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UTriangularFacet::GetRadius ( ) const
inlinevirtual

Implements VUFacet.

Definition at line 98 of file UTriangularFacet.hh.

References fRadius.

UVector3 UTriangularFacet::GetSurfaceNormal ( ) const
virtual

Implements VUFacet.

Definition at line 837 of file UTriangularFacet.cc.

References fSurfaceNormal.

Referenced by UQuadrangularFacet::GetSurfaceNormal(), and UQuadrangularFacet::UQuadrangularFacet().

+ Here is the caller graph for this function:

UVector3 UTriangularFacet::GetVertex ( int  i) const
inlinevirtual

Implements VUFacet.

Definition at line 82 of file UTriangularFacet.hh.

References fIndices.

Referenced by Distance(), Extent(), GetClone(), GetFlippedFacet(), GetPointOnFace(), UQuadrangularFacet::GetVertex(), Intersect(), and UTriangularFacet().

+ Here is the caller graph for this function:

int UTriangularFacet::GetVertexIndex ( int  i) const
inlinevirtual

Implements VUFacet.

Definition at line 114 of file UTriangularFacet.hh.

References fIndices.

Referenced by UQuadrangularFacet::GetVertexIndex().

+ Here is the caller graph for this function:

bool UTriangularFacet::Intersect ( const UVector3 p,
const UVector3 v,
const bool  outgoing,
double &  distance,
double &  distFromSurface,
UVector3 normal 
)
virtual

Implements VUFacet.

Definition at line 599 of file UTriangularFacet.cc.

References UVector3::Cross(), DBL_EPSILON, VUFacet::dirTolerance, UVector3::Dot(), fA, fB, fC, fDet, fE1, fE2, fSqrDist, fSurfaceNormal, GetVertex(), UTessellatedGeometryAlgorithms::IntersectLineAndTriangle2D(), VUFacet::kCarTolerance, UUtils::kInfinity, UVector2::mag(), UVector3::Mag(), p0, G4InuclParticleNames::pp, G4InuclParticleNames::s0, UVector3::Set(), and UVector3::Unit().

Referenced by UQuadrangularFacet::Intersect().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool UTriangularFacet::IsDefined ( ) const
inlinevirtual

Implements VUFacet.

Definition at line 70 of file UTriangularFacet.hh.

References fIsDefined.

Referenced by UQuadrangularFacet::IsDefined().

+ Here is the caller graph for this function:

UTriangularFacet & UTriangularFacet::operator= ( const UTriangularFacet right)

Definition at line 173 of file UTriangularFacet.cc.

References CopyFrom(), and SetVertices().

+ Here is the call graph for this function:

void UTriangularFacet::SetSurfaceNormal ( UVector3  normal)

Definition at line 842 of file UTriangularFacet.cc.

References fSurfaceNormal, and CLHEP::normal().

+ Here is the call graph for this function:

void UTriangularFacet::SetVertex ( int  i,
const UVector3 val 
)
inlinevirtual

Implements VUFacet.

Definition at line 88 of file UTriangularFacet.hh.

Referenced by UQuadrangularFacet::SetVertex(), and UTriangularFacet().

+ Here is the caller graph for this function:

void UTriangularFacet::SetVertexIndex ( int  i,
int  j 
)
inlinevirtual

Implements VUFacet.

Definition at line 119 of file UTriangularFacet.hh.

References fIndices.

Referenced by UQuadrangularFacet::SetVertexIndex().

+ Here is the caller graph for this function:

void UTriangularFacet::SetVertices ( std::vector< UVector3 > *  v)
inlinevirtual

Implements VUFacet.

Definition at line 124 of file UTriangularFacet.hh.

References fIndices, and fVertices.

Referenced by operator=(), UQuadrangularFacet::SetVertices(), and ~UTriangularFacet().

+ Here is the caller graph for this function:

Member Data Documentation

double UTriangularFacet::fA
private

Definition at line 144 of file UTriangularFacet.hh.

Referenced by CopyFrom(), Distance(), Intersect(), and UTriangularFacet().

double UTriangularFacet::fArea
private

Definition at line 133 of file UTriangularFacet.hh.

Referenced by CopyFrom(), GetArea(), and UTriangularFacet().

double UTriangularFacet::fB
private

Definition at line 144 of file UTriangularFacet.hh.

Referenced by CopyFrom(), Distance(), Intersect(), and UTriangularFacet().

double UTriangularFacet::fC
private

Definition at line 144 of file UTriangularFacet.hh.

Referenced by CopyFrom(), Distance(), Intersect(), and UTriangularFacet().

UVector3 UTriangularFacet::fCircumcentre
private

Definition at line 134 of file UTriangularFacet.hh.

Referenced by Distance(), GetCircumcentre(), and UTriangularFacet().

double UTriangularFacet::fDet
private

Definition at line 145 of file UTriangularFacet.hh.

Referenced by CopyFrom(), Distance(), Intersect(), and UTriangularFacet().

UVector3 UTriangularFacet::fE1
private

Definition at line 147 of file UTriangularFacet.hh.

Referenced by CopyFrom(), Distance(), GetPointOnFace(), Intersect(), and UTriangularFacet().

UVector3 UTriangularFacet::fE2
private

Definition at line 147 of file UTriangularFacet.hh.

Referenced by CopyFrom(), Distance(), GetPointOnFace(), Intersect(), and UTriangularFacet().

int UTriangularFacet::fIndices[3]
private
bool UTriangularFacet::fIsDefined
private

Definition at line 148 of file UTriangularFacet.hh.

Referenced by CopyFrom(), IsDefined(), and UTriangularFacet().

double UTriangularFacet::fRadius
private

Definition at line 135 of file UTriangularFacet.hh.

Referenced by CopyFrom(), Distance(), GetRadius(), and UTriangularFacet().

double UTriangularFacet::fSqrDist
private

Definition at line 146 of file UTriangularFacet.hh.

Referenced by CopyFrom(), Distance(), and Intersect().

UVector3 UTriangularFacet::fSurfaceNormal
private
std::vector<UVector3>* UTriangularFacet::fVertices
private

Definition at line 138 of file UTriangularFacet.hh.

Referenced by CopyFrom(), SetVertices(), and UTriangularFacet().


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