128 if (
this == &rhs) {
return *
this; }
152 pTransform, pMin, pMax );
201 G4cout <<
"WARNING - Invalid call [1] in " 202 <<
"G4SubtractionSolid::SurfaceNormal(p)" <<
G4endl 203 <<
" Point p is outside !" <<
G4endl;
205 G4cerr <<
"WARNING - Invalid call [1] in " 206 <<
"G4SubtractionSolid::SurfaceNormal(p)" << G4endl
207 <<
" Point p is outside !" <<
G4endl;
239 G4cout <<
"WARNING - Invalid call [2] in " 240 <<
"G4SubtractionSolid::SurfaceNormal(p)" <<
G4endl 241 <<
" Point p is inside !" <<
G4endl;
243 G4cerr <<
"WARNING - Invalid call [2] in " 244 <<
"G4SubtractionSolid::SurfaceNormal(p)" << G4endl
245 <<
" Point p is inside !" <<
G4endl;
262 G4double dist = 0.0, dist2 = 0.0, disTmp = 0.0;
267 G4cout <<
"WARNING - Invalid call in " 268 <<
"G4SubtractionSolid::DistanceToIn(p,v)" <<
G4endl 269 <<
" Point p is inside !" <<
G4endl;
272 G4cerr <<
"WARNING - Invalid call in " 273 <<
"G4SubtractionSolid::DistanceToIn(p,v)" << G4endl
274 <<
" Point p is inside !" <<
G4endl;
302 if (dist == dist2) {
return dist; }
311 ->GetConstituentMovedSolid()->GetName();
313 std::ostringstream message;
314 message <<
"Illegal condition caused by solids: " 316 message.precision(16);
317 message <<
"Looping detected in point " << p+dist*v
318 <<
", from original point " << p
319 <<
" and direction " << v << G4endl
320 <<
"Computed candidate distance: " << dist <<
"*mm. ";
321 message.precision(6);
323 G4Exception(
"G4SubtractionSolid::DistanceToIn(p,v)",
325 "Returning candidate distance.");
358 if (dist == dist2) {
return dist; }
367 ->GetConstituentMovedSolid()->GetName();
369 std::ostringstream message;
370 message <<
"Illegal condition caused by solids: " 372 message.precision(16);
373 message <<
"Looping detected in point " << p+dist*v
374 <<
", from original point " << p
375 <<
" and direction " << v << G4endl
376 <<
"Computed candidate distance: " << dist <<
"*mm. ";
377 message.precision(6);
379 G4Exception(
"G4SubtractionSolid::DistanceToIn(p,v)",
381 "Returning candidate distance.");
406 G4cout <<
"WARNING - Invalid call in " 407 <<
"G4SubtractionSolid::DistanceToIn(p)" <<
G4endl 408 <<
" Point p is inside !" <<
G4endl;
410 G4cerr <<
"WARNING - Invalid call in " 411 <<
"G4SubtractionSolid::DistanceToIn(p)" << G4endl
412 <<
" Point p is inside !" <<
G4endl;
452 G4cout <<
"WARNING - Invalid call in " 453 <<
"G4SubtractionSolid::DistanceToOut(p,v)" << G4endl
454 <<
" Point p is outside !" <<
G4endl;
457 G4cerr <<
"WARNING - Invalid call in " 458 <<
"G4SubtractionSolid::DistanceToOut(p,v)" << G4endl
459 <<
" Point p is outside !" <<
G4endl;
496 G4cout <<
"WARNING - Invalid call in " 497 <<
"G4SubtractionSolid::DistanceToOut(p)" <<
G4endl 498 <<
" Point p is outside" <<
G4endl;
500 G4cerr <<
"WARNING - Invalid call in " 501 <<
"G4SubtractionSolid::DistanceToOut(p)" << G4endl
502 <<
" Point p is outside" <<
G4endl;
520 return G4String(
"G4SubtractionSolid");
565 if (processor.
execute(*result)) {
return result; }
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const =0
EInside Inside(const G4ThreeVector &p) const
static const G4double kInfinity
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
virtual ~G4SubtractionSolid()
virtual G4GeometryType GetEntityType() const =0
virtual void AddSolid(const G4Box &)=0
static double normal(HepRandomEngine *eptr)
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
G4GLOB_DLL std::ostream G4cout
G4double GetRadialTolerance() const
virtual EInside Inside(const G4ThreeVector &p) const =0
void DescribeYourselfTo(G4VGraphicsScene &scene) const
G4SubtractionSolid & operator=(const G4SubtractionSolid &rhs)
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const =0
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 ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
G4BooleanSolid & operator=(const G4BooleanSolid &rhs)
G4Polyhedron * StackPolyhedron(HepPolyhedronProcessor &, const G4VSolid *) const
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const =0
G4GeometryType GetEntityType() const
bool execute(HepPolyhedron &)
static G4GeometryTolerance * GetInstance()
G4Polyhedron * CreatePolyhedron() const
G4GLOB_DLL std::ostream G4cerr