Geant4 9.6.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 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=0, G4ThreeVector *n=0) 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 G4NURBSCreateNURBS () 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)
 

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
 
G4double EstimateCubicVolume (G4int nStat, G4double epsilon) const
 
G4double EstimateSurfaceArea (G4int nStat, G4double ell) const
 

Protected Attributes

G4double kCarTolerance
 

Friends

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

Detailed Description

Definition at line 88 of file G4VSolid.hh.

Constructor & Destructor Documentation

◆ G4VSolid() [1/3]

G4VSolid::G4VSolid ( const G4String name)

Definition at line 60 of file G4VSolid.cc.

61 : fshapeName(name)
62{
64
65 // Register to store
66 //
68}
G4double GetSurfaceTolerance() const
static G4GeometryTolerance * GetInstance()
static void Register(G4VSolid *pSolid)
static G4SolidStore * GetInstance()
G4double kCarTolerance
Definition: G4VSolid.hh:307

◆ ~G4VSolid()

G4VSolid::~G4VSolid ( )
virtual

Definition at line 101 of file G4VSolid.cc.

102{
104}
static void DeRegister(G4VSolid *pSolid)

◆ G4VSolid() [2/3]

G4VSolid::G4VSolid ( __void__ &  )

Definition at line 88 of file G4VSolid.cc.

89 : fshapeName("")
90{
91 // Register to store
92 //
94}

◆ G4VSolid() [3/3]

G4VSolid::G4VSolid ( const G4VSolid rhs)

Definition at line 75 of file G4VSolid.cc.

76 : kCarTolerance(rhs.kCarTolerance), fshapeName(rhs.fshapeName)
77{
78 // Register to store
79 //
81}

Member Function Documentation

◆ CalculateClippedPolygonExtent()

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

Definition at line 425 of file G4VSolid.cc.

430{
431 G4int noLeft,i;
432 G4double component;
433 /*
434 G4cout<<G4endl;
435 for(i = 0 ; i < pPolygon.size() ; i++ )
436 {
437 G4cout << i << "\t"
438 << "p.x = " << pPolygon[i].operator()(pAxis) << "\t"
439 // << "p.y = " << pPolygon[i].y() << "\t"
440 // << "p.z = " << pPolygon[i].z() << "\t"
441 << G4endl;
442 }
443 G4cout<<G4endl;
444 */
445 ClipPolygon(pPolygon,pVoxelLimit,pAxis);
446 noLeft = pPolygon.size();
447
448 if ( noLeft )
449 {
450 // G4cout<<G4endl;
451 for (i=0;i<noLeft;i++)
452 {
453 component = pPolygon[i].operator()(pAxis);
454 // G4cout <<i<<"\t"<<component<<G4endl;
455
456 if (component < pMin)
457 {
458 // G4cout <<i<<"\t"<<"Pmin = "<<component<<G4endl;
459 pMin = component;
460 }
461 if (component > pMax)
462 {
463 // G4cout <<i<<"\t"<<"PMax = "<<component<<G4endl;
464 pMax = component;
465 }
466 }
467 // G4cout<<G4endl;
468 }
469 // G4cout<<"pMin = "<<pMin<<"\t"<<"pMax = "<<pMax<<G4endl;
470}
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
void ClipPolygon(G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis) const
Definition: G4VSolid.cc:492

Referenced by G4Sphere::CalculateExtent(), G4Ellipsoid::CalculateExtent(), 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 376 of file G4VSolid.cc.

