57 fStatistics(1000000), fCubVolEpsilon(0.001), fAreaAccuracy(-1.)
68 fStatistics(1000000), fCubVolEpsilon(0.001), fAreaAccuracy(-1.)
88 fStatistics = source.fStatistics;
89 fCubVolEpsilon = source.fCubVolEpsilon;
90 fAreaAccuracy = source.fAreaAccuracy;
101 if (&source ==
this) {
return *
this; }
109 fStatistics = source.fStatistics;
110 fCubVolEpsilon = source.fCubVolEpsilon;
111 fAreaAccuracy = source.fAreaAccuracy;
133 **sourceFace = source.
faces;
136 *face = (*sourceFace)->
Clone();
183 (*face)->CalculateExtent( axis, voxelLimit, transform, extentList );
252 G4double distFromSurface = kInfinity;
262 faceDistance, faceDistFromSurface,
263 faceNormal, faceAllBehind ) )
268 if (faceDistance < distance)
270 distance = faceDistance;
271 distFromSurface = faceDistFromSurface;
273 if (distFromSurface <= 0) {
return 0; }
307 G4double distFromSurface = kInfinity;
319 faceDistance, faceDistFromSurface,
320 faceNormal, faceAllBehind ) )
325 if ( (distance < kInfinity) || (!faceAllBehind) ) { allBehind =
false; }
326 if (faceDistance < distance)
328 distance = faceDistance;
329 distFromSurface = faceDistFromSurface;
332 if (distFromSurface <= 0.) {
break; }
337 if (distance < kInfinity)
339 if (distFromSurface <= 0.)
350 *validNorm = allBehind;
357 if (calcNorm) { *validNorm =
false; }
379 const G4bool outgoing )
const
385 G4double distance = (*face)->Distance( p, outgoing );
386 if (distance < best) { best = distance; }
410 yMax(0,1,0), yMin(0,-1,0),
411 zMax(0,0,1), zMin(0,0,-1);
413 { &xMin, &xMax, &yMin, &yMax, &zMin, &zMax };
416 {-kInfinity, -kInfinity, -kInfinity, -kInfinity, -kInfinity, -kInfinity};
425 G4double testFace = (*face)->Extent( **axis );
426 if (testFace > *answer) { *answer = testFace; }
428 while( --axis, --answer >= answers );
432 return { -answers[0], answers[1],
433 -answers[2], answers[3],
434 -answers[4], answers[5] };
443 return {
"G4CSGfaceted"};
452 os <<
"-----------------------------------------------------------\n"
453 <<
" *** Dump for solid - " <<
GetName() <<
" ***\n"
454 <<
" ===================================================\n"
455 <<
" Solid type: G4VCSGfaceted\n"
457 <<
" number of faces: " <<
numFace <<
"\n"
458 <<
"-----------------------------------------------------------\n";
478 return fCubVolEpsilon;
516 return fAreaAccuracy;
594 std::vector<G4double> areas;
600 G4double result = (*face)->SurfaceArea( );
601 areas.push_back(result);
610 Achose1=0.; Achose2=0.;
616 if(chose>=Achose1 && chose<Achose2)
619 point= (*face1)->GetPointOnFace();
#define G4MUTEX_INITIALIZER
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
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)
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 EstimateSurfaceArea(G4int nStat, G4double ell) const
G4double EstimateCubicVolume(G4int nStat, G4double epsilon) const
G4VSolid & operator=(const G4VSolid &rhs)
static G4int GetNumberOfRotationSteps()