Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4IntersectionSolid Class Reference

#include <G4IntersectionSolid.hh>

+ Inheritance diagram for G4IntersectionSolid:

Public Member Functions

 G4IntersectionSolid (const G4String &pName, G4VSolid *pSolidA, G4VSolid *pSolidB)
 
 G4IntersectionSolid (const G4String &pName, G4VSolid *pSolidA, G4VSolid *pSolidB, G4RotationMatrix *rotMatrix, const G4ThreeVector &transVector)
 
 G4IntersectionSolid (const G4String &pName, G4VSolid *pSolidA, G4VSolid *pSolidB, const G4Transform3D &transform)
 
 ~G4IntersectionSolid () override
 
G4GeometryType GetEntityType () const override
 
G4VSolidClone () const override
 
 G4IntersectionSolid (__void__ &)
 
 G4IntersectionSolid (const G4IntersectionSolid &rhs)
 
G4IntersectionSolidoperator= (const G4IntersectionSolid &rhs)
 
void BoundingLimits (G4ThreeVector &pMin, G4ThreeVector &pMax) const override
 
G4bool CalculateExtent (const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const override
 
EInside Inside (const G4ThreeVector &p) const override
 
G4ThreeVector SurfaceNormal (const G4ThreeVector &p) const override
 
G4double DistanceToIn (const G4ThreeVector &p, const G4ThreeVector &v) const override
 
G4double DistanceToIn (const G4ThreeVector &p) const override
 
G4double DistanceToOut (const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=nullptr, G4ThreeVector *n=nullptr) const override
 
G4double DistanceToOut (const G4ThreeVector &p) const override
 
void ComputeDimensions (G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep) override
 
void DescribeYourselfTo (G4VGraphicsScene &scene) const override
 
G4PolyhedronCreatePolyhedron () const override
 
- Public Member Functions inherited from G4BooleanSolid
 G4BooleanSolid (const G4String &pName, G4VSolid *pSolidA, G4VSolid *pSolidB)
 
 G4BooleanSolid (const G4String &pName, G4VSolid *pSolidA, G4VSolid *pSolidB, G4RotationMatrix *rotMatrix, const G4ThreeVector &transVector)
 
 G4BooleanSolid (const G4String &pName, G4VSolid *pSolidA, G4VSolid *pSolidB, const G4Transform3D &transform)
 
 ~G4BooleanSolid () override
 
const G4VSolidGetConstituentSolid (G4int no) const override
 
G4VSolidGetConstituentSolid (G4int no) override
 
G4double GetCubicVolume () override
 
G4double GetSurfaceArea () override
 
G4PolyhedronGetPolyhedron () const override
 
std::ostream & StreamInfo (std::ostream &os) const override
 
G4int GetCubVolStatistics () const
 
G4double GetCubVolEpsilon () const
 
void SetCubVolStatistics (G4int st)
 
void SetCubVolEpsilon (G4double ep)
 
G4int GetAreaStatistics () const
 
G4double GetAreaAccuracy () const
 
void SetAreaStatistics (G4int st)
 
void SetAreaAccuracy (G4double ep)
 
G4ThreeVector GetPointOnSurface () const override
 
 G4BooleanSolid (__void__ &)
 
 G4BooleanSolid (const G4BooleanSolid &rhs)
 
G4BooleanSolidoperator= (const G4BooleanSolid &rhs)
 
- Public Member Functions inherited from G4VSolid
 G4VSolid (const G4String &name)
 
virtual ~G4VSolid ()
 
G4bool operator== (const G4VSolid &s) const
 
G4String GetName () const
 
void SetName (const G4String &name)
 
G4double GetTolerance () const
 
void DumpInfo () const
 
virtual G4VisExtent GetExtent () const
 
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
 

Additional Inherited Members

- Static Public Member Functions inherited from G4BooleanSolid
static void SetExternalBooleanProcessor (G4VBooleanProcessor *extProcessor)
 
static G4VBooleanProcessorGetExternalBooleanProcessor ()
 
- Protected Member Functions inherited from G4BooleanSolid
void GetListOfPrimitives (std::vector< std::pair< G4VSolid *, G4Transform3D > > &, const G4Transform3D &) const
 
G4PolyhedronStackPolyhedron (HepPolyhedronProcessor &, const G4VSolid *) const
 
- Protected Member Functions inherited from G4VSolid
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 inherited from G4BooleanSolid
G4VSolidfPtrSolidA = nullptr
 
G4VSolidfPtrSolidB = nullptr
 
G4double fCubicVolume = -1.0
 
G4double fSurfaceArea = -1.0
 
- Protected Attributes inherited from G4VSolid
G4double kCarTolerance
 
- Static Protected Attributes inherited from G4BooleanSolid
static G4VBooleanProcessorfExternalBoolProcessor = nullptr
 

Detailed Description

Definition at line 45 of file G4IntersectionSolid.hh.

Constructor & Destructor Documentation

◆ G4IntersectionSolid() [1/5]

G4IntersectionSolid::G4IntersectionSolid ( const G4String & pName,
G4VSolid * pSolidA,
G4VSolid * pSolidB )

Definition at line 50 of file G4IntersectionSolid.cc.

53 : G4BooleanSolid(pName,pSolidA,pSolidB)
54{
55}
G4BooleanSolid(const G4String &pName, G4VSolid *pSolidA, G4VSolid *pSolidB)

Referenced by Clone().

◆ G4IntersectionSolid() [2/5]

G4IntersectionSolid::G4IntersectionSolid ( const G4String & pName,
G4VSolid * pSolidA,
G4VSolid * pSolidB,
G4RotationMatrix * rotMatrix,
const G4ThreeVector & transVector )

Definition at line 60 of file G4IntersectionSolid.cc.

65 : G4BooleanSolid(pName,pSolidA,pSolidB,rotMatrix,transVector)
66{
67}

◆ G4IntersectionSolid() [3/5]

G4IntersectionSolid::G4IntersectionSolid ( const G4String & pName,
G4VSolid * pSolidA,
G4VSolid * pSolidB,
const G4Transform3D & transform )

Definition at line 73 of file G4IntersectionSolid.cc.

77 : G4BooleanSolid(pName,pSolidA,pSolidB,transform)
78{
79}

◆ ~G4IntersectionSolid()

G4IntersectionSolid::~G4IntersectionSolid ( )
overridedefault

◆ G4IntersectionSolid() [4/5]

G4IntersectionSolid::G4IntersectionSolid ( __void__ & a)

Definition at line 86 of file G4IntersectionSolid.cc.

88{
89}

◆ G4IntersectionSolid() [5/5]

G4IntersectionSolid::G4IntersectionSolid ( const G4IntersectionSolid & rhs)
default

Member Function Documentation

◆ BoundingLimits()

void G4IntersectionSolid::BoundingLimits ( G4ThreeVector & pMin,
G4ThreeVector & pMax ) const
overridevirtual

Reimplemented from G4VSolid.

Definition at line 126 of file G4IntersectionSolid.cc.

128{
129 G4ThreeVector minA,maxA, minB,maxB;
130 fPtrSolidA->BoundingLimits(minA,maxA);
131 fPtrSolidB->BoundingLimits(minB,maxB);
132
133 pMin.set(std::max(minA.x(),minB.x()),
134 std::max(minA.y(),minB.y()),
135 std::max(minA.z(),minB.z()));
136
137 pMax.set(std::min(maxA.x(),maxB.x()),
138 std::min(maxA.y(),maxB.y()),
139 std::min(maxA.z(),maxB.z()));
140
141 // Check correctness of the bounding box
142 //
143 if (pMin.x() >= pMax.x() || pMin.y() >= pMax.y() || pMin.z() >= pMax.z())
144 {
145 std::ostringstream message;
146 message << "Bad bounding box (min >= max) for solid: "
147 << GetName() << " !"
148 << "\npMin = " << pMin
149 << "\npMax = " << pMax;
150 G4Exception("G4IntersectionSolid::BoundingLimits()", "GeomMgt0001",
151 JustWarning, message);
152 DumpInfo();
153 }
154}
@ JustWarning
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
double z() const
double x() const
double y() const
void set(double x, double y, double z)
G4VSolid * fPtrSolidA
G4VSolid * fPtrSolidB
G4String GetName() const
void DumpInfo() const
virtual void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
Definition G4VSolid.cc:665

◆ CalculateExtent()

G4bool G4IntersectionSolid::CalculateExtent ( const EAxis pAxis,
const G4VoxelLimits & pVoxelLimit,
const G4AffineTransform & pTransform,
G4double & pMin,
G4double & pMax ) const
overridevirtual

Implements G4VSolid.

Definition at line 161 of file G4IntersectionSolid.cc.

166{
167 G4bool retA, retB, out;
168 G4double minA, minB, maxA, maxB;
169
170 retA = fPtrSolidA
171 ->CalculateExtent( pAxis, pVoxelLimit, pTransform, minA, maxA);
172 retB = fPtrSolidB
173 ->CalculateExtent( pAxis, pVoxelLimit, pTransform, minB, maxB);
174
175 if( retA && retB )
176 {
177 pMin = std::max( minA, minB );
178 pMax = std::min( maxA, maxB );
179 out = (pMax > pMin); // true;
180 }
181 else
182 {
183 out = false;
184 }
185
186 return out; // It exists in this slice only if both exist in it.
187}
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const =0

◆ Clone()

G4VSolid * G4IntersectionSolid::Clone ( ) const
overridevirtual

Reimplemented from G4VSolid.

Definition at line 525 of file G4IntersectionSolid.cc.

526{
527 return new G4IntersectionSolid(*this);
528}
G4IntersectionSolid(const G4String &pName, G4VSolid *pSolidA, G4VSolid *pSolidB)

◆ ComputeDimensions()

void G4IntersectionSolid::ComputeDimensions ( G4VPVParameterisation * p,
const G4int n,
const G4VPhysicalVolume * pRep )
overridevirtual

Reimplemented from G4VSolid.

Definition at line 506 of file G4IntersectionSolid.cc.

509{
510}

◆ CreatePolyhedron()

G4Polyhedron * G4IntersectionSolid::CreatePolyhedron ( ) const
overridevirtual

Reimplemented from G4VSolid.

Definition at line 545 of file G4IntersectionSolid.cc.

546{
547 if (fExternalBoolProcessor == nullptr)
548 {
549 HepPolyhedronProcessor processor;
550 // Stack components and components of components recursively
551 // See G4BooleanSolid::StackPolyhedron
552 G4Polyhedron* top = StackPolyhedron(processor, this);
553 auto result = new G4Polyhedron(*top);
554 if (processor.execute(*result))
555 {
556 return result;
557 }
558 else
559 {
560 return nullptr;
561 }
562 }
563 else
564 {
568 }
569}
G4Polyhedron * GetPolyhedron() const override
const G4VSolid * GetConstituentSolid(G4int no) const override
static G4VBooleanProcessor * fExternalBoolProcessor
G4Polyhedron * StackPolyhedron(HepPolyhedronProcessor &, const G4VSolid *) const
virtual G4PolyhedronArbitrary * Intersection(G4Polyhedron *, G4Polyhedron *)
bool execute(HepPolyhedron &)

◆ DescribeYourselfTo()

void G4IntersectionSolid::DescribeYourselfTo ( G4VGraphicsScene & scene) const
overridevirtual

Implements G4VSolid.

Definition at line 535 of file G4IntersectionSolid.cc.

536{
537 scene.AddSolid (*this);
538}
virtual void AddSolid(const G4Box &)=0

◆ DistanceToIn() [1/2]

G4double G4IntersectionSolid::DistanceToIn ( const G4ThreeVector & p) const
overridevirtual

Implements G4VSolid.

Definition at line 378 of file G4IntersectionSolid.cc.

379{
380#ifdef G4BOOLDEBUG
381 if( Inside(p) == kInside )
382 {
383 G4cout << "WARNING - Invalid call in "
384 << "G4IntersectionSolid::DistanceToIn(p)" << G4endl
385 << " Point p is inside !" << G4endl;
386 G4cout << " p = " << p << G4endl;
387 G4cerr << "WARNING - Invalid call in "
388 << "G4IntersectionSolid::DistanceToIn(p)" << G4endl
389 << " Point p is inside !" << G4endl;
390 G4cerr << " p = " << p << G4endl;
391 }
392#endif
393 EInside sideA = fPtrSolidA->Inside(p) ;
394 EInside sideB = fPtrSolidB->Inside(p) ;
395 G4double dist=0.0 ;
396
397 if( sideA != kInside && sideB != kOutside )
398 {
399 dist = fPtrSolidA->DistanceToIn(p) ;
400 }
401 else
402 {
403 if( sideB != kInside && sideA != kOutside )
404 {
405 dist = fPtrSolidB->DistanceToIn(p) ;
406 }
407 else
408 {
409 dist = std::min(fPtrSolidA->DistanceToIn(p),
410 fPtrSolidB->DistanceToIn(p) ) ;
411 }
412 }
413 return dist ;
414}
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
EInside Inside(const G4ThreeVector &p) const override
virtual EInside Inside(const G4ThreeVector &p) const =0
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
EInside
Definition geomdefs.hh:67
@ kInside
Definition geomdefs.hh:70
@ kOutside
Definition geomdefs.hh:68

◆ DistanceToIn() [2/2]

G4double G4IntersectionSolid::DistanceToIn ( const G4ThreeVector & p,
const G4ThreeVector & v ) const
overridevirtual

Implements G4VSolid.

Definition at line 271 of file G4IntersectionSolid.cc.

273{
274 G4double dist = 0.0;
275 if( Inside(p) == kInside )
276 {
277#ifdef G4BOOLDEBUG
278 G4cout << "WARNING - Invalid call in "
279 << "G4IntersectionSolid::DistanceToIn(p,v)" << G4endl
280 << " Point p is inside !" << G4endl;
281 G4cout << " p = " << p << G4endl;
282 G4cout << " v = " << v << G4endl;
283 G4cerr << "WARNING - Invalid call in "
284 << "G4IntersectionSolid::DistanceToIn(p,v)" << G4endl
285 << " Point p is inside !" << G4endl;
286 G4cerr << " p = " << p << G4endl;
287 G4cerr << " v = " << v << G4endl;
288#endif
289 }
290 else // if( Inside(p) == kSurface )
291 {
292 EInside wA = fPtrSolidA->Inside(p);
293 EInside wB = fPtrSolidB->Inside(p);
294
295 G4ThreeVector pA = p, pB = p;
296 G4double dA = 0., dA1=0., dA2=0.;
297 G4double dB = 0., dB1=0., dB2=0.;
298 G4bool doA = true, doB = true;
299
300 static const std::size_t max_trials=10000;
301 for (std::size_t trial=0; trial<max_trials; ++trial)
302 {
303 if(doA)
304 {
305 // find next valid range for A
306
307 dA1 = 0.;
308
309 if( wA != kInside )
310 {
311 dA1 = fPtrSolidA->DistanceToIn(pA, v);
312
313 if( dA1 == kInfinity ) return kInfinity;
314
315 pA += dA1*v;
316 }
317 dA2 = dA1 + fPtrSolidA->DistanceToOut(pA, v);
318 }
319 dA1 += dA;
320 dA2 += dA;
321
322 if(doB)
323 {
324 // find next valid range for B
325
326 dB1 = 0.;
327 if(wB != kInside)
328 {
329 dB1 = fPtrSolidB->DistanceToIn(pB, v);
330
331 if(dB1 == kInfinity) return kInfinity;
332
333 pB += dB1*v;
334 }
335 dB2 = dB1 + fPtrSolidB->DistanceToOut(pB, v);
336 }
337 dB1 += dB;
338 dB2 += dB;
339
340 // check if they overlap
341
342 if( dA1 < dB1 )
343 {
344 if( dB1 < dA2 ) return dB1;
345
346 dA = dA2;
347 pA = p + dA*v; // continue from here
348 wA = kSurface;
349 doA = true;
350 doB = false;
351 }
352 else
353 {
354 if( dA1 < dB2 ) return dA1;
355
356 dB = dB2;
357 pB = p + dB*v; // continue from here
358 wB = kSurface;
359 doB = true;
360 doA = false;
361 }
362 }
363 }
364#ifdef G4BOOLDEBUG
365 G4Exception("G4IntersectionSolid::DistanceToIn(p,v)",
366 "GeomSolids0001", JustWarning,
367 "Reached maximum number of iterations! Returning zero.");
368#endif
369 return dist ;
370}
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=nullptr, G4ThreeVector *n=nullptr) const =0
@ kSurface
Definition geomdefs.hh:69