381{
382 G4ThreeVectorList polygon;
383 polygon.reserve(4);
384 polygon.push_back((*pVertices)[pSectionIndex]);
385 polygon.push_back((*pVertices)[pSectionIndex+4]);
386 polygon.push_back((*pVertices)[pSectionIndex+5]);
387 polygon.push_back((*pVertices)[pSectionIndex+1]);
388 // G4cout<<"ClipBetweenSections: 0-4-5-1"<<G4endl;
389 CalculateClippedPolygonExtent(polygon,pVoxelLimit,pAxis,pMin,pMax);
390 polygon.clear();
391
392 polygon.push_back((*pVertices)[pSectionIndex+1]);
393 polygon.push_back((*pVertices)[pSectionIndex+5]);
394 polygon.push_back((*pVertices)[pSectionIndex+6]);
395 polygon.push_back((*pVertices)[pSectionIndex+2]);
396 // G4cout<<"ClipBetweenSections: 1-5-6-2"<<G4endl;
397 CalculateClippedPolygonExtent(polygon,pVoxelLimit,pAxis,pMin,pMax);
398 polygon.clear();
399
400 polygon.push_back((*pVertices)[pSectionIndex+2]);
401 polygon.push_back((*pVertices)[pSectionIndex+6]);
402 polygon.push_back((*pVertices)[pSectionIndex+7]);
403 polygon.push_back((*pVertices)[pSectionIndex+3]);
404 // G4cout<<"ClipBetweenSections: 2-6-7-3"<<G4endl;
405 CalculateClippedPolygonExtent(polygon,pVoxelLimit,pAxis,pMin,pMax);
406 polygon.clear();
407
408 polygon.push_back((*pVertices)[pSectionIndex+3]);
409 polygon.push_back((*pVertices)[pSectionIndex+7]);
410 polygon.push_back((*pVertices)[pSectionIndex+4]);
411 polygon.push_back((*pVertices)[pSectionIndex]);
412 // G4cout<<"ClipBetweenSections: 3-7-4-0"<<G4endl;
413 CalculateClippedPolygonExtent(polygon,pVoxelLimit,pAxis,pMin,pMax);
414 return;
415}
std::vector< G4ThreeVector > G4ThreeVectorList
Definition: G4VSolid.hh:85
void CalculateClippedPolygonExtent(G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
Definition: G4VSolid.cc:425

Referenced by G4ReflectedSolid::CalculateExtent(), G4BREPSolid::CalculateExtent(), G4Box::CalculateExtent(), G4Cons::CalculateExtent(), G4CutTubs::CalculateExtent(), G4Para::CalculateExtent(), G4Torus::CalculateExtent(), G4Trd::CalculateExtent(), G4Tubs::CalculateExtent(), G4GenericTrap::CalculateExtent(), and G4VTwistedFaceted::CalculateExtent().

◆ ClipCrossSection()

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

Definition at line 345 of file G4VSolid.cc.

350{
351
352 G4ThreeVectorList polygon;
353 polygon.reserve(4);
354 polygon.push_back((*pVertices)[pSectionIndex]);
355 polygon.push_back((*pVertices)[pSectionIndex+1]);
356 polygon.push_back((*pVertices)[pSectionIndex+2]);
357 polygon.push_back((*pVertices)[pSectionIndex+3]);
358 // G4cout<<"ClipCrossSection: 0-1-2-3"<<G4endl;
359 CalculateClippedPolygonExtent(polygon,pVoxelLimit,pAxis,pMin,pMax);
360 return;
361}

Referenced by G4ReflectedSolid::CalculateExtent(), G4BREPSolid::CalculateExtent(), G4Box::CalculateExtent(), G4Cons::CalculateExtent(), G4CutTubs::CalculateExtent(), G4Para::CalculateExtent(), G4Torus::CalculateExtent(), G4Trd::CalculateExtent(), G4Tubs::CalculateExtent(), G4GenericTrap::CalculateExtent(), and G4VTwistedFaceted::CalculateExtent().

◆ ClipPolygon()

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

Definition at line 492 of file G4VSolid.cc.

495{
496 G4ThreeVectorList outputPolygon;
497
498 if ( pVoxelLimit.IsLimited() )
499 {
500 if (pVoxelLimit.IsXLimited() ) // && pAxis != kXAxis)
501 {
502 G4VoxelLimits simpleLimit1;
503 simpleLimit1.AddLimit(kXAxis,pVoxelLimit.GetMinXExtent(),kInfinity);
504 // G4cout<<"MinXExtent()"<<G4endl;
505 ClipPolygonToSimpleLimits(pPolygon,outputPolygon,simpleLimit1);
506
507 pPolygon.clear();
508
509 if ( !outputPolygon.size() ) return;
510
511 G4VoxelLimits simpleLimit2;
512 // G4cout<<"MaxXExtent()"<<G4endl;
513 simpleLimit2.AddLimit(kXAxis,-kInfinity,pVoxelLimit.GetMaxXExtent());
514 ClipPolygonToSimpleLimits(outputPolygon,pPolygon,simpleLimit2);
515
516 if ( !pPolygon.size() ) return;
517 else outputPolygon.clear();
518 }
519 if ( pVoxelLimit.IsYLimited() ) // && pAxis != kYAxis)
520 {
521 G4VoxelLimits simpleLimit1;
522 simpleLimit1.AddLimit(kYAxis,pVoxelLimit.GetMinYExtent(),kInfinity);
523 ClipPolygonToSimpleLimits(pPolygon,outputPolygon,simpleLimit1);
524
525 // Must always clear pPolygon - for clip to simpleLimit2 and in case of
526 // early exit
527
528 pPolygon.clear();
529
530 if ( !outputPolygon.size() ) return;
531
532 G4VoxelLimits simpleLimit2;
533 simpleLimit2.AddLimit(kYAxis,-kInfinity,pVoxelLimit.GetMaxYExtent());
534 ClipPolygonToSimpleLimits(outputPolygon,pPolygon,simpleLimit2);
535
536 if ( !pPolygon.size() ) return;
537 else outputPolygon.clear();
538 }
539 if ( pVoxelLimit.IsZLimited() ) // && pAxis != kZAxis)
540 {
541 G4VoxelLimits simpleLimit1;
542 simpleLimit1.AddLimit(kZAxis,pVoxelLimit.GetMinZExtent(),kInfinity);
543 ClipPolygonToSimpleLimits(pPolygon,outputPolygon,simpleLimit1);
544
545 // Must always clear pPolygon - for clip to simpleLimit2 and in case of
546 // early exit
547
548 pPolygon.clear();
549
550 if ( !outputPolygon.size() ) return;
551
552 G4VoxelLimits simpleLimit2;
553 simpleLimit2.AddLimit(kZAxis,-kInfinity,pVoxelLimit.GetMaxZExtent());
554 ClipPolygonToSimpleLimits(outputPolygon,pPolygon,simpleLimit2);
555
556 // Return after final clip - no cleanup
557 }
558 }
559}
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:54
@ kXAxis
Definition: geomdefs.hh:54
@ kZAxis
Definition: geomdefs.hh:54

Referenced by CalculateClippedPolygonExtent().

◆ Clone()

G4VSolid * G4VSolid::Clone ( ) const
virtual

Reimplemented in G4ReflectedSolid, G4DisplacedSolid, G4IntersectionSolid, G4SubtractionSolid, G4UnionSolid, G4BREPSolid, G4BREPSolidBox, G4BREPSolidCone, G4BREPSolidCylinder, G4BREPSolidOpenPCone, G4BREPSolidPCone, G4BREPSolidPolyhedra, G4BREPSolidSphere, G4BREPSolidTorus, G4Box, G4Cons, G4CutTubs, G4Orb, G4Para, G4Sphere, G4Torus, G4Trap, G4Trd, G4Tubs, G4Ellipsoid, G4EllipticalCone, G4EllipticalTube, G4ExtrudedSolid, G4GenericTrap, G4Hype, G4Paraboloid, G4Polycone, G4Polyhedra, G4TessellatedSolid, G4Tet, G4TwistedBox, G4TwistedTrap, G4TwistedTrd, and G4TwistedTubs.

Definition at line 322 of file G4VSolid.cc.

323{
324 std::ostringstream message;
325 message << "Clone() method not implemented for type: "
326 << GetEntityType() << "!" << G4endl
327 << "Returning NULL pointer!";
328 G4Exception("G4VSolid::Clone()", "GeomMgt1001", JustWarning, message);
329 return 0;
330}
@ JustWarning
#define G4endl
Definition: G4ios.hh:52
virtual G4GeometryType GetEntityType() const =0
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

◆ ComputeDimensions()

◆ CreateNURBS()

◆ CreatePolyhedron()

◆ DescribeYourselfTo()

◆ DistanceToIn() [1/2]

◆ DistanceToIn() [2/2]

◆ DistanceToOut() [1/2]

◆ DistanceToOut() [2/2]

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

◆ DumpInfo()

void G4VSolid::DumpInfo ( ) const
inline

Referenced by G4CutTubs::ApproxSurfaceNormal(), G4Tubs::ApproxSurfaceNormal(), G4ReflectedSolid::CalculateExtent(), 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(), G4ParameterisedNavigation::ComputeStep(), G4ReplicaNavigation::ComputeStep(), G4Ellipsoid::CreateRotatedVertices(), G4Box::CreateRotatedVertices(), G4CutTubs::CreateRotatedVertices(), G4Para::CreateRotatedVertices(), G4Trap::CreateRotatedVertices(), G4Trd::CreateRotatedVertices(), G4Tubs::CreateRotatedVertices(), G4Tet::CreateRotatedVertices(), G4VTwistedFaceted::CreateRotatedVertices(), G4SubtractionSolid::DistanceToIn(), G4Paraboloid::DistanceToOut(), G4VTwistedFaceted::DistanceToOut(), G4Box::DistanceToOut(), G4Trap::DistanceToOut(), G4Trd::DistanceToOut(), G4EllipticalTube::DistanceToOut(), G4GenericTrap::DistanceToOut(), G4Tet::DistanceToOut(), G4Cons::DistanceToOut(), G4CutTubs::DistanceToOut(), G4Orb::DistanceToOut(), G4Para::DistanceToOut(), G4Sphere::DistanceToOut(), G4Torus::DistanceToOut(), G4Tubs::DistanceToOut(), G4Ellipsoid::DistanceToOut(), G4EllipticalCone::DistanceToOut(), G4Polycone::G4Polycone(), G4Polyhedra::G4Polyhedra(), G4Trap::G4Trap(), G4BooleanSolid::GetConstituentSolid(), G4NavigationLogger::PostComputeStepLog(), G4NavigationLogger::PreComputeStepLog(), and G4Orb::SurfaceNormal().

◆ EstimateCubicVolume()

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

Definition at line 203 of file G4VSolid.cc.

204{
205 G4int iInside=0;
206 G4double px,py,pz,minX,maxX,minY,maxY,minZ,maxZ,volume;
208 EInside in;
209
210 // values needed for CalculateExtent signature
211
212 G4VoxelLimits limit; // Unlimited
213 G4AffineTransform origin;
214
215 // min max extents of pSolid along X,Y,Z
216
217 this->CalculateExtent(kXAxis,limit,origin,minX,maxX);
218 this->CalculateExtent(kYAxis,limit,origin,minY,maxY);
219 this->CalculateExtent(kZAxis,limit,origin,minZ,maxZ);
220
221 // limits
222
223 if(nStat < 100) nStat = 100;
224 if(epsilon > 0.01) epsilon = 0.01;
225
226 for(G4int i = 0; i < nStat; i++ )
227 {
228 px = minX+(maxX-minX)*G4UniformRand();
229 py = minY+(maxY-minY)*G4UniformRand();
230 pz = minZ+(maxZ-minZ)*G4UniformRand();
231 p = G4ThreeVector(px,py,pz);
232 in = this->Inside(p);
233 if(in != kOutside) iInside++;
234 }
235 volume = (maxX-minX)*(maxY-minY)*(maxZ-minZ)*iInside/nStat;
236 return volume;
237}
CLHEP::Hep3Vector G4ThreeVector
#define G4UniformRand()
Definition: Randomize.hh:53
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:58
@ kOutside
Definition: geomdefs.hh:58

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

◆ EstimateSurfaceArea()

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

Definition at line 261 of file G4VSolid.cc.

262{
263 G4int inside=0;
264 G4double px,py,pz,minX,maxX,minY,maxY,minZ,maxZ,surf;
266 EInside in;
267
268 // values needed for CalculateExtent signature
269
270 G4VoxelLimits limit; // Unlimited
271 G4AffineTransform origin;
272
273 // min max extents of pSolid along X,Y,Z
274
275 this->CalculateExtent(kXAxis,limit,origin,minX,maxX);
276 this->CalculateExtent(kYAxis,limit,origin,minY,maxY);
277 this->CalculateExtent(kZAxis,limit,origin,minZ,maxZ);
278
279 // limits
280
281 if(nStat < 100) { nStat = 100; }
282
283 G4double dX=maxX-minX;
284 G4double dY=maxY-minY;
285 G4double dZ=maxZ-minZ;
286 if(ell<=0.) // Automatic definition of skin thickness
287 {
288 G4double minval=dX;
289 if(dY<dX) { minval=dY; }
290 if(dZ<minval) { minval=dZ; }
291 ell=.01*minval;
292 }
293
294 G4double dd=2*ell;
295 minX-=ell; minY-=ell; minZ-=ell; dX+=dd; dY+=dd; dZ+=dd;
296
297 for(G4int i = 0; i < nStat; i++ )
298 {
299 px = minX+dX*G4UniformRand();
300 py = minY+dY*G4UniformRand();
301 pz = minZ+dZ*G4UniformRand();
302 p = G4ThreeVector(px,py,pz);
303 in = this->Inside(p);
304 if(in != kOutside)
305 {
306 if (DistanceToOut(p)<ell) { inside++; }
307 }
308 else if(DistanceToIn(p)<ell) { inside++; }
309 }
310 // @@ The conformal correction can be upgraded
311 surf = dX*dY*dZ*inside/dd/nStat;
312 return surf;
313}
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const =0
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0

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

◆ GetConstituentSolid() [1/2]

G4VSolid * G4VSolid::GetConstituentSolid ( G4int  no)
virtual

Reimplemented in G4BooleanSolid.

Definition at line 170 of file G4VSolid.cc.

171{ return 0; }

◆ GetConstituentSolid() [2/2]

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

Reimplemented in G4BooleanSolid.

Definition at line 167 of file G4VSolid.cc.

168{ return 0; }

Referenced by G4BooleanSolid::StackPolyhedron().

◆ GetCubicVolume()

◆ GetDisplacedSolidPtr() [1/2]

G4DisplacedSolid * G4VSolid::GetDisplacedSolidPtr ( )
virtual

Reimplemented in G4DisplacedSolid.

Definition at line 176 of file G4VSolid.cc.

177{ return 0; }

◆ GetDisplacedSolidPtr() [2/2]

const G4DisplacedSolid * G4VSolid::GetDisplacedSolidPtr ( ) const
virtual

Reimplemented in G4DisplacedSolid.

Definition at line 173 of file G4VSolid.cc.

174{ return 0; }

◆ GetEntityType()

virtual G4GeometryType G4VSolid::GetEntityType ( ) const
pure virtual

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

Referenced by G4GMocrenFileSceneHandler::AddPrimitive(), G4GDMLWriteSolids::AddSolid(), G4tgbVolume::BuildSolidForDivision(), Clone(), G4VoxelNavigation::ComputeSafety(), G4NavigationLogger::ComputeSafetyLog(), G4VDivisionParameterisation::ComputeSolid(), G4PhysicalVolumeModel::CreateCurrentAttValues(), G4SubtractionSolid::DistanceToIn(), G4tgbGeometryDumper::DumpPVParameterised(), G4tgbGeometryDumper::DumpSolid(), G4tgbVolume::FindOrConstructG4Solid(), G4VParameterisationBox::G4VParameterisationBox(), G4VParameterisationCons::G4VParameterisationCons(), G4VParameterisationPara::G4VParameterisationPara(), G4VParameterisationPolycone::G4VParameterisationPolycone(), G4VParameterisationPolyhedra::G4VParameterisationPolyhedra(), G4VParameterisationTrd::G4VParameterisationTrd(), G4VParameterisationTubs::G4VParameterisationTubs(), G4Navigator::GetLocalExitNormal(), G4ITNavigator::GetLocalExitNormal(), GetPointOnSurface(), G4tgbGeometryDumper::GetSolidParams(), G4NavigationLogger::PostComputeStepLog(), G4NavigationLogger::PreComputeStepLog(), G4NavigationLogger::PrintDaughterLog(), G4ASCIITreeSceneHandler::RequestPrimitives(), G4VoxelSafety::SafetyForVoxelHeader(), G4BooleanSolid::StackPolyhedron(), G4CSGSolid::StreamInfo(), and G4PhysicalVolumeModel::VisitGeometryAndGetVisReps().

◆ GetExtent()

G4VisExtent G4VSolid::GetExtent ( ) const
virtual

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

Definition at line 619 of file G4VSolid.cc.

620{
621 G4VisExtent extent;
622 G4VoxelLimits voxelLimits; // Defaults to "infinite" limits.
623 G4AffineTransform affineTransform;
624 G4double vmin, vmax;
625 CalculateExtent(kXAxis,voxelLimits,affineTransform,vmin,vmax);
626 extent.SetXmin (vmin);
627 extent.SetXmax (vmax);
628 CalculateExtent(kYAxis,voxelLimits,affineTransform,vmin,vmax);
629 extent.SetYmin (vmin);
630 extent.SetYmax (vmax);
631 CalculateExtent(kZAxis,voxelLimits,affineTransform,vmin,vmax);
632 extent.SetZmin (vmin);
633 extent.SetZmax (vmax);
634 return extent;
635}
void SetYmin(G4double ymin)
Definition: G4VisExtent.hh:104
void SetYmax(G4double ymax)
Definition: G4VisExtent.hh:106
void SetXmax(G4double xmax)
Definition: G4VisExtent.hh:102
void SetXmin(G4double xmin)
Definition: G4VisExtent.hh:100
void SetZmax(G4double zmax)
Definition: G4VisExtent.hh:110
void SetZmin(G4double zmin)
Definition: G4VisExtent.hh:108

Referenced by G4tgbVolume::BuildSolidForDivision().

◆ 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(), G4GDMLWriteSolids::BoxWrite(), G4Trd::CheckAndSetAllParameters(), 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(), G4Polycone::Create(), G4PhysicalVolumeModel::CreateCurrentAttValues(), G4ReflectedSolid::CreatePolyhedron(), G4Polycone::CreatePolyhedron(), G4Polyhedra::CreatePolyhedron(), G4GDMLWriteSolids::CutTubeWrite(), G4PhysicalVolumeModel::DescribeSolid(), G4SubtractionSolid::DistanceToIn(), G4Paraboloid::DistanceToIn(), G4tgbGeometryDumper::DumpSolid(), G4GDMLWriteSolids::ElconeWrite(), G4GDMLWriteSolids::EllipsoidWrite(), G4GDMLWriteSolids::EltubeWrite(), G4Box::G4Box(), G4BREPSolidOpenPCone::G4BREPSolidOpenPCone(), G4Cons::G4Cons(), G4CutTubs::G4CutTubs(), G4Ellipsoid::G4Ellipsoid(), G4EllipticalCone::G4EllipticalCone(), G4Hype::G4Hype(), G4Para::G4Para(), G4Paraboloid::G4Paraboloid(), G4Polyhedra::G4Polyhedra(), G4Sphere::G4Sphere(), G4Trap::G4Trap(), G4Tubs::G4Tubs(), G4VParameterisationCons::G4VParameterisationCons(), G4VParameterisationPara::G4VParameterisationPara(), G4VParameterisationPolycone::G4VParameterisationPolycone(), G4VParameterisationPolyhedra::G4VParameterisationPolyhedra(), G4VParameterisationTrd::G4VParameterisationTrd(), G4VTwistedFaceted::G4VTwistedFaceted(), G4GDMLWriteSolids::GenTrapWrite(), G4Navigator::GetLocalExitNormal(), G4ITNavigator::GetLocalExitNormal(), G4PhantomParameterisation::GetReplicaNo(), G4GDMLWriteSolids::HypeWrite(), G4Navigator::LocateGlobalPointAndSetup(), G4ITNavigator::LocateGlobalPointAndSetup(), G4Trap::MakePlane(), G4Trap::MakePlanes(), G4BREPSolidOpenPCone::operator=(), G4GDMLWriteSolids::OrbWrite(), G4GDMLWriteSolids::ParaboloidWrite(), G4GDMLWriteParamvol::ParametersWrite(), G4GDMLWriteSolids::ParaWrite(), G4GDMLWriteSolids::PolyconeWrite(), G4GDMLWriteSolids::PolyhedraWrite(), G4NavigationLogger::PostComputeStepLog(), G4NavigationLogger::PreComputeStepLog(), G4NavigationLogger::PrintDaughterLog(), G4tgbVolumeMgr::RegisterMe(), G4ASCIITreeSceneHandler::RequestPrimitives(), G4VSceneHandler::RequestPrimitives(), G4Polycone::Reset(), G4Polyhedra::Reset(), G4VoxelSafety::SafetyForVoxelNode(), G4Para::SetAllParameters(), G4Trap::SetAllParameters(), G4Torus::SetAllParameters(), G4Box::SetXHalfLength(), G4Box::SetYHalfLength(), G4Box::SetZHalfLength(), G4GeomTestStreamLogger::SolidProblem(), G4GDMLWriteSolids::SphereWrite(), G4BooleanSolid::StackPolyhedron(), G4ReflectedSolid::StreamInfo(), G4BooleanSolid::StreamInfo(), G4DisplacedSolid::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(), G4GenericTrap::StreamInfo(), G4Hype::StreamInfo(), G4Paraboloid::StreamInfo(), G4Polycone::StreamInfo(), G4Polyhedra::StreamInfo(), G4Tet::StreamInfo(), G4TwistedBox::StreamInfo(), G4TwistedTrap::StreamInfo(), G4TwistedTrd::StreamInfo(), G4TwistedTubs::StreamInfo(), G4VCSGfaceted::StreamInfo(), G4VTwistedFaceted::StreamInfo(), G4GDMLRead::StripNames(), SubstractSolids(), 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()

G4ThreeVector G4VSolid::GetPointOnSurface ( ) const
virtual

Reimplemented in G4ReflectedSolid, G4BooleanSolid, G4DisplacedSolid, G4Box, G4Cons, G4CutTubs, G4Orb, G4Para, G4Sphere, G4Torus, G4Trap, G4Trd, G4Tubs, G4Ellipsoid, G4EllipticalCone, G4EllipticalTube, G4GenericTrap, G4Hype, G4Paraboloid, G4Polycone, G4Polyhedra, G4TessellatedSolid, G4Tet, G4TwistedTubs, and G4VTwistedFaceted.

Definition at line 152 of file G4VSolid.cc.

153{
154 std::ostringstream message;
155 message << "Not implemented for solid: "
156 << this->GetEntityType() << " !" << G4endl
157 << "Returning origin.";
158 G4Exception("G4VSolid::GetPointOnSurface()", "GeomMgt1001",
159 JustWarning, message);
160 return G4ThreeVector(0,0,0);
161}

Referenced by G4PVParameterised::CheckOverlaps(), G4PVPlacement::CheckOverlaps(), G4ReflectedSolid::GetPointOnSurface(), G4BooleanSolid::GetPointOnSurface(), and G4DisplacedSolid::GetPointOnSurface().

◆ GetPolyhedron()

◆ GetSurfaceArea()

◆ GetTolerance()

G4double G4VSolid::GetTolerance ( ) const
inline

◆ Inside()

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

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

Referenced by G4NavigationLogger::AlongComputeStepLog(), G4ReplicaNavigation::BackLocate(), G4PVParameterised::CheckOverlaps(), G4PVPlacement::CheckOverlaps(), G4VoxelNavigation::ComputeSafety(), G4VoxelSafety::ComputeSafety(), G4ParameterisedNavigation::ComputeStep(), G4ReplicaNavigation::ComputeStep(), G4RegularNavigation::ComputeStepSkippingEqualMaterials(), G4TheRayTracer::CreateBitMap(), G4PolyPhiFace::Diagnose(), G4IntersectionSolid::DistanceToIn(), G4SubtractionSolid::DistanceToIn(), G4UnionSolid::DistanceToOut(), EstimateCubicVolume(), EstimateSurfaceArea(), G4Navigator::GetLocalExitNormal(), G4ITNavigator::GetLocalExitNormal(), G4BooleanSolid::GetPointOnSurface(), G4PhantomParameterisation::GetReplicaNo(), G4ReflectedSolid::Inside(), G4DisplacedSolid::Inside(), G4IntersectionSolid::Inside(), G4SubtractionSolid::Inside(), G4UnionSolid::Inside(), G4Navigator::LocateGlobalPointAndSetup(), G4ITNavigator::LocateGlobalPointAndSetup(), G4NavigationLogger::PreComputeStepLog(), G4IntersectionSolid::SurfaceNormal(), G4SubtractionSolid::SurfaceNormal(), and G4UnionSolid::SurfaceNormal().

◆ operator=()

◆ operator==()

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

◆ SetName()

◆ StreamInfo()

◆ SurfaceNormal()

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 128 of file G4VSolid.cc.

129{
130 return e.StreamInfo(os);
131}
virtual std::ostream & StreamInfo(std::ostream &os) const =0

Member Data Documentation

◆ kCarTolerance

G4double G4VSolid::kCarTolerance
protected

Definition at line 307 of file G4VSolid.hh.

Referenced by G4TessellatedSolid::AddFacet(), G4ReflectedSolid::CalculateExtent(), G4BREPSolid::CalculateExtent(), G4Box::CalculateExtent(), G4Cons::CalculateExtent(), G4CutTubs::CalculateExtent(), G4Orb::CalculateExtent(), G4Para::CalculateExtent(), G4Sphere::CalculateExtent(), G4Torus::CalculateExtent(), G4Trap::CalculateExtent(), G4Trd::CalculateExtent(), G4Tubs::CalculateExtent(), G4Ellipsoid::CalculateExtent(), G4GenericTrap::CalculateExtent(), G4Paraboloid::CalculateExtent(), G4TessellatedSolid::CalculateExtent(), G4VTwistedFaceted::CalculateExtent(), G4Trd::CheckAndSetAllParameters(), G4Polyhedra::Create(), G4Polycone::Create(), G4CutTubs::CreatePolyhedron(), G4Polycone::CreatePolyhedron(), G4Polyhedra::CreatePolyhedron(), G4CutTubs::CreateRotatedVertices(), G4Tubs::CreateRotatedVertices(), G4VCSGfaceted::DistanceTo(), G4Box::DistanceToIn(), G4Cons::DistanceToIn(), G4CutTubs::DistanceToIn(), G4Para::DistanceToIn(), G4Sphere::DistanceToIn(), G4Torus::DistanceToIn(), G4Trap::DistanceToIn(), G4Trd::DistanceToIn(), G4Tubs::DistanceToIn(), G4Ellipsoid::DistanceToIn(), G4EllipticalCone::DistanceToIn(), G4EllipticalTube::DistanceToIn(), G4GenericTrap::DistanceToIn(), G4Hype::DistanceToIn(), G4Paraboloid::DistanceToIn(), G4VCSGfaceted::DistanceToIn(), G4BREPSolid::DistanceToIn(), G4BREPSolidPCone::DistanceToIn(), G4BREPSolidPolyhedra::DistanceToIn(), G4UnionSolid::DistanceToOut(), G4Box::DistanceToOut(), G4Trap::DistanceToOut(), G4Trd::DistanceToOut(), G4EllipticalTube::DistanceToOut(), G4GenericTrap::DistanceToOut(), G4VCSGfaceted::DistanceToOut(), G4Cons::DistanceToOut(), G4CutTubs::DistanceToOut(), G4Para::DistanceToOut(), G4Sphere::DistanceToOut(), G4Torus::DistanceToOut(), G4Tubs::DistanceToOut(), G4EllipticalCone::DistanceToOut(), G4Hype::DistanceToOut(), G4Paraboloid::DistanceToOut(), G4BREPSolid::DistanceToOut(), G4BREPSolidPCone::DistanceToOut(), G4BREPSolidPolyhedra::DistanceToOut(), G4Box::G4Box(), G4ExtrudedSolid::G4ExtrudedSolid(), G4GenericTrap::G4GenericTrap(), G4Orb::G4Orb(), G4Trap::G4Trap(), G4VSolid(), G4VTwistedFaceted::G4VTwistedFaceted(), G4Box::Inside(), G4Cons::Inside(), G4CutTubs::Inside(), G4Para::Inside(), G4Trap::Inside(), G4Trd::Inside(), G4Tubs::Inside(), G4EllipticalCone::Inside(), G4EllipticalTube::Inside(), G4ExtrudedSolid::Inside(), G4GenericTrap::Inside(), G4Hype::Inside(), G4Paraboloid::Inside(), G4VCSGfaceted::Inside(), G4VTwistedFaceted::Inside(), G4BREPSolid::Inside(), G4BREPSolidBox::Inside(), G4BREPSolidPCone::Inside(), G4BREPSolidPolyhedra::Inside(), G4BREPSolidSphere::Inside(), G4BREPSolid::Intersect(), operator=(), G4TessellatedSolid::SafetyFromInside(), G4TessellatedSolid::SafetyFromOutside(), G4Torus::SetAllParameters(), G4Box::SetXHalfLength(), G4Box::SetYHalfLength(), G4Box::SetZHalfLength(), G4BREPSolid::SurfaceNormal(), G4BREPSolidPCone::SurfaceNormal(), G4BREPSolidPolyhedra::SurfaceNormal(), G4Box::SurfaceNormal(), G4Cons::SurfaceNormal(), G4CutTubs::SurfaceNormal(), G4Para::SurfaceNormal(), G4Sphere::SurfaceNormal(), G4Torus::SurfaceNormal(), G4Trap::SurfaceNormal(), G4Trd::SurfaceNormal(), G4Tubs::SurfaceNormal(), G4EllipticalTube::SurfaceNormal(), G4GenericTrap::SurfaceNormal(), and G4Paraboloid::SurfaceNormal().


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