64 numFace(0), faces(0), fCubicVolume(0.), fSurfaceArea(0.), fpPolyhedron(0),
65 fStatistics(1000000), fCubVolEpsilon(0.001), fAreaAccuracy(-1.)
76 numFace(0), faces(0), fCubicVolume(0.), fSurfaceArea(0.), fpPolyhedron(0),
77 fStatistics(1000000), fCubVolEpsilon(0.001), fAreaAccuracy(-1.)
110 if (&source ==
this) {
return *
this; }
142 **sourceFace = source.
faces;
145 *face = (*sourceFace)->
Clone();
270 faceDistance, faceDistFromSurface,
271 faceNormal, faceAllBehind ) )
276 if (faceDistance < distance)
278 distance = faceDistance;
279 distFromSurface = faceDistFromSurface;
281 if (distFromSurface <= 0) {
return 0; }
327 faceDistance, faceDistFromSurface,
328 faceNormal, faceAllBehind ) )
333 if ( (distance <
kInfinity) || (!faceAllBehind) ) { allBehind =
false; }
334 if (faceDistance < distance)
336 distance = faceDistance;
337 distFromSurface = faceDistFromSurface;
340 if (distFromSurface <= 0) {
break; }
347 if (distFromSurface <= 0)
358 *validNorm = allBehind;
365 if (calcNorm) { *validNorm =
false; }
387 const G4bool outgoing )
const
393 G4double distance = (*face)->Distance( p, outgoing );
394 if (distance < best) { best = distance; }
418 yMax(0,1,0), yMin(0,-1,0),
419 zMax(0,0,1), zMin(0,0,-1);
421 { &xMin, &xMax, &yMin, &yMax, &zMin, &zMax };
434 if (testFace > *answer) { *answer = testFace; }
436 while( --axis, --answer >= answers );
441 -answers[2], answers[3],
442 -answers[4], answers[5] );
460 os <<
"-----------------------------------------------------------\n"
461 <<
" *** Dump for solid - " <<
GetName() <<
" ***\n"
462 <<
" ===================================================\n"
463 <<
" Solid type: G4VCSGfaceted\n"
465 <<
" number of faces: " <<
numFace <<
"\n"
466 <<
"-----------------------------------------------------------\n";
598 std::vector<G4double> areas;
605 areas.push_back(result);
614 Achose1=0; Achose2=0.;
620 if(chose>=Achose1 && chose<Achose2)
623 point= (*face1)->GetPointOnFace();
virtual void DescribeYourselfTo(G4VGraphicsScene &scene) const
void SetAreaStatistics(G4int st)
G4VCSGfaceted & operator=(const G4VCSGfaceted &source)
G4Polyhedron * fpPolyhedron
static const G4double kInfinity
CLHEP::Hep3Vector G4ThreeVector
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)
virtual void AddSolid(const G4Box &)=0
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