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

#include <G4VCSGfaceted.hh>

+ Inheritance diagram for G4VCSGfaceted:

Public Member Functions

 G4VCSGfaceted (const G4String &name)
 
virtual ~G4VCSGfaceted ()
 
 G4VCSGfaceted (const G4VCSGfaceted &source)
 
const G4VCSGfacetedoperator= (const G4VCSGfaceted &source)
 
virtual G4bool CalculateExtent (const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pmin, G4double &pmax) const
 
virtual EInside Inside (const G4ThreeVector &p) const
 
virtual G4ThreeVector SurfaceNormal (const G4ThreeVector &p) const
 
virtual G4double DistanceToIn (const G4ThreeVector &p, const G4ThreeVector &v) const
 
virtual G4double DistanceToIn (const G4ThreeVector &p) const
 
virtual G4double DistanceToOut (const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
 
virtual G4double DistanceToOut (const G4ThreeVector &p) const
 
virtual G4GeometryType GetEntityType () const
 
virtual std::ostream & StreamInfo (std::ostream &os) const
 
virtual G4PolyhedronCreatePolyhedron () const =0
 
virtual void DescribeYourselfTo (G4VGraphicsScene &scene) const
 
virtual G4VisExtent GetExtent () const
 
virtual G4PolyhedronGetPolyhedron () const
 
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)
 
virtual G4double GetCubicVolume ()
 
virtual G4double GetSurfaceArea ()
 
 G4VCSGfaceted (__void__ &)
 
- 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
 
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

virtual G4double DistanceTo (const G4ThreeVector &p, const G4bool outgoing) const
 
G4ThreeVector GetPointOnSurfaceGeneric () const
 
void CopyStuff (const G4VCSGfaceted &source)
 
void DeleteStuff ()
 
- 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
 
G4double EstimateCubicVolume (G4int nStat, G4double epsilon) const
 
G4double EstimateSurfaceArea (G4int nStat, G4double ell) const
 

Protected Attributes

G4int numFace
 
G4VCSGface ** faces
 
G4double fCubicVolume
 
G4double fSurfaceArea
 
G4PolyhedronfpPolyhedron
 
- Protected Attributes inherited from G4VSolid
G4double kCarTolerance
 

Detailed Description

Definition at line 53 of file G4VCSGfaceted.hh.

Constructor & Destructor Documentation

◆ G4VCSGfaceted() [1/3]

G4VCSGfaceted::G4VCSGfaceted ( const G4String name)

Definition at line 64 of file G4VCSGfaceted.cc.

65 : G4VSolid(name),
67 fStatistics(1000000), fCubVolEpsilon(0.001), fAreaAccuracy(-1.)
68{
69}
G4double fCubicVolume
G4VCSGface ** faces
G4Polyhedron * fpPolyhedron
G4double fSurfaceArea

◆ ~G4VCSGfaceted()

G4VCSGfaceted::~G4VCSGfaceted ( )
virtual

Definition at line 86 of file G4VCSGfaceted.cc.

87{
89 delete fpPolyhedron;
90}

◆ G4VCSGfaceted() [2/3]

G4VCSGfaceted::G4VCSGfaceted ( const G4VCSGfaceted source)

Definition at line 96 of file G4VCSGfaceted.cc.

97 : G4VSolid( source )
98{
99 fStatistics = source.fStatistics;
100 fCubVolEpsilon = source.fCubVolEpsilon;
101 fAreaAccuracy = source.fAreaAccuracy;
102
103 CopyStuff( source );
104}
void CopyStuff(const G4VCSGfaceted &source)

◆ G4VCSGfaceted() [3/3]

G4VCSGfaceted::G4VCSGfaceted ( __void__ &  a)

Definition at line 76 of file G4VCSGfaceted.cc.

77 : G4VSolid(a),
79 fStatistics(1000000), fCubVolEpsilon(0.001), fAreaAccuracy(-1.)
80{
81}

Member Function Documentation

◆ CalculateExtent()

G4bool G4VCSGfaceted::CalculateExtent ( const EAxis  pAxis,
const G4VoxelLimits pVoxelLimit,
const G4AffineTransform pTransform,
G4double pmin,
G4double pmax 
) const
virtual

Implements G4VSolid.

Definition at line 178 of file G4VCSGfaceted.cc.

