58 fStatistics(1000000), fCubVolEpsilon(0.001), fAreaAccuracy(-1.)
69 fStatistics(1000000), fCubVolEpsilon(0.001), fAreaAccuracy(-1.)
89 fStatistics = source.fStatistics;
90 fCubVolEpsilon = source.fCubVolEpsilon;
91 fAreaAccuracy = source.fAreaAccuracy;
102 if (&source ==
this) {
return *
this; }
110 fStatistics = source.fStatistics;
111 fCubVolEpsilon = source.fCubVolEpsilon;
112 fAreaAccuracy = source.fAreaAccuracy;
134 **sourceFace = source.
faces;
137 *face = (*sourceFace)->
Clone();
184 (*face)->CalculateExtent(
axis, voxelLimit, transform, extentList );
253 G4double distFromSurface = kInfinity;
263 faceDistance, faceDistFromSurface,
264 faceNormal, faceAllBehind ) )
269 if (faceDistance < distance)
271 distance = faceDistance;
272 distFromSurface = faceDistFromSurface;
274 if (distFromSurface <= 0) {
return 0; }
308 G4double distFromSurface = kInfinity;
320 faceDistance, faceDistFromSurface,
321 faceNormal, faceAllBehind ) )
326 if ( (distance < kInfinity) || (!faceAllBehind) ) { allBehind =
false; }
327 if (faceDistance < distance)
329 distance = faceDistance;
330 distFromSurface = faceDistFromSurface;
333 if (distFromSurface <= 0.) {
break; }
338 if (distance < kInfinity)
340 if (distFromSurface <= 0.)
351 *validNorm = allBehind;
358 if (calcNorm) { *validNorm =
false; }
380 const G4bool outgoing )
const
386 G4double distance = (*face)->Distance( p, outgoing );
387 if (distance < best) { best = distance; }
411 yMax(0,1,0), yMin(0,-1,0),
412 zMax(0,0,1), zMin(0,0,-1);
414 { &xMin, &xMax, &yMin, &yMax, &zMin, &zMax };
417 {-kInfinity, -kInfinity, -kInfinity, -kInfinity, -kInfinity, -kInfinity};
427 if (testFace > *answer) { *answer = testFace; }
429 while( --
axis, --answer >= answers );
433 return { -answers[0], answers[1],
434 -answers[2], answers[3],
435 -answers[4], answers[5] };
444 return {
"G4CSGfaceted"};
453 os <<
"-----------------------------------------------------------\n"
454 <<
" *** Dump for solid - " <<
GetName() <<
" ***\n"
455 <<
" ===================================================\n"
456 <<
" Solid type: G4VCSGfaceted\n"
458 <<
" number of faces: " <<
numFace <<
"\n"
459 <<
"-----------------------------------------------------------\n";
479 return fCubVolEpsilon;
517 return fAreaAccuracy;
578 fpPolyhedron->GetNumberOfRotationStepsAtTimeOfCreation() !=
603 std::vector<G4double> areas;
609 G4double result = (*face)->SurfaceArea( );
610 areas.push_back(result);
619 Achose1=0.; Achose2=0.;
625 if(chose>=Achose1 && chose<Achose2)
628 point= (*face1)->GetPointOnFace();
G4TemplateAutoLock< G4Mutex > G4AutoLock
G4double G4QuickRand(uint32_t seed=0)
#define G4MUTEX_INITIALIZER
CLHEP::Hep3Vector G4ThreeVector
G4SolidExtentList is utility class designed for calculating the extent of a CSG-like solid for a voxe...
G4bool GetExtent(G4double &min, G4double &max) const
G4VCSGface is virtual base class, representing one side (or face) of a CSG-like solid....
virtual G4VCSGface * Clone()=0
virtual G4double Distance(const G4ThreeVector &p, G4bool outgoing)=0
void CopyStuff(const G4VCSGfaceted &source)
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const override
G4double GetCubVolEpsilon() const
G4Polyhedron * GetPolyhedron() const override
G4VCSGfaceted & operator=(const G4VCSGfaceted &source)
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pmin, G4double &pmax) const override
G4int GetCubVolStatistics() const
void SetAreaStatistics(G4int st)
EInside Inside(const G4ThreeVector &p) const override
G4double GetSurfaceArea() override
G4VisExtent GetExtent() const override
void SetAreaAccuracy(G4double ep)
~G4VCSGfaceted() override
void DescribeYourselfTo(G4VGraphicsScene &scene) const override
G4VCSGfaceted(const G4String &name)
G4Polyhedron * fpPolyhedron
G4bool fRebuildPolyhedron
G4Polyhedron * CreatePolyhedron() const override=0
G4double GetCubicVolume() override
G4int GetAreaStatistics() const
std::ostream & StreamInfo(std::ostream &os) const override
G4double GetAreaAccuracy() const
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=nullptr, G4ThreeVector *n=nullptr) const override
G4ThreeVector GetPointOnSurfaceGeneric() const
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const override
virtual G4double DistanceTo(const G4ThreeVector &p, const G4bool outgoing) const
void SetCubVolEpsilon(G4double ep)
void SetCubVolStatistics(G4int st)
G4GeometryType GetEntityType() const override
virtual void AddSolid(const G4Box &)=0
G4double EstimateCubicVolume(G4int nStat, G4double epsilon) const
G4VSolid(const G4String &name)
G4VSolid & operator=(const G4VSolid &rhs)
G4double EstimateSurfaceArea(G4int nStat, G4double epsilon) const
G4VoxelLimits represents limitation/restrictions of space, where restrictions are only made perpendic...
const axis_t axis_to_type< N >::axis