◆ DistanceToOut() [1/2]

G4double G4IntersectionSolid::DistanceToOut ( const G4ThreeVector & p) const
overridevirtual

Implements G4VSolid.

Definition at line 480 of file G4IntersectionSolid.cc.

481{
482#ifdef G4BOOLDEBUG
483 if( Inside(p) == kOutside )
484 {
485 G4cout << "WARNING - Invalid call in "
486 << "G4IntersectionSolid::DistanceToOut(p)" << G4endl
487 << " Point p is outside !" << G4endl;
488 G4cout << " p = " << p << G4endl;
489 G4cerr << "WARNING - Invalid call in "
490 << "G4IntersectionSolid::DistanceToOut(p)" << G4endl
491 << " Point p is outside !" << G4endl;
492 G4cerr << " p = " << p << G4endl;
493 }
494#endif
495
496 return std::min(fPtrSolidA->DistanceToOut(p),
498
499}

◆ DistanceToOut() [2/2]

G4double G4IntersectionSolid::DistanceToOut ( const G4ThreeVector & p,
const G4ThreeVector & v,
const G4bool calcNorm = false,
G4bool * validNorm = nullptr,
G4ThreeVector * n = nullptr ) const
overridevirtual

Implements G4VSolid.

Definition at line 421 of file G4IntersectionSolid.cc.

426{
427 G4bool validNormA, validNormB;
428 G4ThreeVector nA, nB;
429
430#ifdef G4BOOLDEBUG
431 if( Inside(p) == kOutside )
432 {
433 G4cout << "Position:" << G4endl << G4endl;
434 G4cout << "p.x() = " << p.x()/mm << " mm" << G4endl;
435 G4cout << "p.y() = " << p.y()/mm << " mm" << G4endl;
436 G4cout << "p.z() = " << p.z()/mm << " mm" << G4endl << G4endl;
437 G4cout << "Direction:" << G4endl << G4endl;
438 G4cout << "v.x() = " << v.x() << G4endl;
439 G4cout << "v.y() = " << v.y() << G4endl;
440 G4cout << "v.z() = " << v.z() << G4endl << G4endl;
441 G4cout << "WARNING - Invalid call in "
442 << "G4IntersectionSolid::DistanceToOut(p,v)" << G4endl
443 << " Point p is outside !" << G4endl;
444 G4cout << " p = " << p << G4endl;
445 G4cout << " v = " << v << G4endl;
446 G4cerr << "WARNING - Invalid call in "
447 << "G4IntersectionSolid::DistanceToOut(p,v)" << G4endl
448 << " Point p is outside !" << G4endl;
449 G4cerr << " p = " << p << G4endl;
450 G4cerr << " v = " << v << G4endl;
451 }
452#endif
453 G4double distA = fPtrSolidA->DistanceToOut(p,v,calcNorm,&validNormA,&nA) ;
454 G4double distB = fPtrSolidB->DistanceToOut(p,v,calcNorm,&validNormB,&nB) ;
455
456 G4double dist = std::min(distA,distB) ;
457
458 if( calcNorm )
459 {
460 if ( distA < distB )
461 {
462 *validNorm = validNormA;
463 *n = nA;
464 }
465 else
466 {
467 *validNorm = validNormB;
468 *n = nB;
469 }
470 }
471
472 return dist ;
473}

◆ GetEntityType()

G4GeometryType G4IntersectionSolid::GetEntityType ( ) const
overridevirtual

Reimplemented from G4BooleanSolid.

Definition at line 516 of file G4IntersectionSolid.cc.

517{
518 return {"G4IntersectionSolid"};
519}

◆ Inside()

EInside G4IntersectionSolid::Inside ( const G4ThreeVector & p) const
overridevirtual

Implements G4VSolid.

Definition at line 193 of file G4IntersectionSolid.cc.

194{
195 EInside positionA = fPtrSolidA->Inside(p);
196 if(positionA == kOutside) return positionA; // outside A
197
198 EInside positionB = fPtrSolidB->Inside(p);
199 if(positionA == kInside) return positionB;
200
201 if(positionB == kOutside) return positionB; // outside B
202 return kSurface; // surface A & B
203}

Referenced by DistanceToIn(), DistanceToIn(), DistanceToOut(), and DistanceToOut().

◆ operator=()

G4IntersectionSolid & G4IntersectionSolid::operator= ( const G4IntersectionSolid & rhs)

Definition at line 108 of file G4IntersectionSolid.cc.

109{
110 // Check assignment to self
111 //
112 if (this == &rhs) { return *this; }
113
114 // Copy base class data
115 //
117
118 return *this;
119}
G4BooleanSolid & operator=(const G4BooleanSolid &rhs)

◆ SurfaceNormal()

G4ThreeVector G4IntersectionSolid::SurfaceNormal ( const G4ThreeVector & p) const
overridevirtual

Implements G4VSolid.

Definition at line 209 of file G4IntersectionSolid.cc.

210{
211 G4ThreeVector normal;
212 EInside insideA, insideB;
213
214 insideA = fPtrSolidA->Inside(p);
215 insideB = fPtrSolidB->Inside(p);
216
217#ifdef G4BOOLDEBUG
218 if( (insideA == kOutside) || (insideB == kOutside) )
219 {
220 G4cout << "WARNING - Invalid call in "
221 << "G4IntersectionSolid::SurfaceNormal(p)" << G4endl
222 << " Point p is outside !" << G4endl;
223 G4cout << " p = " << p << G4endl;
224 G4cerr << "WARNING - Invalid call in "
225 << "G4IntersectionSolid::SurfaceNormal(p)" << G4endl
226 << " Point p is outside !" << G4endl;
227 G4cerr << " p = " << p << G4endl;
228 }
229#endif
230
231 // On the surface of both is difficult ... treat it like on A now!
232 //
233 if( insideA == kSurface )
234 {
235 normal = fPtrSolidA->SurfaceNormal(p) ;
236 }
237 else if( insideB == kSurface )
238 {
239 normal = fPtrSolidB->SurfaceNormal(p) ;
240 }
241 else // We are on neither surface, so we should generate an exception
242 {
244 {
245 normal= fPtrSolidA->SurfaceNormal(p) ;
246 }
247 else
248 {
249 normal= fPtrSolidB->SurfaceNormal(p) ;
250 }
251#ifdef G4BOOLDEBUG
252 G4cout << "WARNING - Invalid call in "
253 << "G4IntersectionSolid::SurfaceNormal(p)" << G4endl
254 << " Point p is out of surface !" << G4endl;
255 G4cout << " p = " << p << G4endl;
256 G4cerr << "WARNING - Invalid call in "
257 << "G4IntersectionSolid::SurfaceNormal(p)" << G4endl
258 << " Point p is out of surface !" << G4endl;
259 G4cerr << " p = " << p << G4endl;
260#endif
261 }
262
263 return normal;
264}
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const =0

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