183{
184 G4SolidExtentList extentList( axis, voxelLimit );
185
186 //
187 // Loop over all faces, checking min/max extent as we go.
188 //
189 G4VCSGface **face = faces;
190 do
191 {
192 (*face)->CalculateExtent( axis, voxelLimit, transform, extentList );
193 } while( ++face < faces + numFace );
194
195 //
196 // Return min/max value
197 //
198 return extentList.GetExtent( min, max );
199}
virtual void CalculateExtent(const EAxis axis, const G4VoxelLimits &voxelLimit, const G4AffineTransform &tranform, G4SolidExtentList &extentList)=0

◆ CopyStuff()

void G4VCSGfaceted::CopyStuff ( const G4VCSGfaceted source)
protected

Definition at line 136 of file G4VCSGfaceted.cc.

137{
138 numFace = source.numFace;
139 if (numFace == 0) { return; } // odd, but permissable?
140
141 faces = new G4VCSGface*[numFace];
142
143 G4VCSGface **face = faces,
144 **sourceFace = source.faces;
145 do
146 {
147 *face = (*sourceFace)->Clone();
148 } while( ++sourceFace, ++face < faces+numFace );
149 fCubicVolume = source.fCubicVolume;
150 fSurfaceArea = source.fSurfaceArea;
151 fpPolyhedron = 0;
152}
virtual G4VCSGface * Clone()=0

Referenced by G4VCSGfaceted(), and operator=().

◆ CreatePolyhedron()

virtual G4Polyhedron * G4VCSGfaceted::CreatePolyhedron ( ) const
pure virtual

Reimplemented from G4VSolid.

Implemented in G4Polycone, and G4Polyhedra.

Referenced by GetPolyhedron().

◆ DeleteStuff()

void G4VCSGfaceted::DeleteStuff ( )
protected

Definition at line 160 of file G4VCSGfaceted.cc.

161{
162 if (numFace)
163 {
164 G4VCSGface **face = faces;
165 do
166 {
167 delete *face;
168 } while( ++face < faces + numFace );
169
170 delete [] faces;
171 }
172}

Referenced by operator=(), G4Polycone::Reset(), G4Polyhedra::Reset(), and ~G4VCSGfaceted().

◆ DescribeYourselfTo()

void G4VCSGfaceted::DescribeYourselfTo ( G4VGraphicsScene scene) const
virtual

Implements G4VSolid.

Definition at line 405 of file G4VCSGfaceted.cc.

406{
407 scene.AddSolid( *this );
408}
virtual void AddSolid(const G4Box &)=0

◆ DistanceTo()

G4double G4VCSGfaceted::DistanceTo ( const G4ThreeVector p,
const G4bool  outgoing 
) const
protectedvirtual

Definition at line 387 of file G4VCSGfaceted.cc.

389{
390 G4VCSGface **face = faces;
391 G4double best = kInfinity;
392 do
393 {
394 G4double distance = (*face)->Distance( p, outgoing );
395 if (distance < best) { best = distance; }
396 } while( ++face < faces + numFace );
397
398 return (best < 0.5*kCarTolerance) ? 0 : best;
399}
double G4double
Definition: G4Types.hh:64
virtual G4double Distance(const G4ThreeVector &p, G4bool outgoing)=0
G4double kCarTolerance
Definition: G4VSolid.hh:307

Referenced by DistanceToIn(), and DistanceToOut().

◆ DistanceToIn() [1/2]

G4double G4VCSGfaceted::DistanceToIn ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

Reimplemented in G4Polycone, and G4Polyhedra.

Definition at line 299 of file G4VCSGfaceted.cc.

300{
301 return DistanceTo( p, false );
302}
virtual G4double DistanceTo(const G4ThreeVector &p, const G4bool outgoing) const

◆ DistanceToIn() [2/2]

G4double G4VCSGfaceted::DistanceToIn ( const G4ThreeVector p,
const G4ThreeVector v 
) const
virtual

Implements G4VSolid.

Reimplemented in G4Polycone, and G4Polyhedra.

Definition at line 257 of file G4VCSGfaceted.cc.

