Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VSolid Class Referenceabstract

#include <G4VSolid.hh>

+ Inheritance diagram for G4VSolid:

Public Member Functions

 G4VSolid (const G4String &name)
 
virtual ~G4VSolid ()
 
G4bool operator== (const G4VSolid &s) const
 
G4String GetName () const
 
void SetName (const G4String &name)
 
G4double GetTolerance () const
 
virtual void BoundingLimits (G4ThreeVector &pMin, G4ThreeVector &pMax) const
 
virtual G4bool CalculateExtent (const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const =0
 
virtual EInside Inside (const G4ThreeVector &p) const =0
 
virtual G4ThreeVector SurfaceNormal (const G4ThreeVector &p) const =0
 
virtual G4double DistanceToIn (const G4ThreeVector &p, const G4ThreeVector &v) const =0
 
virtual G4double DistanceToIn (const G4ThreeVector &p) const =0
 
virtual G4double DistanceToOut (const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=nullptr, G4ThreeVector *n=nullptr) const =0
 
virtual G4double DistanceToOut (const G4ThreeVector &p) const =0
 
virtual void ComputeDimensions (G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
 
virtual G4double GetCubicVolume ()
 
virtual G4double GetSurfaceArea ()
 
virtual G4GeometryType GetEntityType () const =0
 
virtual G4ThreeVector GetPointOnSurface () const
 
virtual G4VSolidClone () const
 
virtual std::ostream & StreamInfo (std::ostream &os) const =0
 
void DumpInfo () const
 
virtual void DescribeYourselfTo (G4VGraphicsScene &scene) const =0
 
virtual G4VisExtent GetExtent () const
 
virtual G4PolyhedronCreatePolyhedron () const
 
virtual G4PolyhedronGetPolyhedron () const
 
virtual const G4VSolidGetConstituentSolid (G4int no) const
 
virtual G4VSolidGetConstituentSolid (G4int no)
 
virtual const G4DisplacedSolidGetDisplacedSolidPtr () const
 
virtual G4DisplacedSolidGetDisplacedSolidPtr ()
 
 G4VSolid (__void__ &)
 
 G4VSolid (const G4VSolid &rhs)
 
G4VSolidoperator= (const G4VSolid &rhs)
 
G4double EstimateCubicVolume (G4int nStat, G4double epsilon) const
 
G4double EstimateSurfaceArea (G4int nStat, G4double ell) const
 

Protected Member Functions

void CalculateClippedPolygonExtent (G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipCrossSection (G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipBetweenSections (G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipPolygon (G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis) const
 

Protected Attributes

G4double kCarTolerance
 

Friends

std::ostream & operator<< (std::ostream &os, const G4VSolid &e)
 

Detailed Description

Definition at line 82 of file G4VSolid.hh.

Constructor & Destructor Documentation

◆ G4VSolid() [1/3]

G4VSolid::G4VSolid ( const G4String name)

Definition at line 48 of file G4VSolid.cc.

49 : fshapeName(name)
50{
52
53 // Register to store
54 //
56}
G4double GetSurfaceTolerance() const
static G4GeometryTolerance * GetInstance()
static void Register(G4VSolid *pSolid)
static G4SolidStore * GetInstance()
G4double kCarTolerance
Definition: G4VSolid.hh:302

◆ ~G4VSolid()

G4VSolid::~G4VSolid ( )
virtual

Definition at line 89 of file G4VSolid.cc.

90{
92}
static void DeRegister(G4VSolid *pSolid)

◆ G4VSolid() [2/3]

G4VSolid::G4VSolid ( __void__ &  )

Definition at line 76 of file G4VSolid.cc.

77 : fshapeName("")
78{
79 // Register to store
80 //
82}

◆ G4VSolid() [3/3]

G4VSolid::G4VSolid ( const G4VSolid rhs)

Definition at line 63 of file G4VSolid.cc.

64 : kCarTolerance(rhs.kCarTolerance), fshapeName(rhs.fshapeName)
65{
66 // Register to store
67 //
69}

Member Function Documentation

◆ BoundingLimits()

void G4VSolid::BoundingLimits ( G4ThreeVector pMin,
G4ThreeVector pMax 
) const
virtual

Reimplemented in G4MultiUnion, G4ReflectedSolid, G4DisplacedSolid, G4IntersectionSolid, G4ScaledSolid, G4SubtractionSolid, G4UnionSolid, G4Box, G4Cons, G4CutTubs, G4Orb, G4Para, G4Sphere, G4Torus, G4Trap, G4Trd, G4Tubs, G4Ellipsoid, G4EllipticalCone, G4EllipticalTube, G4ExtrudedSolid, G4GenericPolycone, G4GenericTrap, G4Hype, G4Paraboloid, G4Polycone, G4Polyhedra, G4TessellatedSolid, G4Tet, G4TwistedTubs, and G4VTwistedFaceted.

Definition at line 653 of file G4VSolid.cc.

654{
655 std::ostringstream message;
656 message << "Not implemented for solid: "
657 << GetEntityType() << " !"
658 << "\nReturning infinite boundinx box.";
659 G4Exception("G4VSolid::BoundingLimits()", "GeomMgt1001",
660 JustWarning, message);
661
662 pMin.set(-kInfinity,-kInfinity,-kInfinity);
663 pMax.set( kInfinity, kInfinity, kInfinity);
664}
@ JustWarning
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
void set(double x, double y, double z)
virtual G4GeometryType GetEntityType() const =0

Referenced by G4ReflectedSolid::BoundingLimits(), G4DisplacedSolid::BoundingLimits(), G4IntersectionSolid::BoundingLimits(), G4ScaledSolid::BoundingLimits(), G4SubtractionSolid::BoundingLimits(), G4UnionSolid::BoundingLimits(), G4ScaledSolid::CalculateExtent(), G4PVPlacement::CheckOverlaps(), EstimateSurfaceArea(), and G4MultiUnion::Extent().

◆ CalculateClippedPolygonExtent()

void G4VSolid::CalculateClippedPolygonExtent ( G4ThreeVectorList pPolygon,
const G4VoxelLimits pVoxelLimit,
const EAxis  pAxis,
G4double pMin,
G4double pMax 
) const
protected

Definition at line 477 of file G4VSolid.cc.

482{
483 G4int noLeft,i;
484 G4double component;
485
486 ClipPolygon(pPolygon,pVoxelLimit,pAxis);
487 noLeft = pPolygon.size();
488
489 if ( noLeft )
490 {
491 for (i=0; i<noLeft; ++i)
492 {
493 component = pPolygon[i].operator()(pAxis);
494
495 if (component < pMin)
496 {
497 pMin = component;
498 }
499 if (component > pMax)
500 {
501 pMax = component;
502 }
503 }
504 }
505}
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
void ClipPolygon(G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis) const
Definition: G4VSolid.cc:527

Referenced by ClipBetweenSections(), and ClipCrossSection().

◆ CalculateExtent()

◆ ClipBetweenSections()

void G4VSolid::ClipBetweenSections ( G4ThreeVectorList pVertices,
const G4int  pSectionIndex,
const G4VoxelLimits pVoxelLimit,
const EAxis  pAxis,
G4double pMin,
G4double pMax 
) const
protected

Definition at line 432 of file G4VSolid.cc.

437{
438 G4ThreeVectorList polygon;
439 polygon.reserve(4);
440 polygon.push_back((*pVertices)[pSectionIndex]);
441 polygon.push_back((*pVertices)[pSectionIndex+4]);
442 polygon.push_back((*pVertices)[pSectionIndex+5]);
443 polygon.push_back((*pVertices)[pSectionIndex+1]);
444 CalculateClippedPolygonExtent(polygon,pVoxelLimit,pAxis,pMin,pMax);
445 polygon.clear();
446
447 polygon.push_back((*pVertices)[pSectionIndex+1]);
448 polygon.push_back((*pVertices)[pSectionIndex+5]);
449 polygon.push_back((*pVertices)[pSectionIndex+6]);
450 polygon.push_back((*pVertices)[pSectionIndex+2]);
451 CalculateClippedPolygonExtent(polygon,pVoxelLimit,pAxis,pMin,pMax);
452 polygon.clear();
453
454 polygon.push_back((*pVertices)[pSectionIndex+2]);
455 polygon.push_back((*pVertices)[pSectionIndex+6]);
456 polygon.push_back((*pVertices)[pSectionIndex+7]);
457 polygon.push_back((*pVertices)[pSectionIndex+3]);
458 CalculateClippedPolygonExtent(polygon,pVoxelLimit,pAxis,pMin,pMax);
459 polygon.clear();
460
461 polygon.push_back((*pVertices)[pSectionIndex+3]);
462 polygon.push_back((*pVertices)[pSectionIndex+7]);
463 polygon.push_back((*pVertices)[pSectionIndex+4]);
464 polygon.push_back((*pVertices)[pSectionIndex]);
465 CalculateClippedPolygonExtent(polygon,pVoxelLimit,pAxis,pMin,pMax);
466 return;
467}
std::vector< G4ThreeVector > G4ThreeVectorList
void CalculateClippedPolygonExtent(G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
Definition: G4VSolid.cc:477

◆ ClipCrossSection()

void G4VSolid::ClipCrossSection ( G4ThreeVectorList pVertices,
const G4int  pSectionIndex,
const G4VoxelLimits pVoxelLimit,
const EAxis  pAxis,
G4double pMin,
G4double pMax 
) const
protected

Definition at line 402 of file G4VSolid.cc.

407{
408
409 G4ThreeVectorList polygon;
410 polygon.reserve(4);
411 polygon.push_back((*pVertices)[pSectionIndex]);
412 polygon.push_back((*pVertices)[pSectionIndex+1]);
413 polygon.push_back((*pVertices)[pSectionIndex+2]);
414 polygon.push_back((*pVertices)[pSectionIndex+3]);
415 CalculateClippedPolygonExtent(polygon,pVoxelLimit,pAxis,pMin,pMax);
416 return;
417}

◆ ClipPolygon()

void G4VSolid::ClipPolygon ( G4ThreeVectorList pPolygon,
const G4VoxelLimits pVoxelLimit,
const EAxis  pAxis 
) const
protected

Definition at line 527 of file G4VSolid.cc.

530{
531 G4ThreeVectorList outputPolygon;
532
533 if ( pVoxelLimit.IsLimited() )
534 {
535 if (pVoxelLimit.IsXLimited() ) // && pAxis != kXAxis)
536 {
537 G4VoxelLimits simpleLimit1;
538 simpleLimit1.AddLimit(kXAxis,pVoxelLimit.GetMinXExtent(),kInfinity);
539 ClipPolygonToSimpleLimits(pPolygon,outputPolygon,simpleLimit1);
540
541 pPolygon.clear();
542
543 if ( !outputPolygon.size() ) return;
544
545 G4VoxelLimits simpleLimit2;
546 simpleLimit2.AddLimit(kXAxis,-kInfinity,pVoxelLimit.GetMaxXExtent());
547 ClipPolygonToSimpleLimits(outputPolygon,pPolygon,simpleLimit2);
548
549 if ( !pPolygon.size() ) return;
550 else outputPolygon.clear();
551 }
552 if ( pVoxelLimit.IsYLimited() ) // && pAxis != kYAxis)
553 {
554 G4VoxelLimits simpleLimit1;
555 simpleLimit1.AddLimit(kYAxis,pVoxelLimit.GetMinYExtent(),kInfinity);
556 ClipPolygonToSimpleLimits(pPolygon,outputPolygon,simpleLimit1);
557
558 // Must always clear pPolygon - for clip to simpleLimit2 and in case of
559 // early exit
560
561 pPolygon.clear();
562
563 if ( !outputPolygon.size() ) return;
564
565 G4VoxelLimits simpleLimit2;
566 simpleLimit2.AddLimit(kYAxis,-kInfinity,pVoxelLimit.GetMaxYExtent());
567 ClipPolygonToSimpleLimits(outputPolygon,pPolygon,simpleLimit2);
568
569 if ( !pPolygon.size() ) return;
570 else outputPolygon.clear();
571 }
572 if ( pVoxelLimit.IsZLimited() ) // && pAxis != kZAxis)
573 {
574 G4VoxelLimits simpleLimit1;
575 simpleLimit1.AddLimit(kZAxis,pVoxelLimit.GetMinZExtent(),kInfinity);
576 ClipPolygonToSimpleLimits(pPolygon,outputPolygon,simpleLimit1);
577
578 // Must always clear pPolygon - for clip to simpleLimit2 and in case of
579 // early exit
580
581 pPolygon.clear();
582
583 if ( !outputPolygon.size() ) return;
584
585 G4VoxelLimits simpleLimit2;
586 simpleLimit2.AddLimit(kZAxis,-kInfinity,pVoxelLimit.GetMaxZExtent());
587 ClipPolygonToSimpleLimits(outputPolygon,pPolygon,simpleLimit2);
588
589 // Return after final clip - no cleanup
590 }
591 }
592}
G4bool IsYLimited() const
G4double GetMinZExtent() const
void AddLimit(const EAxis pAxis, const G4double pMin, const G4double pMax)
G4bool IsXLimited() const
G4double GetMaxYExtent() const
G4double GetMaxZExtent() const
G4double GetMinYExtent() const
G4double GetMinXExtent() const
G4bool IsZLimited() const
G4bool IsLimited() const
G4double GetMaxXExtent() const
@ kYAxis
Definition: geomdefs.hh:56
@ kXAxis
Definition: geomdefs.hh:55
@ kZAxis
Definition: geomdefs.hh:57

Referenced by CalculateClippedPolygonExtent().

◆ Clone()

G4VSolid * G4VSolid::Clone ( ) const
virtual

Reimplemented in G4ReflectedSolid, G4DisplacedSolid, G4IntersectionSolid, G4MultiUnion, G4ScaledSolid, G4SubtractionSolid, G4UnionSolid, G4Box, G4Cons, G4CutTubs, G4Orb, G4Para, G4Sphere, G4Torus, G4Trap, G4Trd, G4Tubs, G4Ellipsoid, G4EllipticalCone, G4EllipticalTube, G4ExtrudedSolid, G4GenericPolycone, G4GenericTrap, G4Hype, G4Paraboloid, G4Polycone, G4Polyhedra, G4TessellatedSolid, G4Tet, G4TwistedBox, G4TwistedTrap, G4TwistedTrd, and G4TwistedTubs.

Definition at line 379 of file G4VSolid.cc.

380{
381 std::ostringstream message;
382 message << "Clone() method not implemented for type: "
383 << GetEntityType() << "!" << G4endl
384 << "Returning NULL pointer!";
385 G4Exception("G4VSolid::Clone()", "GeomMgt1001", JustWarning, message);
386 return nullptr;
387}
#define G4endl
Definition: G4ios.hh:57

Referenced by G4GeometryWorkspace::CloneParameterisedSolids(), and G4GeometryWorkspace::CloneReplicaSolid().

◆ ComputeDimensions()

void G4VSolid::ComputeDimensions ( G4VPVParameterisation p,
const G4int  n,
const G4VPhysicalVolume pRep 
)
virtual

◆ CreatePolyhedron()

◆ DescribeYourselfTo()

◆ DistanceToIn() [1/2]

◆ DistanceToIn() [2/2]

virtual G4double G4VSolid::DistanceToIn ( const G4ThreeVector p,
const G4ThreeVector v 
) const
pure virtual

Implemented in G4MultiUnion, G4ReflectedSolid, G4DisplacedSolid, G4IntersectionSolid, G4ScaledSolid, G4SubtractionSolid, G4UnionSolid, G4Box, G4Cons, G4CutTubs, G4Orb, G4Para, G4Sphere, G4Torus, G4Trap, G4Trd, G4Tubs, G4Ellipsoid, G4EllipticalCone, G4EllipticalTube, G4ExtrudedSolid, G4GenericPolycone, G4GenericTrap, G4Hype, G4Paraboloid, G4Polycone, G4Polyhedra, G4TessellatedSolid, G4Tet, G4TwistedTubs, G4VCSGfaceted, and G4VTwistedFaceted.

Referenced by G4NavigationLogger::AlongComputeStepLog(), G4NavigationLogger::CheckDaughterEntryPoint(), G4PVParameterised::CheckOverlaps(), G4PVPlacement::CheckOverlaps(), G4NormalNavigation::ComputeSafety(), G4VoxelNavigation::ComputeSafety(), G4ReplicaNavigation::ComputeSafety(), G4ParameterisedNavigation::ComputeSafety(), G4VoxelSafety::ComputeSafety(), G4ParameterisedNavigation::ComputeStep(), G4VoxelNavigation::ComputeStep(), G4ReplicaNavigation::ComputeStep(), G4NormalNavigation::ComputeStep(), G4MultiUnion::DistanceToIn(), G4ReflectedSolid::DistanceToIn(), G4DisplacedSolid::DistanceToIn(), G4IntersectionSolid::DistanceToIn(), G4ScaledSolid::DistanceToIn(), G4SubtractionSolid::DistanceToIn(), G4UnionSolid::DistanceToIn(), G4MultiUnion::DistanceToInNoVoxels(), G4SubtractionSolid::DistanceToOut(), EstimateSurfaceArea(), G4Navigator::GetLocalExitNormal(), G4ITNavigator1::GetLocalExitNormal(), G4ITNavigator2::GetLocalExitNormal(), G4VIntersectionLocator::LocateGlobalPointWithinVolumeAndCheck(), G4NavigationLogger::PreComputeStepLog(), G4ITNavigator2::RecheckDistanceToCurrentBoundary(), G4Navigator::RecheckDistanceToCurrentBoundary(), G4NavigationLogger::ReportOutsideMother(), G4NavigationLogger::ReportVolumeAndIntersection(), G4VoxelSafety::SafetyForVoxelNode(), G4MultiUnion::SurfaceNormal(), and G4SubtractionSolid::SurfaceNormal().

◆ DistanceToOut() [1/2]

◆ DistanceToOut() [2/2]

virtual G4double G4VSolid::DistanceToOut ( const G4ThreeVector p,
const G4ThreeVector v,
const G4bool  calcNorm = false,
G4bool validNorm = nullptr,
G4ThreeVector n = nullptr 
) const
pure virtual

Implemented in G4MultiUnion, G4TessellatedSolid, G4DisplacedSolid, G4IntersectionSolid, G4ReflectedSolid, G4ScaledSolid, G4SubtractionSolid, G4UnionSolid, G4Box, G4Cons, G4CutTubs, G4Orb, G4Para, G4Sphere, G4Torus, G4Trap, G4Trd, G4Tubs, G4Ellipsoid, G4EllipticalCone, G4EllipticalTube, G4ExtrudedSolid, G4GenericTrap, G4Hype, G4Paraboloid, G4Tet, G4TwistedTubs, G4VCSGfaceted, and G4VTwistedFaceted.

Referenced by G4NavigationLogger::AlongComputeStepLog(), G4NavigationLogger::CheckDaughterEntryPoint(), G4PVPlacement::CheckOverlaps(), G4NormalNavigation::ComputeSafety(), G4VoxelNavigation::ComputeSafety(), G4ReplicaNavigation::ComputeSafety(), G4ParameterisedNavigation::ComputeSafety(), G4VoxelSafety::ComputeSafety(), G4ParameterisedNavigation::ComputeStep(), G4VoxelNavigation::ComputeStep(), G4ReplicaNavigation::ComputeStep(), G4NormalNavigation::ComputeStep(), G4RegularNavigation::ComputeStepSkippingEqualMaterials(), G4IntersectionSolid::DistanceToIn(), G4SubtractionSolid::DistanceToIn(), G4MultiUnion::DistanceToOut(), G4DisplacedSolid::DistanceToOut(), G4IntersectionSolid::DistanceToOut(), G4ReflectedSolid::DistanceToOut(), G4ScaledSolid::DistanceToOut(), G4SubtractionSolid::DistanceToOut(), G4UnionSolid::DistanceToOut(), G4MultiUnion::DistanceToOutNoVoxels(), G4MultiUnion::DistanceToOutVoxels(), EstimateSurfaceArea(), G4Navigator::GetLocalExitNormal(), G4ITNavigator1::GetLocalExitNormal(), G4ITNavigator2::GetLocalExitNormal(), G4BOptnForceCommonTruncatedExp::Initialize(), G4NeutrinoElectronProcess::PostStepDoIt(), G4VXTRenergyLoss::PostStepDoIt(), G4ElNeutrinoNucleusProcess::PostStepDoIt(), G4MuNeutrinoNucleusProcess::PostStepDoIt(), G4ITNavigator2::RecheckDistanceToCurrentBoundary(), G4Navigator::RecheckDistanceToCurrentBoundary(), G4NavigationLogger::ReportOutsideMother(), G4NavigationLogger::ReportVolumeAndIntersection(), G4MultiUnion::SurfaceNormal(), G4IntersectionSolid::SurfaceNormal(), and G4SubtractionSolid::SurfaceNormal().

◆ DumpInfo()

void G4VSolid::DumpInfo ( ) const
inline

Referenced by G4CutTubs::ApproxSurfaceNormal(), G4Tubs::ApproxSurfaceNormal(), G4ReflectedSolid::BoundingLimits(), G4DisplacedSolid::BoundingLimits(), G4IntersectionSolid::BoundingLimits(), G4ScaledSolid::BoundingLimits(), G4SubtractionSolid::BoundingLimits(), G4UnionSolid::BoundingLimits(), G4Box::BoundingLimits(), G4Cons::BoundingLimits(), G4CutTubs::BoundingLimits(), G4Orb::BoundingLimits(), G4Para::BoundingLimits(), G4Sphere::BoundingLimits(), G4Torus::BoundingLimits(), G4Trap::BoundingLimits(), G4Trd::BoundingLimits(), G4Tubs::BoundingLimits(), G4EllipticalCone::BoundingLimits(), G4ExtrudedSolid::BoundingLimits(), G4GenericPolycone::BoundingLimits(), G4GenericTrap::BoundingLimits(), G4Hype::BoundingLimits(), G4Paraboloid::BoundingLimits(), G4Polycone::BoundingLimits(), G4Polyhedra::BoundingLimits(), G4TessellatedSolid::BoundingLimits(), G4TwistedTubs::BoundingLimits(), G4ParameterisationBoxX::ComputeDimensions(), G4ParameterisationBoxY::ComputeDimensions(), G4ParameterisationBoxZ::ComputeDimensions(), G4ParameterisationConsRho::ComputeDimensions(), G4ParameterisationConsPhi::ComputeDimensions(), G4ParameterisationConsZ::ComputeDimensions(), G4ParameterisationParaX::ComputeDimensions(), G4ParameterisationParaY::ComputeDimensions(), G4ParameterisationParaZ::ComputeDimensions(), G4ParameterisationPolyconeRho::ComputeDimensions(), G4ParameterisationPolyconePhi::ComputeDimensions(), G4ParameterisationPolyconeZ::ComputeDimensions(), G4ParameterisationPolyhedraRho::ComputeDimensions(), G4ParameterisationPolyhedraPhi::ComputeDimensions(), G4ParameterisationPolyhedraZ::ComputeDimensions(), G4ParameterisationTrdX::ComputeDimensions(), G4ParameterisationTrdY::ComputeDimensions(), G4ParameterisationTrdZ::ComputeDimensions(), G4ParameterisationTubsRho::ComputeDimensions(), G4ParameterisationTubsPhi::ComputeDimensions(), G4ParameterisationTubsZ::ComputeDimensions(), G4ReflectedSolid::ComputeDimensions(), G4DisplacedSolid::ComputeDimensions(), G4ScaledSolid::ComputeDimensions(), G4ParameterisedNavigation::ComputeStep(), G4ReplicaNavigation::ComputeStep(), G4DisplacedSolid::CreatePolyhedron(), G4ScaledSolid::CreatePolyhedron(), G4SubtractionSolid::DistanceToIn(), G4Box::DistanceToOut(), G4Orb::DistanceToOut(), G4Para::DistanceToOut(), G4Trap::DistanceToOut(), G4Trd::DistanceToOut(), G4Paraboloid::DistanceToOut(), G4VTwistedFaceted::DistanceToOut(), G4Cons::DistanceToOut(), G4CutTubs::DistanceToOut(), G4Sphere::DistanceToOut(), G4Torus::DistanceToOut(), G4Tubs::DistanceToOut(), G4Ellipsoid::DistanceToOut(), G4EllipticalCone::DistanceToOut(), G4EllipticalTube::DistanceToOut(), G4GenericTrap::DistanceToOut(), G4Polycone::G4Polycone(), G4Polyhedra::G4Polyhedra(), G4BooleanSolid::GetConstituentSolid(), G4NavigationLogger::PostComputeStepLog(), G4Box::SurfaceNormal(), G4Para::SurfaceNormal(), G4Trap::SurfaceNormal(), G4Trd::SurfaceNormal(), G4Ellipsoid::SurfaceNormal(), G4EllipticalCone::SurfaceNormal(), G4EllipticalTube::SurfaceNormal(), G4ExtrudedSolid::SurfaceNormal(), and G4Tet::SurfaceNormal().

◆ EstimateCubicVolume()

G4double G4VSolid::EstimateCubicVolume ( G4int  nStat,
G4double  epsilon 
) const

Definition at line 191 of file G4VSolid.cc.

192{
193 G4int iInside=0;
194 G4double px,py,pz,minX,maxX,minY,maxY,minZ,maxZ,volume,halfepsilon;
196 EInside in;
197
198 // values needed for CalculateExtent signature
199
200 G4VoxelLimits limit; // Unlimited
201 G4AffineTransform origin;
202
203 // min max extents of pSolid along X,Y,Z
204
205 CalculateExtent(kXAxis,limit,origin,minX,maxX);
206 CalculateExtent(kYAxis,limit,origin,minY,maxY);
207 CalculateExtent(kZAxis,limit,origin,minZ,maxZ);
208
209 // limits
210
211 if(nStat < 100) nStat = 100;
212 if(epsilon > 0.01) epsilon = 0.01;
213 halfepsilon = 0.5*epsilon;
214
215 for(auto i = 0; i < nStat; ++i )
216 {
217 px = minX-halfepsilon+(maxX-minX+epsilon)*G4QuickRand();
218 py = minY-halfepsilon+(maxY-minY+epsilon)*G4QuickRand();
219 pz = minZ-halfepsilon+(maxZ-minZ+epsilon)*G4QuickRand();
220 p = G4ThreeVector(px,py,pz);
221 in = Inside(p);
222 if(in != kOutside) ++iInside;
223 }
224 volume = (maxX-minX+epsilon)*(maxY-minY+epsilon)
225 * (maxZ-minZ+epsilon)*iInside/nStat;
226 return volume;
227}
double epsilon(double density, double temperature)
G4double G4QuickRand()
Definition: G4QuickRand.hh:34
CLHEP::Hep3Vector G4ThreeVector
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const =0
virtual EInside Inside(const G4ThreeVector &p) const =0
EInside
Definition: geomdefs.hh:67
@ kOutside
Definition: geomdefs.hh:68

Referenced by GetCubicVolume(), and G4VCSGfaceted::GetCubicVolume().

◆ EstimateSurfaceArea()

G4double G4VSolid::EstimateSurfaceArea ( G4int  nStat,
G4double  ell 
) const

Definition at line 253 of file G4VSolid.cc.

254{
255 static const G4double s2 = 1./std::sqrt(2.);
256 static const G4double s3 = 1./std::sqrt(3.);
257 static const G4ThreeVector directions[64] =
258 {
259 G4ThreeVector( 0, 0, 0), G4ThreeVector( -1, 0, 0), // ( , , ) ( -, , )
260 G4ThreeVector( 1, 0, 0), G4ThreeVector( -1, 0, 0), // ( +, , ) (-+, , )
261 G4ThreeVector( 0, -1, 0), G4ThreeVector(-s2,-s2, 0), // ( , -, ) ( -, -, )
262 G4ThreeVector( s2, -s2, 0), G4ThreeVector( 0, -1, 0), // ( +, -, ) (-+, -, )
263
264 G4ThreeVector( 0, 1, 0), G4ThreeVector( -s2, s2, 0), // ( , +, ) ( -, +, )
265 G4ThreeVector( s2, s2, 0), G4ThreeVector( 0, 1, 0), // ( +, +, ) (-+, +, )
266 G4ThreeVector( 0, -1, 0), G4ThreeVector( -1, 0, 0), // ( ,-+, ) ( -,-+, )
267 G4ThreeVector( 1, 0, 0), G4ThreeVector( -1, 0, 0), // ( +,-+, ) (-+,-+, )
268
269 G4ThreeVector( 0, 0, -1), G4ThreeVector(-s2, 0,-s2), // ( , , -) ( -, , -)
270 G4ThreeVector( s2, 0,-s2), G4ThreeVector( 0, 0, -1), // ( +, , -) (-+, , -)
271 G4ThreeVector( 0,-s2,-s2), G4ThreeVector(-s3,-s3,-s3), // ( , -, -) ( -, -, -)
272 G4ThreeVector( s3,-s3,-s3), G4ThreeVector( 0,-s2,-s2), // ( +, -, -) (-+, -, -)
273
274 G4ThreeVector( 0, s2,-s2), G4ThreeVector(-s3, s3,-s3), // ( , +, -) ( -, +, -)
275 G4ThreeVector( s3, s3,-s3), G4ThreeVector( 0, s2,-s2), // ( +, +, -) (-+, +, -)
276 G4ThreeVector( 0, 0, -1), G4ThreeVector(-s2, 0,-s2), // ( ,-+, -) ( -,-+, -)
277 G4ThreeVector( s2, 0,-s2), G4ThreeVector( 0, 0, -1), // ( +,-+, -) (-+,-+, -)
278
279 G4ThreeVector( 0, 0, 1), G4ThreeVector(-s2, 0, s2), // ( , , +) ( -, , +)
280 G4ThreeVector( s2, 0, s2), G4ThreeVector( 0, 0, 1), // ( +, , +) (-+, , +)
281 G4ThreeVector( 0,-s2, s2), G4ThreeVector(-s3,-s3, s3), // ( , -, +) ( -, -, +)
282 G4ThreeVector( s3,-s3, s3), G4ThreeVector( 0,-s2, s2), // ( +, -, +) (-+, -, +)
283
284 G4ThreeVector( 0, s2, s2), G4ThreeVector(-s3, s3, s3), // ( , +, +) ( -, +, +)
285 G4ThreeVector( s3, s3, s3), G4ThreeVector( 0, s2, s2), // ( +, +, +) (-+, +, +)
286 G4ThreeVector( 0, 0, 1), G4ThreeVector(-s2, 0, s2), // ( ,-+, +) ( -,-+, +)
287 G4ThreeVector( s2, 0, s2), G4ThreeVector( 0, 0, 1), // ( +,-+, +) (-+,-+, +)
288
289 G4ThreeVector( 0, 0, -1), G4ThreeVector( -1, 0, 0), // ( , ,-+) ( -, ,-+)
290 G4ThreeVector( 1, 0, 0), G4ThreeVector( -1, 0, 0), // ( +, ,-+) (-+, ,-+)
291 G4ThreeVector( 0, -1, 0), G4ThreeVector(-s2,-s2, 0), // ( , -,-+) ( -, -,-+)
292 G4ThreeVector( s2, -s2, 0), G4ThreeVector( 0, -1, 0), // ( +, -,-+) (-+, -,-+)
293
294 G4ThreeVector( 0, 1, 0), G4ThreeVector( -s2, s2, 0), // ( , +,-+) ( -, +,-+)
295 G4ThreeVector( s2, s2, 0), G4ThreeVector( 0, 1, 0), // ( +, +,-+) (-+, +,-+)
296 G4ThreeVector( 0, -1, 0), G4ThreeVector( -1, 0, 0), // ( ,-+,-+) ( -,-+,-+)
297 G4ThreeVector( 1, 0, 0), G4ThreeVector( -1, 0, 0), // ( +,-+,-+) (-+,-+,-+)
298 };
299
300 G4ThreeVector bmin, bmax;
301 BoundingLimits(bmin, bmax);
302
303 G4double dX = bmax.x() - bmin.x();
304 G4double dY = bmax.y() - bmin.y();
305 G4double dZ = bmax.z() - bmin.z();
306
307 // Define statistics and shell thickness
308 //
309 G4int npoints = (nstat < 1000) ? 1000 : nstat;
310 G4double coeff = 0.5 / std::cbrt(G4double(npoints));
311 G4double eps = (ell > 0) ? ell : coeff * std::min(std::min(dX, dY), dZ);
312 G4double del = 1.8 * eps; // shold be more than sqrt(3.)
313
314 G4double minX = bmin.x() - eps;
315 G4double minY = bmin.y() - eps;
316 G4double minZ = bmin.z() - eps;
317
318 G4double dd = 2. * eps;
319 dX += dd;
320 dY += dd;
321 dZ += dd;
322
323 // Calculate surface area
324 //
325 G4int icount = 0;
326 for(auto i = 0; i < npoints; ++i)
327 {
328 G4double px = minX + dX*G4QuickRand();
329 G4double py = minY + dY*G4QuickRand();
330 G4double pz = minZ + dZ*G4QuickRand();
331 G4ThreeVector p = G4ThreeVector(px, py, pz);
332 EInside in = Inside(p);
333 G4double dist = 0;
334 if (in == kInside)
335 {
336 if (DistanceToOut(p) >= eps) continue;
337 G4int icase = 0;
338 if (Inside(G4ThreeVector(px-del, py, pz)) != kInside) icase += 1;
339 if (Inside(G4ThreeVector(px+del, py, pz)) != kInside) icase += 2;
340 if (Inside(G4ThreeVector(px, py-del, pz)) != kInside) icase += 4;
341 if (Inside(G4ThreeVector(px, py+del, pz)) != kInside) icase += 8;
342 if (Inside(G4ThreeVector(px, py, pz-del)) != kInside) icase += 16;
343 if (Inside(G4ThreeVector(px, py, pz+del)) != kInside) icase += 32;
344 if (icase == 0) continue;
345 G4ThreeVector v = directions[icase];
346 dist = DistanceToOut(p, v);
347 G4ThreeVector n = SurfaceNormal(p + v*dist);
348 dist *= v.dot(n);
349 }
350 else if (in == kOutside)
351 {
352 if (DistanceToIn(p) >= eps) continue;
353 G4int icase = 0;
354 if (Inside(G4ThreeVector(px-del, py, pz)) != kOutside) icase += 1;
355 if (Inside(G4ThreeVector(px+del, py, pz)) != kOutside) icase += 2;
356 if (Inside(G4ThreeVector(px, py-del, pz)) != kOutside) icase += 4;
357 if (Inside(G4ThreeVector(px, py+del, pz)) != kOutside) icase += 8;
358 if (Inside(G4ThreeVector(px, py, pz-del)) != kOutside) icase += 16;
359 if (Inside(G4ThreeVector(px, py, pz+del)) != kOutside) icase += 32;
360 if (icase == 0) continue;
361 G4ThreeVector v = directions[icase];
362 dist = DistanceToIn(p, v);
363 if (dist == kInfinity) continue;
364 G4ThreeVector n = SurfaceNormal(p + v*dist);
365 dist *= -(v.dot(n));
366 }
367 if (dist < eps) ++icount;
368 }
369 return dX*dY*dZ*icount/npoints/dd;
370}
double z() const
double x() const
double y() const
double dot(const Hep3Vector &) const
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=nullptr, G4ThreeVector *n=nullptr) const =0
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const =0
virtual void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
Definition: G4VSolid.cc:653
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
@ kInside
Definition: geomdefs.hh:70

Referenced by GetSurfaceArea(), G4MultiUnion::GetSurfaceArea(), and G4VCSGfaceted::GetSurfaceArea().

◆ GetConstituentSolid() [1/2]

G4VSolid * G4VSolid::GetConstituentSolid ( G4int  no)
virtual

Reimplemented in G4BooleanSolid.

Definition at line 158 of file G4VSolid.cc.

159{ return nullptr; }

◆ GetConstituentSolid() [2/2]

const G4VSolid * G4VSolid::GetConstituentSolid ( G4int  no) const
virtual

Reimplemented in G4BooleanSolid.

Definition at line 155 of file G4VSolid.cc.

156{ return nullptr; }

Referenced by G4BooleanSolid::StackPolyhedron().

◆ GetCubicVolume()

◆ GetDisplacedSolidPtr() [1/2]

G4DisplacedSolid * G4VSolid::GetDisplacedSolidPtr ( )
virtual

Reimplemented in G4DisplacedSolid.

Definition at line 164 of file G4VSolid.cc.

165{ return nullptr; }

◆ GetDisplacedSolidPtr() [2/2]

const G4DisplacedSolid * G4VSolid::GetDisplacedSolidPtr ( ) const
virtual

Reimplemented in G4DisplacedSolid.

Definition at line 161 of file G4VSolid.cc.

162{ return nullptr; }

◆ GetEntityType()

virtual G4GeometryType G4VSolid::GetEntityType ( ) const
pure virtual

Implemented in G4ReflectedSolid, G4BooleanSolid, G4DisplacedSolid, G4IntersectionSolid, G4MultiUnion, G4ScaledSolid, G4SubtractionSolid, G4UnionSolid, G4Box, G4Cons, G4CutTubs, G4Orb, G4Para, G4Sphere, G4Torus, G4Trap, G4Trd, G4Tubs, G4Ellipsoid, G4EllipticalCone, G4EllipticalTube, G4ExtrudedSolid, G4GenericPolycone, G4GenericTrap, G4Hype, G4Paraboloid, G4Polycone, G4Polyhedra, G4TessellatedSolid, G4Tet, G4TwistedBox, G4TwistedTrap, G4TwistedTrd, G4TwistedTubs, G4VCSGfaceted, and G4VTwistedFaceted.

Referenced by G4GMocrenFileSceneHandler::AddPrimitive(), G4GDMLWriteSolids::AddSolid(), BoundingLimits(), G4tgbVolume::BuildSolidForDivision(), G4PVPlacement::CheckOverlaps(), Clone(), G4GeometryWorkspace::CloneParameterisedSolids(), G4GeometryWorkspace::CloneReplicaSolid(), G4VoxelNavigation::ComputeSafety(), G4NavigationLogger::ComputeSafetyLog(), G4VDivisionParameterisation::ComputeSolid(), G4PhysicalVolumeModel::CreateCurrentAttValues(), G4SubtractionSolid::DistanceToIn(), G4tgbGeometryDumper::DumpPVParameterised(), G4tgbGeometryDumper::DumpSolid(), G4tgbVolume::FindOrConstructG4Solid(), G4DisplacedSolid::G4DisplacedSolid(), G4VParameterisationBox::G4VParameterisationBox(), G4VParameterisationCons::G4VParameterisationCons(), G4VParameterisationPara::G4VParameterisationPara(), G4VParameterisationPolycone::G4VParameterisationPolycone(), G4VParameterisationPolyhedra::G4VParameterisationPolyhedra(), G4VParameterisationTrd::G4VParameterisationTrd(), G4VParameterisationTubs::G4VParameterisationTubs(), G4Navigator::GetGlobalExitNormal(), G4BooleanSolid::GetListOfPrimitives(), G4Navigator::GetLocalExitNormal(), G4ITNavigator1::GetLocalExitNormal(), G4ITNavigator2::GetLocalExitNormal(), GetPointOnSurface(), G4tgbGeometryDumper::GetSolidParams(), G4NavigationLogger::PostComputeStepLog(), G4NavigationLogger::PreComputeStepLog(), G4NavigationLogger::PrintDaughterLog(), G4NavigationLogger::ReportOutsideMother(), G4ASCIITreeSceneHandler::RequestPrimitives(), G4VoxelSafety::SafetyForVoxelHeader(), G4BooleanSolid::StackPolyhedron(), G4CSGSolid::StreamInfo(), G4GeomTestVolume::TestOverlapInTree(), and G4PhysicalVolumeModel::VisitGeometryAndGetVisReps().

◆ GetExtent()

G4VisExtent G4VSolid::GetExtent ( ) const
virtual

Reimplemented in G4Box, G4Orb, G4Sphere, G4Ellipsoid, G4EllipticalCone, G4EllipticalTube, G4GenericTrap, G4Hype, G4TessellatedSolid, G4Tet, G4TwistedTubs, G4VCSGfaceted, and G4VTwistedFaceted.

Definition at line 670 of file G4VSolid.cc.

671{
672 G4VisExtent extent;
673 G4VoxelLimits voxelLimits; // Defaults to "infinite" limits.
674 G4AffineTransform affineTransform;
675 G4double vmin, vmax;
676 CalculateExtent(kXAxis,voxelLimits,affineTransform,vmin,vmax);
677 extent.SetXmin (vmin);
678 extent.SetXmax (vmax);
679 CalculateExtent(kYAxis,voxelLimits,affineTransform,vmin,vmax);
680 extent.SetYmin (vmin);
681 extent.SetYmax (vmax);
682 CalculateExtent(kZAxis,voxelLimits,affineTransform,vmin,vmax);
683 extent.SetZmin (vmin);
684 extent.SetZmax (vmax);
685 return extent;
686}
void SetYmin(G4double ymin)
Definition: G4VisExtent.hh:114
void SetYmax(G4double ymax)
Definition: G4VisExtent.hh:116
void SetXmax(G4double xmax)
Definition: G4VisExtent.hh:112
void SetXmin(G4double xmin)
Definition: G4VisExtent.hh:110
void SetZmax(G4double zmax)
Definition: G4VisExtent.hh:120
void SetZmin(G4double zmin)
Definition: G4VisExtent.hh:118

Referenced by G4tgbVolume::BuildSolidForDivision(), and G4VisCommandsTouchable::SetNewValue().

◆ GetName()

G4String G4VSolid::GetName ( ) const
inline

Referenced by G4GMocrenFileSceneHandler::AddPrimitive(), G4HepRepFileSceneHandler::AddSolid(), G4XXXFileSceneHandler::AddSolid(), G4XXXSGSceneHandler::AddSolid(), G4XXXStoredSceneHandler::AddSolid(), G4GMocrenFileSceneHandler::AddSolid(), G4GDMLWriteSolids::AddSolid(), G4NavigationLogger::AlongComputeStepLog(), G4GDMLWriteSolids::BooleanWrite(), G4ReflectedSolid::BoundingLimits(), G4DisplacedSolid::BoundingLimits(), G4IntersectionSolid::BoundingLimits(), G4ScaledSolid::BoundingLimits(), G4SubtractionSolid::BoundingLimits(), G4UnionSolid::BoundingLimits(), G4Box::BoundingLimits(), G4Cons::BoundingLimits(), G4CutTubs::BoundingLimits(), G4Orb::BoundingLimits(), G4Para::BoundingLimits(), G4Sphere::BoundingLimits(), G4Torus::BoundingLimits(), G4Trap::BoundingLimits(), G4Trd::BoundingLimits(), G4Tubs::BoundingLimits(), G4EllipticalCone::BoundingLimits(), G4ExtrudedSolid::BoundingLimits(), G4GenericPolycone::BoundingLimits(), G4GenericTrap::BoundingLimits(), G4Hype::BoundingLimits(), G4Paraboloid::BoundingLimits(), G4Polycone::BoundingLimits(), G4Polyhedra::BoundingLimits(), G4TessellatedSolid::BoundingLimits(), G4TwistedTubs::BoundingLimits(), G4GDMLWriteSolids::BoxWrite(), G4ExtrudedSolid::CalculateExtent(), G4GenericPolycone::CalculateExtent(), G4Polycone::CalculateExtent(), G4Polyhedra::CalculateExtent(), G4NavigationLogger::CheckDaughterEntryPoint(), G4VDivisionParameterisation::CheckNDivAndWidth(), G4VDivisionParameterisation::CheckOffset(), G4ParameterisationPolyconeRho::CheckParametersValidity(), G4ParameterisationPolyconeZ::CheckParametersValidity(), G4ParameterisationPolyhedraRho::CheckParametersValidity(), G4ParameterisationPolyhedraPhi::CheckParametersValidity(), G4ParameterisationPolyhedraZ::CheckParametersValidity(), G4PhantomParameterisation::CheckVoxelsFillContainer(), G4VoxelNavigation::ComputeSafety(), G4VoxelSafety::ComputeSafety(), G4NavigationLogger::ComputeSafetyLog(), G4ParameterisedNavigation::ComputeStep(), G4ReplicaNavigation::ComputeStep(), G4GDMLWriteSolids::ConeWrite(), G4Polyhedra::Create(), G4GenericPolycone::Create(), G4Polycone::Create(), G4PhysicalVolumeModel::CreateCurrentAttValues(), G4ReflectedSolid::CreatePolyhedron(), G4GenericPolycone::CreatePolyhedron(), G4Polyhedra::CreatePolyhedron(), G4GDMLWriteSolids::CutTubeWrite(), G4PhysicalVolumeModel::DescribeSolid(), G4SubtractionSolid::DistanceToIn(), G4Paraboloid::DistanceToIn(), G4TessellatedSolid::DistanceToIn(), G4Box::DistanceToOut(), G4Orb::DistanceToOut(), G4Para::DistanceToOut(), G4Trap::DistanceToOut(), G4Trd::DistanceToOut(), G4EllipticalCone::DistanceToOut(), G4TessellatedSolid::DistanceToOut(), G4Ellipsoid::DistanceToOut(), G4EllipticalTube::DistanceToOut(), G4tgbGeometryDumper::DumpSolid(), G4GDMLWriteSolids::ElconeWrite(), G4GDMLWriteSolids::EllipsoidWrite(), G4GDMLWriteSolids::EltubeWrite(), G4Box::G4Box(), G4Cons::G4Cons(), G4CutTubs::G4CutTubs(), G4EllipticalCone::G4EllipticalCone(), G4Hype::G4Hype(), G4Para::G4Para(), G4Paraboloid::G4Paraboloid(), G4Polycone::G4Polycone(), G4Polyhedra::G4Polyhedra(), G4Sphere::G4Sphere(), G4Tet::G4Tet(), G4Trap::G4Trap(), G4Tubs::G4Tubs(), G4VParameterisationCons::G4VParameterisationCons(), G4VParameterisationPara::G4VParameterisationPara(), G4VParameterisationPolycone::G4VParameterisationPolycone(), G4VParameterisationPolyhedra::G4VParameterisationPolyhedra(), G4VParameterisationTrd::G4VParameterisationTrd(), G4VTwistedFaceted::G4VTwistedFaceted(), G4GDMLWriteSolids::GenericPolyconeWrite(), G4GDMLWriteSolids::GenTrapWrite(), G4Navigator::GetGlobalExitNormal(), G4Navigator::GetLocalExitNormal(), G4ITNavigator1::GetLocalExitNormal(), G4ITNavigator2::GetLocalExitNormal(), G4BooleanSolid::GetPointOnSurface(), G4PhantomParameterisation::GetReplicaNo(), G4GDMLWriteSolids::HypeWrite(), G4ITNavigator1::LocateGlobalPointAndSetup(), G4ITNavigator2::LocateGlobalPointAndSetup(), G4Navigator::LocateGlobalPointAndSetup(), G4Trap::MakePlanes(), G4GDMLWriteSolids::MultiUnionWrite(), G4GDMLWriteSolids::OrbWrite(), G4GDMLWriteSolids::ParaboloidWrite(), G4GDMLWriteParamvol::ParametersWrite(), G4GDMLWriteSolids::ParaWrite(), G4GDMLWriteSolids::PolyconeWrite(), G4GDMLWriteSolids::PolyhedraWrite(), G4NavigationLogger::PostComputeStepLog(), G4NavigationLogger::PreComputeStepLog(), G4NavigationLogger::PrintDaughterLog(), G4tgbVolumeMgr::RegisterMe(), G4NavigationLogger::ReportOutsideMother(), G4ASCIITreeSceneHandler::RequestPrimitives(), G4VSceneHandler::RequestPrimitives(), G4GenericPolycone::Reset(), G4Polyhedra::Reset(), G4VoxelSafety::SafetyForVoxelNode(), G4GDMLWriteSolids::ScaledWrite(), G4Torus::SetAllParameters(), G4Polycone::SetOriginalParameters(), G4Polyhedra::SetOriginalParameters(), G4Tet::SetVertices(), G4Box::SetXHalfLength(), G4Box::SetYHalfLength(), G4Box::SetZHalfLength(), G4GDMLWriteSolids::SphereWrite(), G4BooleanSolid::StackPolyhedron(), G4ReflectedSolid::StreamInfo(), G4BooleanSolid::StreamInfo(), G4DisplacedSolid::StreamInfo(), G4MultiUnion::StreamInfo(), G4ScaledSolid::StreamInfo(), G4Box::StreamInfo(), G4Cons::StreamInfo(), G4CSGSolid::StreamInfo(), G4CutTubs::StreamInfo(), G4Orb::StreamInfo(), G4Para::StreamInfo(), G4Sphere::StreamInfo(), G4Torus::StreamInfo(), G4Trap::StreamInfo(), G4Trd::StreamInfo(), G4Tubs::StreamInfo(), G4Ellipsoid::StreamInfo(), G4EllipticalCone::StreamInfo(), G4EllipticalTube::StreamInfo(), G4ExtrudedSolid::StreamInfo(), G4GenericPolycone::StreamInfo(), G4GenericTrap::StreamInfo(), G4Hype::StreamInfo(), G4Paraboloid::StreamInfo(), G4Polycone::StreamInfo(), G4Polyhedra::StreamInfo(), G4TessellatedSolid::StreamInfo(), G4Tet::StreamInfo(), G4TwistedBox::StreamInfo(), G4TwistedTrap::StreamInfo(), G4TwistedTrd::StreamInfo(), G4TwistedTubs::StreamInfo(), G4VCSGfaceted::StreamInfo(), G4VTwistedFaceted::StreamInfo(), G4GDMLRead::StripNames(), SubstractSolids(), G4UnionSolid::SurfaceNormal(), G4Box::SurfaceNormal(), G4Para::SurfaceNormal(), G4Trap::SurfaceNormal(), G4Trd::SurfaceNormal(), G4Ellipsoid::SurfaceNormal(), G4EllipticalCone::SurfaceNormal(), G4EllipticalTube::SurfaceNormal(), G4ExtrudedSolid::SurfaceNormal(), G4Tet::SurfaceNormal(), G4GDMLWriteSolids::TessellatedWrite(), G4GDMLWriteSolids::TetWrite(), G4GDMLWriteSolids::TorusWrite(), G4GDMLWriteSolids::TrapWrite(), G4GDMLWriteStructure::TraverseVolumeTree(), G4GDMLWriteSolids::TrdWrite(), G4GDMLWriteSolids::TubeWrite(), G4GDMLWriteSolids::TwistedboxWrite(), G4GDMLWriteSolids::TwistedtrapWrite(), G4GDMLWriteSolids::TwistedtrdWrite(), G4GDMLWriteSolids::TwistedtubsWrite(), G4PhysicalVolumeModel::VisitGeometryAndGetVisReps(), and G4GDMLWriteSolids::XtruWrite().

◆ GetPointOnSurface()

◆ GetPolyhedron()

◆ GetSurfaceArea()

◆ GetTolerance()

◆ Inside()

virtual EInside G4VSolid::Inside ( const G4ThreeVector p) const
pure virtual

Implemented in G4MultiUnion, G4ReflectedSolid, G4DisplacedSolid, G4IntersectionSolid, G4ScaledSolid, G4SubtractionSolid, G4UnionSolid, G4Box, G4Cons, G4CutTubs, G4Orb, G4Para, G4Sphere, G4Torus, G4Trap, G4Trd, G4Tubs, G4Ellipsoid, G4EllipticalCone, G4EllipticalTube, G4ExtrudedSolid, G4GenericPolycone, G4GenericTrap, G4Hype, G4Paraboloid, G4Polycone, G4Polyhedra, G4TessellatedSolid, G4Tet, G4TwistedTubs, G4VCSGfaceted, and G4VTwistedFaceted.

Referenced by G4NavigationLogger::AlongComputeStepLog(), G4ReplicaNavigation::BackLocate(), G4NavigationLogger::CheckDaughterEntryPoint(), G4PVParameterised::CheckOverlaps(), G4PVPlacement::CheckOverlaps(), G4VoxelNavigation::ComputeSafety(), G4VoxelSafety::ComputeSafety(), G4ParameterisedNavigation::ComputeStep(), G4ReplicaNavigation::ComputeStep(), G4RegularNavigation::ComputeStepSkippingEqualMaterials(), G4TheRayTracer::CreateBitMap(), G4DNAMolecularDissociation::DecayIt(), G4LogicalVolumeModel::DescribeYourselfTo(), G4VFieldModel::DescribeYourselfTo(), G4PolyPhiFace::Diagnose(), G4IntersectionSolid::DistanceToIn(), G4SubtractionSolid::DistanceToIn(), G4MultiUnion::DistanceToOut(), G4UnionSolid::DistanceToOut(), G4MultiUnion::DistanceToOutNoVoxels(), G4MultiUnion::DistanceToOutVoxels(), EstimateCubicVolume(), EstimateSurfaceArea(), G4Navigator::GetLocalExitNormal(), G4ITNavigator1::GetLocalExitNormal(), G4ITNavigator2::GetLocalExitNormal(), G4BooleanSolid::GetPointOnSurface(), G4ITNavigator2::GetRandomInCurrentVolume(), G4PhantomParameterisation::GetReplicaNo(), G4ReflectedSolid::Inside(), G4DisplacedSolid::Inside(), G4IntersectionSolid::Inside(), G4ScaledSolid::Inside(), G4SubtractionSolid::Inside(), G4UnionSolid::Inside(), G4VExternalNavigation::Inside(), G4ITNavigator2::InsideCurrentVolume(), G4MultiUnion::InsideNoVoxels(), G4ITNavigator1::LocateGlobalPointAndSetup(), G4ITNavigator2::LocateGlobalPointAndSetup(), G4Navigator::LocateGlobalPointAndSetup(), G4VIntersectionLocator::LocateGlobalPointWithinVolumeAndCheck(), G4NavigationLogger::PreComputeStepLog(), G4ITNavigator2::RecheckDistanceToCurrentBoundary(), G4Navigator::RecheckDistanceToCurrentBoundary(), G4NavigationLogger::ReportOutsideMother(), G4NavigationLogger::ReportVolumeAndIntersection(), G4RTPrimaryGeneratorAction::SetUp(), G4MultiUnion::SurfaceNormal(), G4IntersectionSolid::SurfaceNormal(), G4SubtractionSolid::SurfaceNormal(), and G4UnionSolid::SurfaceNormal().

◆ operator=()

◆ operator==()

G4bool G4VSolid::operator== ( const G4VSolid s) const
inline

◆ SetName()

void G4VSolid::SetName ( const G4String name)
inline

◆ StreamInfo()

◆ SurfaceNormal()

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const G4VSolid e 
)
friend

Definition at line 116 of file G4VSolid.cc.

117{
118 return e.StreamInfo(os);
119}
virtual std::ostream & StreamInfo(std::ostream &os) const =0

Member Data Documentation

◆ kCarTolerance

G4double G4VSolid::kCarTolerance
protected

Definition at line 302 of file G4VSolid.hh.

Referenced by G4TessellatedSolid::AddFacet(), G4Polycone::CalculateExtent(), G4Polyhedra::CalculateExtent(), G4Tet::CheckDegeneracy(), G4Polyhedra::Create(), G4GenericPolycone::Create(), G4Polycone::Create(), G4CutTubs::CreatePolyhedron(), G4GenericPolycone::CreatePolyhedron(), G4Polyhedra::CreatePolyhedron(), G4VCSGfaceted::DistanceTo(), G4Sphere::DistanceToIn(), G4Ellipsoid::DistanceToIn(), G4Hype::DistanceToIn(), G4Paraboloid::DistanceToIn(), G4VCSGfaceted::DistanceToIn(), G4UnionSolid::DistanceToOut(), G4Cons::DistanceToOut(), G4CutTubs::DistanceToOut(), G4Sphere::DistanceToOut(), G4Torus::DistanceToOut(), G4Tubs::DistanceToOut(), G4GenericTrap::DistanceToOut(), G4Hype::DistanceToOut(), G4Paraboloid::DistanceToOut(), G4VCSGfaceted::DistanceToOut(), G4Box::G4Box(), G4Cons::G4Cons(), G4CutTubs::G4CutTubs(), G4EllipticalCone::G4EllipticalCone(), G4ExtrudedSolid::G4ExtrudedSolid(), G4GenericTrap::G4GenericTrap(), G4Hype::G4Hype(), G4Para::G4Para(), G4Sphere::G4Sphere(), G4Tet::G4Tet(), G4Trap::G4Trap(), G4Tubs::G4Tubs(), G4UnionSolid::G4UnionSolid(), G4VSolid(), G4VTwistedFaceted::G4VTwistedFaceted(), G4GenericPolycone::GetPointOnSurface(), G4Polycone::GetPointOnSurface(), G4Orb::Initialize(), G4SubtractionSolid::Inside(), G4Hype::Inside(), G4Paraboloid::Inside(), G4VCSGfaceted::Inside(), G4VTwistedFaceted::Inside(), G4CutTubs::IsCrossingCutPlanes(), G4Trap::MakePlane(), operator=(), G4TessellatedSolid::SafetyFromInside(), G4TessellatedSolid::SafetyFromOutside(), G4Torus::SetAllParameters(), G4Polycone::SetOriginalParameters(), G4Polyhedra::SetOriginalParameters(), G4Box::SetXHalfLength(), G4Box::SetYHalfLength(), G4Box::SetZHalfLength(), G4Torus::SurfaceNormal(), G4GenericTrap::SurfaceNormal(), and G4Paraboloid::SurfaceNormal().


The documentation for this class was generated from the following files: