Geant4
10.01.p02
|
#include <UOrb.hh>
Public Member Functions | |
UOrb () | |
UOrb (const std::string &name, double pRmax) | |
~UOrb () | |
UOrb (const UOrb &rhs) | |
UOrb & | operator= (const UOrb &rhs) |
double | GetRadius () const |
void | SetRadius (double newRmax) |
EnumInside | Inside (const UVector3 &aPo6int) const |
Return whether point inside/outside/on surface Split into radius checks. More... | |
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 |
bool | Normal (const UVector3 &aPoint, UVector3 &aNormal) const |
Return unit normal of surface closest to p. More... | |
void | Extent (UVector3 &aMin, UVector3 &aMax) const |
Returns extent of the solid along a given cartesian axis OK. More... | |
double | Capacity () |
double | SurfaceArea () |
UGeometryType | GetEntityType () const |
void | ComputeBBox (UBBox *, bool) |
void | GetParametersList (int, double *) const |
VUSolid * | Clone () const |
double | GetRadialTolerance () |
UVector3 | GetPointOnSurface () const |
std::ostream & | StreamInfo (std::ostream &os) 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 Member Functions | |
double | DistanceToOutForOutsidePoints (const UVector3 &p, const UVector3 &v, UVector3 &n) const |
Private Attributes | |
double | fR |
double | fRTolerance |
double | fCubicVolume |
double | fSurfaceArea |
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 |
|
inline |
UOrb::UOrb | ( | const std::string & | name, |
double | pRmax | ||
) |
Definition at line 26 of file UOrb.cc.
References UUtils::Exception(), VUSolid::fgTolerance, VUSolid::frTolerance, fRTolerance, G4INCL::Math::max(), and UFatalErrorInArguments.
|
inlinevirtual |
Implements VUSolid.
Definition at line 104 of file UOrb.hh.
References fCubicVolume, fR, and UUtils::kPi.
|
virtual |
|
inlinevirtual |
|
virtual |
Implements VUSolid.
Definition at line 85 of file UOrb.cc.
References d2, UUtils::Exception(), fR, fRTolerance, UUtils::kInfinity, rad, s, UWarning, UVector3::x(), UVector3::y(), and UVector3::z().
Referenced by DistanceToOutForOutsidePoints().
|
virtual |
Implements VUSolid.
Definition at line 204 of file UOrb.cc.
References d2, UUtils::Exception(), fR, fRTolerance, rad, UWarning, UVector3::x(), UVector3::y(), and UVector3::z().
Referenced by DistanceToOutForOutsidePoints().
|
private |
Definition at line 178 of file UOrb.cc.
References DistanceToIn(), DistanceToOut(), UVector3::Dot(), and CLHEP::normal().
Returns extent of the solid along a given cartesian axis OK.
Implements VUSolid.
Definition at line 445 of file UOrb.cc.
References fR, and UVector3::Set().
|
virtual |
|
virtual |
Implements VUSolid.
Definition at line 532 of file UOrb.cc.
References GetRadius().
|
virtual |
Implements VUSolid.
Definition at line 476 of file UOrb.cc.
References fR, UUtils::kPi, UUtils::Random(), and UUtils::sqr().
|
inline |
Definition at line 74 of file UOrb.hh.
References fRTolerance.
|
inline |
Definition at line 93 of file UOrb.hh.
References fR.
Referenced by GetParametersList(), and G4UOrb::GetRadius().
|
virtual |
Return whether point inside/outside/on surface Split into radius checks.
Classify point location with respect to solid: o eInside - inside the solid o eSurface - close to surface within tolerance o eOutside - outside the solid
Implements VUSolid.
Definition at line 54 of file UOrb.cc.
References VUSolid::eInside, VUSolid::eOutside, VUSolid::eSurface, fR, fRTolerance, UVector3::x(), UVector3::y(), and UVector3::z().
Referenced by SafetyFromInside().
Return unit normal of surface closest to p.
From http://lists.trolltech.com/qt-interest/2002-09/thread01124-0.html :
does anybody here have an algorithm to calculate the normal vector in a given point in space (x, y, z) in a sphere? I know that it's not about qt but i'll like very mutch the help.
It's simply the connecting vector from the centre of the sphere to the point (other way around for inward normals) obtained through vector subtraction, normalized to unity.
You really should get an algebra book though, as you are bound to encounter more of these problems in a 3d application.
Implements VUSolid.
Definition at line 423 of file UOrb.cc.
References fR, fRTolerance, rad, UVector3::x(), UVector3::y(), and UVector3::z().
Definition at line 507 of file UOrb.cc.
References fCubicVolume, fR, fRTolerance, and fSurfaceArea.
|
virtual |
Implements VUSolid.
Definition at line 352 of file UOrb.cc.
References UUtils::Exception(), fR, Inside(), kOutside, rad, UWarning, UVector3::x(), UVector3::y(), and UVector3::z().
|
virtual |
Implements VUSolid.
Definition at line 395 of file UOrb.cc.
References fR, rad, UVector3::x(), UVector3::y(), and UVector3::z().
|
inline |
Definition at line 97 of file UOrb.hh.
References fCubicVolume, fR, and fSurfaceArea.
Referenced by G4UOrb::SetRadius().
|
virtual |
Implements VUSolid.
Definition at line 456 of file UOrb.cc.
References fR, and VUSolid::GetName().
|
inlinevirtual |
Implements VUSolid.
Definition at line 117 of file UOrb.hh.
References fR, fSurfaceArea, and UUtils::kPi.
|
private |
Definition at line 86 of file UOrb.hh.
Referenced by Capacity(), operator=(), and SetRadius().
|
private |
Definition at line 84 of file UOrb.hh.
Referenced by Capacity(), DistanceToIn(), DistanceToOut(), Extent(), GetPointOnSurface(), GetRadius(), Inside(), Normal(), operator=(), SafetyFromInside(), SafetyFromOutside(), SetRadius(), StreamInfo(), and SurfaceArea().
|
private |
Definition at line 85 of file UOrb.hh.
Referenced by DistanceToIn(), DistanceToOut(), GetRadialTolerance(), Inside(), Normal(), operator=(), and UOrb().
|
private |
Definition at line 87 of file UOrb.hh.
Referenced by operator=(), SetRadius(), and SurfaceArea().