259{
260 G4double distance = kInfinity;
261 G4double distFromSurface = kInfinity;
262 G4VCSGface **face = faces;
263 G4VCSGface *bestFace = *face;
264 do
265 {
266 G4double faceDistance,
267 faceDistFromSurface;
268 G4ThreeVector faceNormal;
269 G4bool faceAllBehind;
270 if ((*face)->Intersect( p, v, false, kCarTolerance/2,
271 faceDistance, faceDistFromSurface,
272 faceNormal, faceAllBehind ) )
273 {
274 //
275 // Intersecting face
276 //
277 if (faceDistance < distance)
278 {
279 distance = faceDistance;
280 distFromSurface = faceDistFromSurface;
281 bestFace = *face;
282 if (distFromSurface <= 0) { return 0; }
283 }
284 }
285 } while( ++face < faces + numFace );
286
287 if (distance < kInfinity && distFromSurface<kCarTolerance/2)
288 {
289 if (bestFace->Distance(p,false) < kCarTolerance/2) { distance = 0; }
290 }
291
292 return distance;
293}
bool G4bool
Definition: G4Types.hh:67

Referenced by G4Polycone::DistanceToIn(), and G4Polyhedra::DistanceToIn().

◆ DistanceToOut() [1/2]

G4double G4VCSGfaceted::DistanceToOut ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

Definition at line 376 of file G4VCSGfaceted.cc.

377{
378 return DistanceTo( p, true );
379}

◆ DistanceToOut() [2/2]

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

Implements G4VSolid.

Definition at line 308 of file G4VCSGfaceted.cc.

313{
314 G4bool allBehind = true;
315 G4double distance = kInfinity;
316 G4double distFromSurface = kInfinity;
317 G4ThreeVector normal;
318
319 G4VCSGface **face = faces;
320 G4VCSGface *bestFace = *face;
321 do
322 {
323 G4double faceDistance,
324 faceDistFromSurface;
325 G4ThreeVector faceNormal;
326 G4bool faceAllBehind;
327 if ((*face)->Intersect( p, v, true, kCarTolerance/2,
328 faceDistance, faceDistFromSurface,
329 faceNormal, faceAllBehind ) )
330 {
331 //
332 // Intersecting face
333 //
334 if ( (distance < kInfinity) || (!faceAllBehind) ) { allBehind = false; }
335 if (faceDistance < distance)
336 {
337 distance = faceDistance;
338 distFromSurface = faceDistFromSurface;
339 normal = faceNormal;
340 bestFace = *face;
341 if (distFromSurface <= 0) { break; }
342 }
343 }
344 } while( ++face < faces + numFace );
345
346 if (distance < kInfinity)
347 {
348 if (distFromSurface <= 0)
349 {
350 distance = 0;
351 }
352 else if (distFromSurface<kCarTolerance/2)
353 {
354 if (bestFace->Distance(p,true) < kCarTolerance/2) { distance = 0; }
355 }
356
357 if (calcNorm)
358 {
359 *validNorm = allBehind;
360 *n = normal;
361 }
362 }
363 else
364 {
365 if (Inside(p) == kSurface) { distance = 0; }
366 if (calcNorm) { *validNorm = false; }
367 }
368
369 return distance;
370}
virtual EInside Inside(const G4ThreeVector &p) const
@ kSurface
Definition: geomdefs.hh:58

◆ GetAreaAccuracy()

G4double G4VCSGfaceted::GetAreaAccuracy ( ) const

Definition at line 523 of file G4VCSGfaceted.cc.

524{
525 return fAreaAccuracy;
526}

◆ GetAreaStatistics()

G4int G4VCSGfaceted::GetAreaStatistics ( ) const

Definition at line 514 of file G4VCSGfaceted.cc.

515{
516 return fStatistics;
517}

◆ GetCubicVolume()

G4double G4VCSGfaceted::GetCubicVolume ( )
virtual

Reimplemented from G4VSolid.

Definition at line 552 of file G4VCSGfaceted.cc.

553{
554 if(fCubicVolume != 0.) {;}
555 else { fCubicVolume = EstimateCubicVolume(fStatistics,fCubVolEpsilon); }
556 return fCubicVolume;
557}
G4double EstimateCubicVolume(G4int nStat, G4double epsilon) const
Definition: G4VSolid.cc:203

◆ GetCubVolEpsilon()

G4double G4VCSGfaceted::GetCubVolEpsilon ( ) const

Definition at line 485 of file G4VCSGfaceted.cc.

486{
487 return fCubVolEpsilon;
488}

◆ GetCubVolStatistics()

G4int G4VCSGfaceted::GetCubVolStatistics ( ) const

Definition at line 476 of file G4VCSGfaceted.cc.

477{
478 return fStatistics;
479}

◆ GetEntityType()

G4GeometryType G4VCSGfaceted::GetEntityType ( ) const
virtual

Implements G4VSolid.

Reimplemented in G4Polycone, and G4Polyhedra.

