Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4VCSGfaceted Class Referenceabstract

#include <G4VCSGfaceted.hh>

Inheritance diagram for G4VCSGfaceted:
Collaboration diagram for G4VCSGfaceted:

Public Member Functions

 G4VCSGfaceted (const G4String &name)
 
virtual ~G4VCSGfaceted ()
 
 G4VCSGfaceted (const G4VCSGfaceted &source)
 
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 void Extent (G4ThreeVector &pMin, G4ThreeVector &pMax) const
 
virtual void ComputeDimensions (G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
 
virtual G4ThreeVector GetPointOnSurface () const
 
virtual G4VSolidClone () const
 
void DumpInfo () 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

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
 

Protected Attributes

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

Detailed Description

Definition at line 53 of file G4VCSGfaceted.hh.

Constructor & Destructor Documentation

G4VCSGfaceted::G4VCSGfaceted ( const G4String name)

Definition at line 69 of file G4VCSGfaceted.cc.

70  : G4VSolid(name),
71  numFace(0), faces(0), fCubicVolume(0.), fSurfaceArea(0.),
73  fStatistics(1000000), fCubVolEpsilon(0.001), fAreaAccuracy(-1.)
74 {
75 }
G4double fSurfaceArea
G4bool fRebuildPolyhedron
G4Polyhedron * fpPolyhedron
G4double fCubicVolume
G4VCSGface ** faces
G4VSolid(const G4String &name)
Definition: G4VSolid.cc:61
G4VCSGfaceted::~G4VCSGfaceted ( )
virtual

Definition at line 93 of file G4VCSGfaceted.cc.

94 {
95  DeleteStuff();
96  delete fpPolyhedron; fpPolyhedron = 0;
97 }
G4Polyhedron * fpPolyhedron

Here is the call graph for this function:

G4VCSGfaceted::G4VCSGfaceted ( const G4VCSGfaceted source)

Definition at line 103 of file G4VCSGfaceted.cc.

104  : G4VSolid( source )
105 {
106  fStatistics = source.fStatistics;
107  fCubVolEpsilon = source.fCubVolEpsilon;
108  fAreaAccuracy = source.fAreaAccuracy;
109 
110  CopyStuff( source );
111 }
void CopyStuff(const G4VCSGfaceted &source)
G4VSolid(const G4String &name)
Definition: G4VSolid.cc:61

Here is the call graph for this function:

G4VCSGfaceted::G4VCSGfaceted ( __void__ &  a)

Definition at line 82 of file G4VCSGfaceted.cc.

83  : G4VSolid(a),
84  numFace(0), faces(0), fCubicVolume(0.), fSurfaceArea(0.),
86  fStatistics(1000000), fCubVolEpsilon(0.001), fAreaAccuracy(-1.)
87 {
88 }
G4double fSurfaceArea
G4bool fRebuildPolyhedron
G4Polyhedron * fpPolyhedron
std::vector< ExP01TrackerHit * > a
Definition: ExP01Classes.hh:33
G4double fCubicVolume
G4VCSGface ** faces
G4VSolid(const G4String &name)
Definition: G4VSolid.cc:61

Member Function Documentation

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

Implements G4VSolid.

Reimplemented in G4Polyhedra, G4Polycone, and G4GenericPolycone.

Definition at line 187 of file G4VCSGfaceted.cc.

192 {
193  G4SolidExtentList extentList( axis, voxelLimit );
194 
195  //
196  // Loop over all faces, checking min/max extent as we go.
197  //
198  G4VCSGface **face = faces;
199  do // Loop checking, 13.08.2015, G.Cosmo
200  {
201  (*face)->CalculateExtent( axis, voxelLimit, transform, extentList );
202  } while( ++face < faces + numFace );
203 
204  //
205  // Return min/max value
206  //
207  return extentList.GetExtent( min, max );
208 }
G4VCSGface ** faces
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
virtual void CalculateExtent(const EAxis axis, const G4VoxelLimits &voxelLimit, const G4AffineTransform &tranform, G4SolidExtentList &extentList)=0

Here is the call graph for this function:

void G4VCSGfaceted::CopyStuff ( const G4VCSGfaceted source)
protected

Definition at line 143 of file G4VCSGfaceted.cc.

144 {
145  numFace = source.numFace;
146  if (numFace == 0) { return; } // odd, but permissable?
147 
148  faces = new G4VCSGface*[numFace];
149 
150  G4VCSGface **face = faces,
151  **sourceFace = source.faces;
152  do // Loop checking, 13.08.2015, G.Cosmo
153  {
154  *face = (*sourceFace)->Clone();
155  } while( ++sourceFace, ++face < faces+numFace );
156  fCubicVolume = source.fCubicVolume;
157  fSurfaceArea = source.fSurfaceArea;
158  fRebuildPolyhedron = false;
159  fpPolyhedron = 0;
160 }
G4double fSurfaceArea
G4bool fRebuildPolyhedron
G4Polyhedron * fpPolyhedron
virtual G4VCSGface * Clone()=0
G4double fCubicVolume
G4VCSGface ** faces

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented from G4VSolid.

Implemented in G4Polyhedra, G4Polycone, and G4GenericPolycone.

Here is the caller graph for this function:

void G4VCSGfaceted::DeleteStuff ( )
protected

Definition at line 168 of file G4VCSGfaceted.cc.

169 {
170  if (numFace)
171  {
172  G4VCSGface **face = faces;
173  do // Loop checking, 13.08.2015, G.Cosmo
174  {
175  delete *face;
176  } while( ++face < faces + numFace );
177 
178  delete [] faces;
179  }
180  delete fpPolyhedron; fpPolyhedron = 0;
181 }
G4Polyhedron * fpPolyhedron
G4VCSGface ** faces

Here is the caller graph for this function:

void G4VCSGfaceted::DescribeYourselfTo ( G4VGraphicsScene scene) const
virtual

Implements G4VSolid.

Definition at line 414 of file G4VCSGfaceted.cc.

415 {
416  scene.AddSolid( *this );
417 }
virtual void AddSolid(const G4Box &)=0

Here is the call graph for this function:

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

Definition at line 396 of file G4VCSGfaceted.cc.

398 {
399  G4VCSGface **face = faces;
400  G4double best = kInfinity;
401  do // Loop checking, 13.08.2015, G.Cosmo
402  {
403  G4double distance = (*face)->Distance( p, outgoing );
404  if (distance < best) { best = distance; }
405  } while( ++face < faces + numFace );
406 
407  return (best < 0.5*kCarTolerance) ? 0 : best;
408 }
static const G4double kInfinity
Definition: geomdefs.hh:42
G4VCSGface ** faces
G4double kCarTolerance
Definition: G4VSolid.hh:307
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

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

Implements G4VSolid.

Reimplemented in G4Polycone, G4Polyhedra, and G4GenericPolycone.

Definition at line 266 of file G4VCSGfaceted.cc.

268 {
269  G4double distance = kInfinity;
270  G4double distFromSurface = kInfinity;
271  G4VCSGface **face = faces;
272  G4VCSGface *bestFace = *face;
273  do // Loop checking, 13.08.2015, G.Cosmo
274  {
275  G4double faceDistance,
276  faceDistFromSurface;
277  G4ThreeVector faceNormal;
278  G4bool faceAllBehind;
279  if ((*face)->Intersect( p, v, false, kCarTolerance/2,
280  faceDistance, faceDistFromSurface,
281  faceNormal, faceAllBehind ) )
282  {
283  //
284  // Intersecting face
285  //
286  if (faceDistance < distance)
287  {
288  distance = faceDistance;
289  distFromSurface = faceDistFromSurface;
290  bestFace = *face;
291  if (distFromSurface <= 0) { return 0; }
292  }
293  }
294  } while( ++face < faces + numFace );
295 
296  if (distance < kInfinity && distFromSurface<kCarTolerance/2)
297  {
298  if (bestFace->Distance(p,false) < kCarTolerance/2) { distance = 0; }
299  }
300 
301  return distance;
302 }
static const G4double kInfinity
Definition: geomdefs.hh:42
bool G4bool
Definition: G4Types.hh:79
G4VCSGface ** faces
G4double kCarTolerance
Definition: G4VSolid.hh:307
double G4double
Definition: G4Types.hh:76
virtual G4double Distance(const G4ThreeVector &p, G4bool outgoing)=0

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements G4VSolid.

Reimplemented in G4Polyhedra, G4Polycone, and G4GenericPolycone.

Definition at line 308 of file G4VCSGfaceted.cc.

309 {
310  return DistanceTo( p, false );
311 }
virtual G4double DistanceTo(const G4ThreeVector &p, const G4bool outgoing) const

Here is the call graph for this function:

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 317 of file G4VCSGfaceted.cc.

322 {
323  G4bool allBehind = true;
324  G4double distance = kInfinity;
325  G4double distFromSurface = kInfinity;
327 
328  G4VCSGface **face = faces;
329  G4VCSGface *bestFace = *face;
330  do // Loop checking, 13.08.2015, G.Cosmo
331  {
332  G4double faceDistance,
333  faceDistFromSurface;
334  G4ThreeVector faceNormal;
335  G4bool faceAllBehind;
336  if ((*face)->Intersect( p, v, true, kCarTolerance/2,
337  faceDistance, faceDistFromSurface,
338  faceNormal, faceAllBehind ) )
339  {
340  //
341  // Intersecting face
342  //
343  if ( (distance < kInfinity) || (!faceAllBehind) ) { allBehind = false; }
344  if (faceDistance < distance)
345  {
346  distance = faceDistance;
347  distFromSurface = faceDistFromSurface;
348  normal = faceNormal;
349  bestFace = *face;
350  if (distFromSurface <= 0) { break; }
351  }
352  }
353  } while( ++face < faces + numFace );
354 
355  if (distance < kInfinity)
356  {
357  if (distFromSurface <= 0)
358  {
359  distance = 0;
360  }
361  else if (distFromSurface<kCarTolerance/2)
362  {
363  if (bestFace->Distance(p,true) < kCarTolerance/2) { distance = 0; }
364  }
365 
366  if (calcNorm)
367  {
368  *validNorm = allBehind;
369  *n = normal;
370  }
371  }
372  else
373  {
374  if (Inside(p) == kSurface) { distance = 0; }
375  if (calcNorm) { *validNorm = false; }
376  }
377 
378  return distance;
379 }
static const G4double kInfinity
Definition: geomdefs.hh:42
static double normal(HepRandomEngine *eptr)
Definition: RandPoisson.cc:77
bool G4bool
Definition: G4Types.hh:79
G4VCSGface ** faces
G4double kCarTolerance
Definition: G4VSolid.hh:307
double G4double
Definition: G4Types.hh:76
virtual EInside Inside(const G4ThreeVector &p) const
virtual G4double Distance(const G4ThreeVector &p, G4bool outgoing)=0

Here is the call graph for this function:

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

Implements G4VSolid.

Definition at line 385 of file G4VCSGfaceted.cc.

386 {
387  return DistanceTo( p, true );
388 }
virtual G4double DistanceTo(const G4ThreeVector &p, const G4bool outgoing) const

Here is the call graph for this function:

G4double G4VCSGfaceted::GetAreaAccuracy ( ) const

Definition at line 532 of file G4VCSGfaceted.cc.

533 {
534  return fAreaAccuracy;
535 }
G4int G4VCSGfaceted::GetAreaStatistics ( ) const

Definition at line 523 of file G4VCSGfaceted.cc.

524 {
525  return fStatistics;
526 }
G4double G4VCSGfaceted::GetCubicVolume ( )
virtual

Reimplemented from G4VSolid.

Definition at line 561 of file G4VCSGfaceted.cc.

562 {
563  if(fCubicVolume != 0.) {;}
564  else { fCubicVolume = EstimateCubicVolume(fStatistics,fCubVolEpsilon); }
565  return fCubicVolume;
566 }
G4double EstimateCubicVolume(G4int nStat, G4double epsilon) const
Definition: G4VSolid.cc:204
G4double fCubicVolume

Here is the call graph for this function:

G4double G4VCSGfaceted::GetCubVolEpsilon ( ) const

Definition at line 494 of file G4VCSGfaceted.cc.

495 {
496  return fCubVolEpsilon;
497 }
G4int G4VCSGfaceted::GetCubVolStatistics ( ) const

Definition at line 485 of file G4VCSGfaceted.cc.

486 {
487  return fStatistics;
488 }
G4GeometryType G4VCSGfaceted::GetEntityType ( ) const
virtual

Implements G4VSolid.

Reimplemented in G4Polycone, G4Polyhedra, and G4GenericPolycone.

Definition at line 459 of file G4VCSGfaceted.cc.

460 {
461  return G4String("G4CSGfaceted");
462 }
G4VisExtent G4VCSGfaceted::GetExtent ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 425 of file G4VCSGfaceted.cc.

426 {
427  static const G4ThreeVector xMax(1,0,0), xMin(-1,0,0),
428  yMax(0,1,0), yMin(0,-1,0),
429  zMax(0,0,1), zMin(0,0,-1);
430  static const G4ThreeVector *axes[6] =
431  { &xMin, &xMax, &yMin, &yMax, &zMin, &zMax };
432 
433  G4double answers[6] =
434  {-kInfinity, -kInfinity, -kInfinity, -kInfinity, -kInfinity, -kInfinity};
435 
436  G4VCSGface **face = faces;
437  do // Loop checking, 13.08.2015, G.Cosmo
438  {
439  const G4ThreeVector **axis = axes+5 ;
440  G4double *answer = answers+5;
441  do // Loop checking, 13.08.2015, G.Cosmo
442  {
443  G4double testFace = (*face)->Extent( **axis );
444  if (testFace > *answer) { *answer = testFace; }
445  }
446  while( --axis, --answer >= answers );
447 
448  } while( ++face < faces + numFace );
449 
450  return G4VisExtent( -answers[0], answers[1],
451  -answers[2], answers[3],
452  -answers[4], answers[5] );
453 }
static const G4double kInfinity
Definition: geomdefs.hh:42
G4VCSGface ** faces
double G4double
Definition: G4Types.hh:76
G4ThreeVector G4VCSGfaceted::GetPointOnSurfaceGeneric ( ) const
protected

Definition at line 604 of file G4VCSGfaceted.cc.

605 {
606  // Preparing variables
607  //
608  G4ThreeVector answer=G4ThreeVector(0.,0.,0.);
609  G4VCSGface **face = faces;
610  G4double area = 0;
611  G4int i;
612  std::vector<G4double> areas;
613 
614  // First step: calculate surface areas
615  //
616  do // Loop checking, 13.08.2015, G.Cosmo
617  {
618  G4double result = (*face)->SurfaceArea( );
619  areas.push_back(result);
620  area=area+result;
621  } while( ++face < faces + numFace );
622 
623  // Second Step: choose randomly one surface
624  //
625  G4VCSGface **face1 = faces;
626  G4double chose = area*G4UniformRand();
627  G4double Achose1, Achose2;
628  Achose1=0; Achose2=0.;
629  i=0;
630 
631  do
632  {
633  Achose2+=areas[i];
634  if(chose>=Achose1 && chose<Achose2)
635  {
636  G4ThreeVector point;
637  point= (*face1)->GetPointOnFace();
638  return point;
639  }
640  i++;
641  Achose1=Achose2;
642  } while( ++face1 < faces + numFace );
643 
644  return answer;
645 }
G4double G4ParticleHPJENDLHEData::G4double result
CLHEP::Hep3Vector G4ThreeVector
int G4int
Definition: G4Types.hh:78
#define G4UniformRand()
Definition: Randomize.hh:97
G4VCSGface ** faces
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

G4Polyhedron * G4VCSGfaceted::GetPolyhedron ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 583 of file G4VCSGfaceted.cc.

584 {
585  if (!fpPolyhedron ||
589  {
590  G4AutoLock l(&polyhedronMutex);
591  delete fpPolyhedron;
593  fRebuildPolyhedron = false;
594  l.unlock();
595  }
596  return fpPolyhedron;
597 }
G4bool fRebuildPolyhedron
G4Polyhedron * fpPolyhedron
virtual G4Polyhedron * CreatePolyhedron() const =0
static G4int GetNumberOfRotationSteps()
G4int GetNumberOfRotationStepsAtTimeOfCreation() const

Here is the call graph for this function:

G4double G4VCSGfaceted::GetSurfaceArea ( )
virtual

Reimplemented from G4VSolid.

Definition at line 572 of file G4VCSGfaceted.cc.

573 {
574  if(fSurfaceArea != 0.) {;}
575  else { fSurfaceArea = EstimateSurfaceArea(fStatistics,fAreaAccuracy); }
576  return fSurfaceArea;
577 }
G4double fSurfaceArea
G4double EstimateSurfaceArea(G4int nStat, G4double ell) const
Definition: G4VSolid.cc:264

Here is the call graph for this function:

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

Implements G4VSolid.

Reimplemented in G4Polycone, G4Polyhedra, and G4GenericPolycone.

Definition at line 219 of file G4VCSGfaceted.cc.

220 {
221  EInside answer=kOutside;
222  G4VCSGface **face = faces;
223  G4double best = kInfinity;
224  do // Loop checking, 13.08.2015, G.Cosmo
225  {
226  G4double distance;
227  EInside result = (*face)->Inside( p, kCarTolerance/2, &distance );
228  if (result == kSurface) { return kSurface; }
229  if (distance < best)
230  {
231  best = distance;
232  answer = result;
233  }
234  } while( ++face < faces + numFace );
235 
236  return answer;
237 }
G4double G4ParticleHPJENDLHEData::G4double result
static const G4double kInfinity
Definition: geomdefs.hh:42
G4VCSGface ** faces
EInside
Definition: geomdefs.hh:58
G4double kCarTolerance
Definition: G4VSolid.hh:307
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

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

Definition at line 117 of file G4VCSGfaceted.cc.

118 {
119  if (&source == this) { return *this; }
120 
121  // Copy base class data
122  //
123  G4VSolid::operator=(source);
124 
125  // Copy data
126  //
127  fStatistics = source.fStatistics;
128  fCubVolEpsilon = source.fCubVolEpsilon;
129  fAreaAccuracy = source.fAreaAccuracy;
130 
131  DeleteStuff();
132  CopyStuff( source );
133 
134  return *this;
135 }
void CopyStuff(const G4VCSGfaceted &source)
G4VSolid & operator=(const G4VSolid &rhs)
Definition: G4VSolid.cc:111

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VCSGfaceted::SetAreaAccuracy ( G4double  ep)

Definition at line 551 of file G4VCSGfaceted.cc.

552 {
553  fSurfaceArea=0.;
554  fAreaAccuracy=ep;
555 }
G4double fSurfaceArea
void G4VCSGfaceted::SetAreaStatistics ( G4int  st)

Definition at line 541 of file G4VCSGfaceted.cc.

542 {
543  fSurfaceArea=0.;
544  fStatistics=st;
545 }
G4double fSurfaceArea
void G4VCSGfaceted::SetCubVolEpsilon ( G4double  ep)

Definition at line 513 of file G4VCSGfaceted.cc.

514 {
515  fCubicVolume=0.;
516  fCubVolEpsilon=ep;
517 }
G4double fCubicVolume
void G4VCSGfaceted::SetCubVolStatistics ( G4int  st)

Definition at line 503 of file G4VCSGfaceted.cc.

504 {
505  fCubicVolume=0.;
506  fStatistics=st;
507 }
G4double fCubicVolume
std::ostream & G4VCSGfaceted::StreamInfo ( std::ostream &  os) const
virtual

Implements G4VSolid.

Reimplemented in G4Polyhedra, G4Polycone, and G4GenericPolycone.

Definition at line 468 of file G4VCSGfaceted.cc.

469 {
470  os << "-----------------------------------------------------------\n"
471  << " *** Dump for solid - " << GetName() << " ***\n"
472  << " ===================================================\n"
473  << " Solid type: G4VCSGfaceted\n"
474  << " Parameters: \n"
475  << " number of faces: " << numFace << "\n"
476  << "-----------------------------------------------------------\n";
477 
478  return os;
479 }
G4String GetName() const

Here is the call graph for this function:

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

Implements G4VSolid.

Definition at line 243 of file G4VCSGfaceted.cc.

244 {
245  G4ThreeVector answer;
246  G4VCSGface **face = faces;
247  G4double best = kInfinity;
248  do // Loop checking, 13.08.2015, G.Cosmo
249  {
250  G4double distance;
251  G4ThreeVector normal = (*face)->Normal( p, &distance );
252  if (distance < best)
253  {
254  best = distance;
255  answer = normal;
256  }
257  } while( ++face < faces + numFace );
258 
259  return answer;
260 }
static const G4double kInfinity
Definition: geomdefs.hh:42
static double normal(HepRandomEngine *eptr)
Definition: RandPoisson.cc:77
G4VCSGface ** faces
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Member Data Documentation

G4VCSGface** G4VCSGfaceted::faces
protected

Definition at line 120 of file G4VCSGfaceted.hh.

G4double G4VCSGfaceted::fCubicVolume
protected

Definition at line 121 of file G4VCSGfaceted.hh.

G4Polyhedron* G4VCSGfaceted::fpPolyhedron
mutableprotected

Definition at line 124 of file G4VCSGfaceted.hh.

G4bool G4VCSGfaceted::fRebuildPolyhedron
mutableprotected

Definition at line 123 of file G4VCSGfaceted.hh.

G4double G4VCSGfaceted::fSurfaceArea
protected

Definition at line 122 of file G4VCSGfaceted.hh.

G4int G4VCSGfaceted::numFace
protected

Definition at line 119 of file G4VCSGfaceted.hh.


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