71 numFace(0), faces(0), fCubicVolume(0.), fSurfaceArea(0.),
72 fRebuildPolyhedron(false), fpPolyhedron(0),
73 fStatistics(1000000), fCubVolEpsilon(0.001), fAreaAccuracy(-1.)
84 numFace(0), faces(0), fCubicVolume(0.), fSurfaceArea(0.),
85 fRebuildPolyhedron(false), fpPolyhedron(0),
86 fStatistics(1000000), fCubVolEpsilon(0.001), fAreaAccuracy(-1.)
119 if (&source ==
this) {
return *
this; }
151 **sourceFace = source.
faces;
154 *face = (*sourceFace)->
Clone();
280 faceDistance, faceDistFromSurface,
281 faceNormal, faceAllBehind ) )
286 if (faceDistance < distance)
288 distance = faceDistance;
289 distFromSurface = faceDistFromSurface;
291 if (distFromSurface <= 0) {
return 0; }
337 faceDistance, faceDistFromSurface,
338 faceNormal, faceAllBehind ) )
343 if ( (distance <
kInfinity) || (!faceAllBehind) ) { allBehind =
false; }
344 if (faceDistance < distance)
346 distance = faceDistance;
347 distFromSurface = faceDistFromSurface;
350 if (distFromSurface <= 0) {
break; }
357 if (distFromSurface <= 0)
368 *validNorm = allBehind;
375 if (calcNorm) { *validNorm =
false; }
397 const G4bool outgoing )
const
403 G4double distance = (*face)->Distance( p, outgoing );
404 if (distance < best) { best = distance; }
428 yMax(0,1,0), yMin(0,-1,0),
429 zMax(0,0,1), zMin(0,0,-1);
431 { &xMin, &xMax, &yMin, &yMax, &zMin, &zMax };
444 if (testFace > *answer) { *answer = testFace; }
446 while( --axis, --answer >= answers );
451 -answers[2], answers[3],
452 -answers[4], answers[5] );
470 os <<
"-----------------------------------------------------------\n"
471 <<
" *** Dump for solid - " <<
GetName() <<
" ***\n"
472 <<
" ===================================================\n"
473 <<
" Solid type: G4VCSGfaceted\n"
475 <<
" number of faces: " <<
numFace <<
"\n"
476 <<
"-----------------------------------------------------------\n";
612 std::vector<G4double> areas;
619 areas.push_back(result);
628 Achose1=0; Achose2=0.;
634 if(chose>=Achose1 && chose<Achose2)
637 point= (*face1)->GetPointOnFace();
virtual void DescribeYourselfTo(G4VGraphicsScene &scene) const
void SetAreaStatistics(G4int st)
G4VCSGfaceted & operator=(const G4VCSGfaceted &source)
G4bool fRebuildPolyhedron
G4Polyhedron * fpPolyhedron
static const G4double kInfinity
CLHEP::Hep3Vector G4ThreeVector
std::vector< ExP01TrackerHit * > a
virtual G4VCSGface * Clone()=0
G4int GetCubVolStatistics() const
G4double EstimateCubicVolume(G4int nStat, G4double epsilon) const
G4bool GetExtent(G4double &min, G4double &max) const
void SetCubVolStatistics(G4int st)
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
G4VCSGfaceted(const G4String &name)
void CopyStuff(const G4VCSGfaceted &source)
const char * name(G4int ptype)
virtual void AddSolid(const G4Box &)=0
#define G4MUTEX_INITIALIZER
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
static double normal(HepRandomEngine *eptr)
virtual G4double SurfaceArea()=0
G4ThreeVector GetPointOnSurfaceGeneric() const
virtual G4double GetSurfaceArea()
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pmin, G4double &pmax) const
virtual G4Polyhedron * CreatePolyhedron() const =0
G4double GetAreaAccuracy() const
virtual G4double Extent(const G4ThreeVector axis)=0
virtual G4VisExtent GetExtent() const
G4double EstimateSurfaceArea(G4int nStat, G4double ell) const
virtual G4GeometryType GetEntityType() const
virtual std::ostream & StreamInfo(std::ostream &os) const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
virtual G4double DistanceTo(const G4ThreeVector &p, const G4bool outgoing) const
void SetAreaAccuracy(G4double ep)
G4VSolid & operator=(const G4VSolid &rhs)
G4int GetNumberOfRotationStepsAtTimeOfCreation() const
G4int GetAreaStatistics() const
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
virtual EInside Inside(const G4ThreeVector &p) const
virtual void CalculateExtent(const EAxis axis, const G4VoxelLimits &voxelLimit, const G4AffineTransform &tranform, G4SolidExtentList &extentList)=0
virtual G4double GetCubicVolume()
G4double GetCubVolEpsilon() const
void SetCubVolEpsilon(G4double ep)
virtual G4double Distance(const G4ThreeVector &p, G4bool outgoing)=0
virtual G4Polyhedron * GetPolyhedron() const