Definition at line 450 of file G4VCSGfaceted.cc.

451{
452 return G4String("G4CSGfaceted");
453}

◆ GetExtent()

G4VisExtent G4VCSGfaceted::GetExtent ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 416 of file G4VCSGfaceted.cc.

417{
418 static const G4ThreeVector xMax(1,0,0), xMin(-1,0,0),
419 yMax(0,1,0), yMin(0,-1,0),
420 zMax(0,0,1), zMin(0,0,-1);
421 static const G4ThreeVector *axes[6] =
422 { &xMin, &xMax, &yMin, &yMax, &zMin, &zMax };
423
424 G4double answers[6] =
425 {-kInfinity, -kInfinity, -kInfinity, -kInfinity, -kInfinity, -kInfinity};
426
427 G4VCSGface **face = faces;
428 do
429 {
430 const G4ThreeVector **axis = axes+5 ;
431 G4double *answer = answers+5;
432 do
433 {
434 G4double testFace = (*face)->Extent( **axis );
435 if (testFace > *answer) { *answer = testFace; }
436 }
437 while( --axis, --answer >= answers );
438
439 } while( ++face < faces + numFace );
440
441 return G4VisExtent( -answers[0], answers[1],
442 -answers[2], answers[3],
443 -answers[4], answers[5] );
444}

◆ GetPointOnSurfaceGeneric()

G4ThreeVector G4VCSGfaceted::GetPointOnSurfaceGeneric ( ) const
protected

Definition at line 591 of file G4VCSGfaceted.cc.

592{
593 // Preparing variables
594 //
595 G4ThreeVector answer=G4ThreeVector(0.,0.,0.);
596 G4VCSGface **face = faces;
597 G4double area = 0;
598 G4int i;
599 std::vector<G4double> areas;
600
601 // First step: calculate surface areas
602 //
603 do
604 {
605 G4double result = (*face)->SurfaceArea( );
606 areas.push_back(result);
607 area=area+result;
608 } while( ++face < faces + numFace );
609
610 // Second Step: choose randomly one surface
611 //
612 G4VCSGface **face1 = faces;
613 G4double chose = area*G4UniformRand();
614 G4double Achose1, Achose2;
615 Achose1=0; Achose2=0.;
616 i=0;
617
618 do
619 {
620 Achose2+=areas[i];
621 if(chose>=Achose1 && chose<Achose2)
622 {
623 G4ThreeVector point;
624 point= (*face1)->GetPointOnFace();
625 return point;
626 }
627 i++;
628 Achose1=Achose2;
629 } while( ++face1 < faces + numFace );
630
631 return answer;
632}
CLHEP::Hep3Vector G4ThreeVector
int G4int
Definition: G4Types.hh:66
#define G4UniformRand()
Definition: Randomize.hh:53
virtual G4double SurfaceArea()=0

Referenced by G4Polycone::GetPointOnSurface(), and G4Polyhedra::GetPointOnSurface().

◆ GetPolyhedron()

G4Polyhedron * G4VCSGfaceted::GetPolyhedron ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 574 of file G4VCSGfaceted.cc.

