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.)
97 fStatistics = source.fStatistics;
98 fCubVolEpsilon = source.fCubVolEpsilon;
99 fAreaAccuracy = source.fAreaAccuracy;
110 if (&source ==
this) {
return *
this; }
118 fStatistics = source.fStatistics;
119 fCubVolEpsilon = source.fCubVolEpsilon;
120 fAreaAccuracy = source.fAreaAccuracy;
142 **sourceFace = source.
faces;
145 *face = (*sourceFace)->
Clone();
259 G4double distFromSurface = kInfinity;
269 faceDistance, faceDistFromSurface,
270 faceNormal, faceAllBehind ) )
275 if (faceDistance < distance)
277 distance = faceDistance;
278 distFromSurface = faceDistFromSurface;
280 if (distFromSurface <= 0) {
return 0; }
314 G4double distFromSurface = kInfinity;
326 faceDistance, faceDistFromSurface,
327 faceNormal, faceAllBehind ) )
332 if ( (distance < kInfinity) || (!faceAllBehind) ) { allBehind =
false; }
333 if (faceDistance < distance)
335 distance = faceDistance;
336 distFromSurface = faceDistFromSurface;
339 if (distFromSurface <= 0) {
break; }
344 if (distance < kInfinity)
346 if (distFromSurface <= 0)
357 *validNorm = allBehind;
364 if (calcNorm) { *validNorm =
false; }
386 const G4bool outgoing )
const
393 if (distance < best) { best = distance; }
417 yMax(0,1,0), yMin(0,-1,0),
418 zMax(0,0,1), zMin(0,0,-1);
420 { &xMin, &xMax, &yMin, &yMax, &zMin, &zMax };
423 {-kInfinity, -kInfinity, -kInfinity, -kInfinity, -kInfinity, -kInfinity};
432 G4double testFace = (*face)->Extent( **axis );
433 if (testFace > *answer) { *answer = testFace; }
435 while( --axis, --answer >= answers );
440 -answers[2], answers[3],
441 -answers[4], answers[5] );
459 os <<
"-----------------------------------------------------------\n"
460 <<
" *** Dump for solid - " <<
GetName() <<
" ***\n"
461 <<
" ===================================================\n"
462 <<
" Solid type: G4VCSGfaceted\n"
464 <<
" number of faces: " <<
numFace <<
"\n"
465 <<
"-----------------------------------------------------------\n";
485 return fCubVolEpsilon;
523 return fAreaAccuracy;
597 std::vector<G4double> areas;
604 areas.push_back(result);
613 Achose1=0; Achose2=0.;
619 if(chose>=Achose1 && chose<Achose2)
622 point= (*face1)->GetPointOnFace();
virtual void DescribeYourselfTo(G4VGraphicsScene &scene) const
void SetAreaStatistics(G4int st)
G4Polyhedron * fpPolyhedron
CLHEP::Hep3Vector G4ThreeVector
virtual G4VCSGface * Clone()=0
G4int GetCubVolStatistics() const
G4double EstimateCubicVolume(G4int nStat, G4double epsilon) const
G4bool GetExtent(G4double &min, G4double &max) const
G4double G4NeutronHPJENDLHEData::G4double result
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
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 G4VisExtent GetExtent() const
const G4VCSGfaceted & operator=(const G4VCSGfaceted &source)
G4double EstimateSurfaceArea(G4int nStat, G4double ell) const
virtual G4GeometryType GetEntityType() const
virtual std::ostream & StreamInfo(std::ostream &os) const
static G4int GetNumberOfRotationSteps()
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