128 if (
this == &rhs) {
return *
this; }
151 if (pMin.
x() >= pMax.
x() || pMin.
y() >= pMax.
y() || pMin.
z() >= pMax.
z())
153 std::ostringstream message;
154 message <<
"Bad bounding box (min >= max) for solid: "
156 <<
"\npMin = " << pMin
157 <<
"\npMax = " << pMax;
158 G4Exception(
"G4SubtractionSolid::Extent()",
"GeomMgt0001",
179 pTransform, pMin, pMax );
231 G4cout <<
"WARNING - Invalid call [1] in "
232 <<
"G4SubtractionSolid::SurfaceNormal(p)" <<
G4endl
233 <<
" Point p is outside !" <<
G4endl;
235 G4cerr <<
"WARNING - Invalid call [1] in "
236 <<
"G4SubtractionSolid::SurfaceNormal(p)" << G4endl
237 <<
" Point p is outside !" <<
G4endl;
265 G4cout <<
"WARNING - Invalid call [2] in "
266 <<
"G4SubtractionSolid::SurfaceNormal(p)" <<
G4endl
267 <<
" Point p is inside !" <<
G4endl;
269 G4cerr <<
"WARNING - Invalid call [2] in "
270 <<
"G4SubtractionSolid::SurfaceNormal(p)" << G4endl
271 <<
" Point p is inside !" <<
G4endl;
287 G4double dist = 0.0, dist2 = 0.0, disTmp = 0.0;
292 G4cout <<
"WARNING - Invalid call in "
293 <<
"G4SubtractionSolid::DistanceToIn(p,v)" <<
G4endl
294 <<
" Point p is inside !" <<
G4endl;
297 G4cerr <<
"WARNING - Invalid call in "
298 <<
"G4SubtractionSolid::DistanceToIn(p,v)" << G4endl
299 <<
" Point p is inside !" <<
G4endl;
327 if (dist == dist2) {
return dist; }
336 ->GetConstituentMovedSolid()->GetName();
338 std::ostringstream message;
339 message <<
"Illegal condition caused by solids: "
341 message.precision(16);
342 message <<
"Looping detected in point " << p+dist*v
343 <<
", from original point " << p
344 <<
" and direction " << v << G4endl
345 <<
"Computed candidate distance: " << dist <<
"*mm. ";
346 message.precision(6);
348 G4Exception(
"G4SubtractionSolid::DistanceToIn(p,v)",
350 "Returning candidate distance.");
383 if (dist == dist2) {
return dist; }
392 ->GetConstituentMovedSolid()->GetName();
394 std::ostringstream message;
395 message <<
"Illegal condition caused by solids: "
397 message.precision(16);
398 message <<
"Looping detected in point " << p+dist*v
399 <<
", from original point " << p
400 <<
" and direction " << v << G4endl
401 <<
"Computed candidate distance: " << dist <<
"*mm. ";
402 message.precision(6);
404 G4Exception(
"G4SubtractionSolid::DistanceToIn(p,v)",
406 "Returning candidate distance.");
431 G4cout <<
"WARNING - Invalid call in "
432 <<
"G4SubtractionSolid::DistanceToIn(p)" <<
G4endl
433 <<
" Point p is inside !" <<
G4endl;
435 G4cerr <<
"WARNING - Invalid call in "
436 <<
"G4SubtractionSolid::DistanceToIn(p)" << G4endl
437 <<
" Point p is inside !" <<
G4endl;
477 G4cout <<
"WARNING - Invalid call in "
478 <<
"G4SubtractionSolid::DistanceToOut(p,v)" << G4endl
479 <<
" Point p is outside !" <<
G4endl;
482 G4cerr <<
"WARNING - Invalid call in "
483 <<
"G4SubtractionSolid::DistanceToOut(p,v)" << G4endl
484 <<
" Point p is outside !" <<
G4endl;
521 G4cout <<
"WARNING - Invalid call in "
522 <<
"G4SubtractionSolid::DistanceToOut(p)" <<
G4endl
523 <<
" Point p is outside" <<
G4endl;
525 G4cerr <<
"WARNING - Invalid call in "
526 <<
"G4SubtractionSolid::DistanceToOut(p)" << G4endl
527 <<
" Point p is outside" <<
G4endl;
545 return G4String(
"G4SubtractionSolid");
G4double G4ParticleHPJENDLHEData::G4double result
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const =0
static constexpr double mm
static const G4double kInfinity
virtual ~G4SubtractionSolid()
virtual G4GeometryType GetEntityType() const =0
virtual void AddSolid(const G4Box &)=0
G4Polyhedron * CreatePolyhedron() const
static double normal(HepRandomEngine *eptr)
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
G4GLOB_DLL std::ostream G4cout
virtual EInside Inside(const G4ThreeVector &p) const =0
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
void Extent(G4ThreeVector &pMin, G4ThreeVector &pMax) const
G4double GetRadialTolerance() const
G4SubtractionSolid & operator=(const G4SubtractionSolid &rhs)
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const =0
EInside Inside(const G4ThreeVector &p) const
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
G4SubtractionSolid(const G4String &pName, G4VSolid *pSolidA, G4VSolid *pSolidB)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void DescribeYourselfTo(G4VGraphicsScene &scene) const
void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4GeometryType GetEntityType() const
G4BooleanSolid & operator=(const G4BooleanSolid &rhs)
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const =0
virtual void Extent(G4ThreeVector &pMin, G4ThreeVector &pMax) const
G4Polyhedron * StackPolyhedron(HepPolyhedronProcessor &, const G4VSolid *) const
bool execute(HepPolyhedron &)
static G4GeometryTolerance * GetInstance()
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
G4GLOB_DLL std::ostream G4cerr