575{
576 if (!fpPolyhedron ||
579 {
580 delete fpPolyhedron;
582 }
583 return fpPolyhedron;
584}
G4int GetNumberOfRotationStepsAtTimeOfCreation() const
virtual G4Polyhedron * CreatePolyhedron() const =0
static G4int GetNumberOfRotationSteps()

◆ GetSurfaceArea()

G4double G4VCSGfaceted::GetSurfaceArea ( )
virtual

Reimplemented from G4VSolid.

Definition at line 563 of file G4VCSGfaceted.cc.

564{
565 if(fSurfaceArea != 0.) {;}
566 else { fSurfaceArea = EstimateSurfaceArea(fStatistics,fAreaAccuracy); }
567 return fSurfaceArea;
568}
G4double EstimateSurfaceArea(G4int nStat, G4double ell) const
Definition: G4VSolid.cc:261

◆ Inside()

EInside G4VCSGfaceted::Inside ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

Reimplemented in G4Polycone, and G4Polyhedra.

Definition at line 210 of file G4VCSGfaceted.cc.

211{
212 EInside answer=kOutside;
213 G4VCSGface **face = faces;
214 G4double best = kInfinity;
215 do
216 {
217 G4double distance;
218 EInside result = (*face)->Inside( p, kCarTolerance/2, &distance );
219 if (result == kSurface) { return kSurface; }
220 if (distance < best)
221 {
222 best = distance;
223 answer = result;
224 }
225 } while( ++face < faces + numFace );
226
227 return answer;
228}
virtual EInside Inside(const G4ThreeVector &p, G4double tolerance, G4double *bestDistance)=0
EInside
Definition: geomdefs.hh:58
@ kOutside
Definition: geomdefs.hh:58

Referenced by DistanceToOut(), G4Polycone::Inside(), and G4Polyhedra::Inside().

◆ operator=()

const G4VCSGfaceted & G4VCSGfaceted::operator= ( const G4VCSGfaceted source)

Definition at line 110 of file G4VCSGfaceted.cc.

111{
112 if (&source == this) { return *this; }
113
114 // Copy base class data
115 //
116 G4VSolid::operator=(source);
117
118 // Copy data
119 //
120 fStatistics = source.fStatistics;
121 fCubVolEpsilon = source.fCubVolEpsilon;
122 fAreaAccuracy = source.fAreaAccuracy;
123
124 DeleteStuff();
125 CopyStuff( source );
126
127 return *this;
128}
G4VSolid & operator=(const G4VSolid &rhs)
Definition: G4VSolid.cc:110

Referenced by G4Polycone::operator=(), and G4Polyhedra::operator=().

◆ SetAreaAccuracy()

void G4VCSGfaceted::SetAreaAccuracy ( G4double  ep)

Definition at line 542 of file G4VCSGfaceted.cc.

543{
544 fSurfaceArea=0.;
545 fAreaAccuracy=ep;
546}

◆ SetAreaStatistics()

void G4VCSGfaceted::SetAreaStatistics ( G4int  st)

Definition at line 532 of file G4VCSGfaceted.cc.

533{
534 fSurfaceArea=0.;
535 fStatistics=st;
536}

◆ SetCubVolEpsilon()

void G4VCSGfaceted::SetCubVolEpsilon ( G4double  ep)

Definition at line 504 of file G4VCSGfaceted.cc.

505{
506 fCubicVolume=0.;
507 fCubVolEpsilon=ep;
508}

◆ SetCubVolStatistics()

void G4VCSGfaceted::SetCubVolStatistics ( G4int  st)

Definition at line 494 of file G4VCSGfaceted.cc.

495{
496 fCubicVolume=0.;
497 fStatistics=st;
498}

◆ StreamInfo()

std::ostream & G4VCSGfaceted::StreamInfo ( std::ostream &  os) const
virtual

Implements G4VSolid.

Reimplemented in G4Polycone, and G4Polyhedra.

Definition at line 459 of file G4VCSGfaceted.cc.

460{
461 os << "-----------------------------------------------------------\n"
462 << " *** Dump for solid - " << GetName() << " ***\n"
463 << " ===================================================\n"
464 << " Solid type: G4VCSGfaceted\n"
465 << " Parameters: \n"
466 << " number of faces: " << numFace << "\n"
467 << "-----------------------------------------------------------\n";
468
469 return os;
470}
G4String GetName() const

◆ SurfaceNormal()

G4ThreeVector G4VCSGfaceted::SurfaceNormal ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

Definition at line 234 of file G4VCSGfaceted.cc.

235{
236 G4ThreeVector answer;
237 G4VCSGface **face = faces;
238 G4double best = kInfinity;
239 do
240 {
241 G4double distance;
242 G4ThreeVector normal = (*face)->Normal( p, &distance );
243 if (distance < best)
244 {
245 best = distance;
246 answer = normal;
247 }
248 } while( ++face < faces + numFace );
249
250 return answer;
251}

Member Data Documentation

◆ faces

◆ fCubicVolume

G4double G4VCSGfaceted::fCubicVolume
protected

Definition at line 121 of file G4VCSGfaceted.hh.

Referenced by CopyStuff(), GetCubicVolume(), SetCubVolEpsilon(), and SetCubVolStatistics().

◆ fpPolyhedron

G4Polyhedron* G4VCSGfaceted::fpPolyhedron
mutableprotected

Definition at line 123 of file G4VCSGfaceted.hh.

Referenced by CopyStuff(), GetPolyhedron(), and ~G4VCSGfaceted().

◆ fSurfaceArea

G4double G4VCSGfaceted::fSurfaceArea
protected

Definition at line 122 of file G4VCSGfaceted.hh.

Referenced by CopyStuff(), GetSurfaceArea(), SetAreaAccuracy(), and SetAreaStatistics().

◆ numFace


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