66 numFace(0), faces(0), fCubicVolume(0.), fSurfaceArea(0.), fpPolyhedron(0),
67 fStatistics(1000000), fCubVolEpsilon(0.001), fAreaAccuracy(-1.)
78 numFace(0), faces(0), fCubicVolume(0.), fSurfaceArea(0.), fpPolyhedron(0),
79 fStatistics(1000000), fCubVolEpsilon(0.001), fAreaAccuracy(-1.)
99 fStatistics = source.fStatistics;
100 fCubVolEpsilon = source.fCubVolEpsilon;
101 fAreaAccuracy = source.fAreaAccuracy;
112 if (&source ==
this) {
return *
this; }
120 fStatistics = source.fStatistics;
121 fCubVolEpsilon = source.fCubVolEpsilon;
122 fAreaAccuracy = source.fAreaAccuracy;
144 **sourceFace = source.
faces;
147 *face = (*sourceFace)->
Clone();
261 G4double distFromSurface = kInfinity;
271 faceDistance, faceDistFromSurface,
272 faceNormal, faceAllBehind ) )
277 if (faceDistance < distance)
279 distance = faceDistance;
280 distFromSurface = faceDistFromSurface;
282 if (distFromSurface <= 0) {
return 0; }
316 G4double distFromSurface = kInfinity;
328 faceDistance, faceDistFromSurface,
329 faceNormal, faceAllBehind ) )
334 if ( (distance < kInfinity) || (!faceAllBehind) ) { allBehind =
false; }
335 if (faceDistance < distance)
337 distance = faceDistance;
338 distFromSurface = faceDistFromSurface;
341 if (distFromSurface <= 0) {
break; }
346 if (distance < kInfinity)
348 if (distFromSurface <= 0)
359 *validNorm = allBehind;
366 if (calcNorm) { *validNorm =
false; }
388 const G4bool outgoing )
const
395 if (distance < best) { best = distance; }
419 yMax(0,1,0), yMin(0,-1,0),
420 zMax(0,0,1), zMin(0,0,-1);
422 { &xMin, &xMax, &yMin, &yMax, &zMin, &zMax };
425 {-kInfinity, -kInfinity, -kInfinity, -kInfinity, -kInfinity, -kInfinity};
434 G4double testFace = (*face)->Extent( **axis );
435 if (testFace > *answer) { *answer = testFace; }
437 while( --axis, --answer >= answers );
442 -answers[2], answers[3],
443 -answers[4], answers[5] );
461 os <<
"-----------------------------------------------------------\n"
462 <<
" *** Dump for solid - " <<
GetName() <<
" ***\n"
463 <<
" ===================================================\n"
464 <<
" Solid type: G4VCSGfaceted\n"
466 <<
" number of faces: " <<
numFace <<
"\n"
467 <<
"-----------------------------------------------------------\n";
487 return fCubVolEpsilon;
525 return fAreaAccuracy;
599 std::vector<G4double> areas;
606 areas.push_back(result);
615 Achose1=0; Achose2=0.;
621 if(chose>=Achose1 && chose<Achose2)
624 point= (*face1)->GetPointOnFace();
CLHEP::Hep3Vector G4ThreeVector
G4int GetNumberOfRotationStepsAtTimeOfCreation() const
G4bool GetExtent(G4double &min, G4double &max) const
virtual G4VCSGface * Clone()=0
virtual G4double Distance(const G4ThreeVector &p, G4bool outgoing)=0
virtual void CalculateExtent(const EAxis axis, const G4VoxelLimits &voxelLimit, const G4AffineTransform &tranform, G4SolidExtentList &extentList)=0
virtual EInside Inside(const G4ThreeVector &p, G4double tolerance, G4double *bestDistance)=0
virtual G4double SurfaceArea()=0
void CopyStuff(const G4VCSGfaceted &source)
G4double GetCubVolEpsilon() const
virtual G4double GetSurfaceArea()
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
virtual EInside Inside(const G4ThreeVector &p) const
G4int GetCubVolStatistics() const
void SetAreaStatistics(G4int st)
virtual void DescribeYourselfTo(G4VGraphicsScene &scene) const
virtual G4Polyhedron * CreatePolyhedron() const =0
void SetAreaAccuracy(G4double ep)
const G4VCSGfaceted & operator=(const G4VCSGfaceted &source)
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pmin, G4double &pmax) const
G4VCSGfaceted(const G4String &name)
G4Polyhedron * fpPolyhedron
virtual G4GeometryType GetEntityType() const
G4int GetAreaStatistics() const
G4double GetAreaAccuracy() const
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
virtual std::ostream & StreamInfo(std::ostream &os) const
virtual G4double GetCubicVolume()
G4ThreeVector GetPointOnSurfaceGeneric() const
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
virtual G4double DistanceTo(const G4ThreeVector &p, const G4bool outgoing) const
virtual G4Polyhedron * GetPolyhedron() const
void SetCubVolEpsilon(G4double ep)
void SetCubVolStatistics(G4int st)
virtual G4VisExtent GetExtent() const
virtual void AddSolid(const G4Box &)=0
G4double EstimateSurfaceArea(G4int nStat, G4double ell) const
G4double EstimateCubicVolume(G4int nStat, G4double epsilon) const
G4VSolid & operator=(const G4VSolid &rhs)
static G4int GetNumberOfRotationSteps()