Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4UPolyhedra Class Reference

#include <G4UPolyhedra.hh>

Inheritance diagram for G4UPolyhedra:
G4USolid G4VSolid

Public Member Functions

 G4UPolyhedra (const G4String &name, G4double phiStart, G4double phiTotal, G4int numSide, G4int numZPlanes, const G4double zPlane[], const G4double rInner[], const G4double rOuter[])
 
 G4UPolyhedra (const G4String &name, G4double phiStart, G4double phiTotal, G4int numSide, G4int numRZ, const G4double r[], const G4double z[])
 
 ~G4UPolyhedra ()
 
void ComputeDimensions (G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
 
G4VSolidClone () const
 
UPolyhedraGetShape () const
 
G4int GetNumSide () const
 
G4double GetStartPhi () const
 
G4double GetEndPhi () const
 
G4bool IsOpen () const
 
G4bool IsGeneric () const
 
G4int GetNumRZCorner () const
 
G4PolyhedraSideRZ GetCorner (const G4int index) const
 
G4PolyhedraHistoricalGetOriginalParameters () const
 
void SetOriginalParameters (G4PolyhedraHistorical *pars)
 
G4bool Reset ()
 
 G4UPolyhedra (__void__ &)
 
 G4UPolyhedra (const G4UPolyhedra &source)
 
G4UPolyhedraoperator= (const G4UPolyhedra &source)
 
G4PolyhedronCreatePolyhedron () const
 
- Public Member Functions inherited from G4USolid
 G4USolid (const G4String &pName, VUSolid *shape)
 
virtual ~G4USolid ()
 
G4bool operator== (const G4USolid &s) const
 
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 G4double GetCubicVolume ()
 
virtual G4double GetSurfaceArea ()
 
virtual G4GeometryType GetEntityType () const
 
virtual G4ThreeVector GetPointOnSurface () const
 
virtual std::ostream & StreamInfo (std::ostream &os) const
 
virtual void DescribeYourselfTo (G4VGraphicsScene &scene) const
 
virtual G4VisExtent GetExtent () const
 
G4PolyhedronCreatePolyhedron () const
 
virtual G4PolyhedronGetPolyhedron () const
 
 G4USolid (__void__ &)
 
 G4USolid (const G4USolid &rhs)
 
G4USolidoperator= (const G4USolid &rhs)
 
VUSolidGetSolid () const
 
- 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 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)
 

Additional Inherited Members

- Protected Member Functions inherited from G4USolid
G4ThreeVectorListCreateRotatedVertices (const G4AffineTransform &pT) 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
 
G4double EstimateCubicVolume (G4int nStat, G4double epsilon) const
 
G4double EstimateSurfaceArea (G4int nStat, G4double ell) const
 
- Protected Attributes inherited from G4USolid
VUSolidfShape
 
G4PolyhedronfPolyhedron
 
- Protected Attributes inherited from G4VSolid
G4double kCarTolerance
 

Detailed Description

Definition at line 54 of file G4UPolyhedra.hh.

Constructor & Destructor Documentation

G4UPolyhedra::G4UPolyhedra ( const G4String name,
G4double  phiStart,
G4double  phiTotal,
G4int  numSide,
G4int  numZPlanes,
const G4double  zPlane[],
const G4double  rInner[],
const G4double  rOuter[] 
)

Definition at line 45 of file G4UPolyhedra.cc.

Referenced by Clone().

53  : G4USolid(name, new UPolyhedra(name,phiStart, phiTotal, numSide,
54  numZPlanes, zPlane, rInner, rOuter))
55 {
56 }
G4USolid(const G4String &pName, VUSolid *shape)
Definition: G4USolid.cc:44
G4UPolyhedra::G4UPolyhedra ( const G4String name,
G4double  phiStart,
G4double  phiTotal,
G4int  numSide,
G4int  numRZ,
const G4double  r[],
const G4double  z[] 
)

Definition at line 63 of file G4UPolyhedra.cc.

70  : G4USolid(name, new UPolyhedra(name, phiStart, phiTotal, numSide,
71  numRZ, r, z))
72 {
73 }
G4double z
Definition: TRTMaterials.hh:39
G4USolid(const G4String &pName, VUSolid *shape)
Definition: G4USolid.cc:44
G4UPolyhedra::~G4UPolyhedra ( )

Definition at line 91 of file G4UPolyhedra.cc.

92 {
93 }
G4UPolyhedra::G4UPolyhedra ( __void__ &  a)

Definition at line 81 of file G4UPolyhedra.cc.

82  : G4USolid(a)
83 {
84 }
G4USolid(const G4String &pName, VUSolid *shape)
Definition: G4USolid.cc:44
G4UPolyhedra::G4UPolyhedra ( const G4UPolyhedra source)

Definition at line 100 of file G4UPolyhedra.cc.

101  : G4USolid( source )
102 {
103 }
G4USolid(const G4String &pName, VUSolid *shape)
Definition: G4USolid.cc:44

Member Function Documentation

G4VSolid * G4UPolyhedra::Clone ( ) const
virtual

Reimplemented from G4USolid.

Definition at line 137 of file G4UPolyhedra.cc.

References G4UPolyhedra().

138 {
139  return new G4UPolyhedra(*this);
140 }
G4UPolyhedra(const G4String &name, G4double phiStart, G4double phiTotal, G4int numSide, G4int numZPlanes, const G4double zPlane[], const G4double rInner[], const G4double rOuter[])
Definition: G4UPolyhedra.cc:45
void G4UPolyhedra::ComputeDimensions ( G4VPVParameterisation p,
const G4int  n,
const G4VPhysicalVolume pRep 
)
virtual

Reimplemented from G4USolid.

Definition at line 125 of file G4UPolyhedra.cc.

References G4VPVParameterisation::ComputeDimensions().

128 {
129  p->ComputeDimensions(*(G4Polyhedra*)this,n,pRep);
130 }
const G4int n
virtual void ComputeDimensions(G4Box &, const G4int, const G4VPhysicalVolume *) const
G4Polyhedron * G4UPolyhedra::CreatePolyhedron ( ) const
virtual

Creates user defined polyhedron. This function allows to the user to define arbitrary polyhedron. The faces of the polyhedron should be either triangles or planar quadrilateral. Nodes of a face are defined by indexes pointing to the elements in the xyz array. Numeration of the elements in the array starts from 1 (like in fortran). The indexes can be positive or negative. Negative sign means that the corresponding edge is invisible. The normal of the face should be directed to exterior of the polyhedron.

Parameters
Nnodesnumber of nodes
Nfacesnumber of faces
xyznodes
faces_vecfaces (quadrilaterals or triangles)
Returns
status of the operation - is non-zero in case of problem

Reimplemented from G4VSolid.

Definition at line 147 of file G4UPolyhedra.cc.

References test::a, test::b, test::c, HepPolyhedron::createPolyhedron(), G4Exception(), GetCorner(), GetEndPhi(), G4VSolid::GetName(), GetNumRZCorner(), GetNumSide(), GetOriginalParameters(), GetStartPhi(), IsGeneric(), IsOpen(), JustWarning, G4VSolid::kCarTolerance, G4PolyhedraSideRZ::r, python.hepunit::twopi, and G4PolyhedraSideRZ::z.

148 {
149  if (!IsGeneric())
150  {
151  G4PolyhedraHistorical* original_parameters = GetOriginalParameters();
153  polyhedron = new G4PolyhedronPgon( GetOriginalParameters()->Start_angle,
154  GetOriginalParameters()->Opening_angle,
155  GetOriginalParameters()->numSide,
156  GetOriginalParameters()->Num_z_planes,
157  GetOriginalParameters()->Z_values,
158  GetOriginalParameters()->Rmin,
159  GetOriginalParameters()->Rmax);
160  delete original_parameters; // delete local copy
161  return polyhedron;
162  }
163  else
164  {
165  // The following code prepares for:
166  // HepPolyhedron::createPolyhedron(int Nnodes, int Nfaces,
167  // const double xyz[][3],
168  // const int faces_vec[][4])
169  // Here is an extract from the header file HepPolyhedron.h:
170  /**
171  * Creates user defined polyhedron.
172  * This function allows to the user to define arbitrary polyhedron.
173  * The faces of the polyhedron should be either triangles or planar
174  * quadrilateral. Nodes of a face are defined by indexes pointing to
175  * the elements in the xyz array. Numeration of the elements in the
176  * array starts from 1 (like in fortran). The indexes can be positive
177  * or negative. Negative sign means that the corresponding edge is
178  * invisible. The normal of the face should be directed to exterior
179  * of the polyhedron.
180  *
181  * @param Nnodes number of nodes
182  * @param Nfaces number of faces
183  * @param xyz nodes
184  * @param faces_vec faces (quadrilaterals or triangles)
185  * @return status of the operation - is non-zero in case of problem
186  */
187  G4int nNodes;
188  G4int nFaces;
189  typedef G4double double3[3];
190  double3* xyz;
191  typedef G4int int4[4];
192  int4* faces_vec;
193  if (IsOpen())
194  {
195  // Triangulate open ends. Simple ear-chopping algorithm...
196  // I'm not sure how robust this algorithm is (J.Allison).
197  //
198  std::vector<G4bool> chopped(GetNumRZCorner(), false);
199  std::vector<G4int*> triQuads;
200  G4int remaining = GetNumRZCorner();
201  G4int iStarter = 0;
202  while (remaining >= 3)
203  {
204  // Find unchopped corners...
205  //
206  G4int A = -1, B = -1, C = -1;
207  G4int iStepper = iStarter;
208  do
209  {
210  if (A < 0) { A = iStepper; }
211  else if (B < 0) { B = iStepper; }
212  else if (C < 0) { C = iStepper; }
213  do
214  {
215  if (++iStepper >= GetNumRZCorner()) iStepper = 0;
216  }
217  while (chopped[iStepper]);
218  }
219  while (C < 0 && iStepper != iStarter);
220 
221  // Check triangle at B is pointing outward (an "ear").
222  // Sign of z cross product determines...
223 
224  G4double BAr = GetCorner(A).r - GetCorner(B).r;
225  G4double BAz = GetCorner(A).z - GetCorner(B).z;
226  G4double BCr = GetCorner(C).r - GetCorner(B).r;
227  G4double BCz = GetCorner(C).z - GetCorner(B).z;
228  if (BAr * BCz - BAz * BCr < kCarTolerance)
229  {
230  G4int* tq = new G4int[3];
231  tq[0] = A + 1;
232  tq[1] = B + 1;
233  tq[2] = C + 1;
234  triQuads.push_back(tq);
235  chopped[B] = true;
236  --remaining;
237  }
238  else
239  {
240  do
241  {
242  if (++iStarter >= GetNumRZCorner()) { iStarter = 0; }
243  }
244  while (chopped[iStarter]);
245  }
246  }
247 
248  // Transfer to faces...
249  G4int numSide=GetNumSide();
250  nNodes = (numSide + 1) * GetNumRZCorner();
251  nFaces = numSide * GetNumRZCorner() + 2 * triQuads.size();
252  faces_vec = new int4[nFaces];
253  G4int iface = 0;
254  G4int addition = GetNumRZCorner() * numSide;
255  G4int d = GetNumRZCorner() - 1;
256  for (G4int iEnd = 0; iEnd < 2; ++iEnd)
257  {
258  for (size_t i = 0; i < triQuads.size(); ++i)
259  {
260  // Negative for soft/auxiliary/normally invisible edges...
261  //
262  G4int a, b, c;
263  if (iEnd == 0)
264  {
265  a = triQuads[i][0];
266  b = triQuads[i][1];
267  c = triQuads[i][2];
268  }
269  else
270  {
271  a = triQuads[i][0] + addition;
272  b = triQuads[i][2] + addition;
273  c = triQuads[i][1] + addition;
274  }
275  G4int ab = std::abs(b - a);
276  G4int bc = std::abs(c - b);
277  G4int ca = std::abs(a - c);
278  faces_vec[iface][0] = (ab == 1 || ab == d)? a: -a;
279  faces_vec[iface][1] = (bc == 1 || bc == d)? b: -b;
280  faces_vec[iface][2] = (ca == 1 || ca == d)? c: -c;
281  faces_vec[iface][3] = 0;
282  ++iface;
283  }
284  }
285 
286  // Continue with sides...
287 
288  xyz = new double3[nNodes];
289  const G4double dPhi = (GetEndPhi() - GetStartPhi()) / numSide;
290  G4double phi = GetStartPhi();
291  G4int ixyz = 0;
292  for (G4int iSide = 0; iSide < numSide; ++iSide)
293  {
294  for (G4int iCorner = 0; iCorner < GetNumRZCorner(); ++iCorner)
295  {
296  xyz[ixyz][0] = GetCorner(iCorner).r * std::cos(phi);
297  xyz[ixyz][1] = GetCorner(iCorner).r * std::sin(phi);
298  xyz[ixyz][2] = GetCorner(iCorner).z;
299  if (iCorner < GetNumRZCorner() - 1)
300  {
301  faces_vec[iface][0] = ixyz + 1;
302  faces_vec[iface][1] = ixyz + GetNumRZCorner() + 1;
303  faces_vec[iface][2] = ixyz + GetNumRZCorner() + 2;
304  faces_vec[iface][3] = ixyz + 2;
305  }
306  else
307  {
308  faces_vec[iface][0] = ixyz + 1;
309  faces_vec[iface][1] = ixyz + GetNumRZCorner() + 1;
310  faces_vec[iface][2] = ixyz + 2;
311  faces_vec[iface][3] = ixyz - GetNumRZCorner() + 2;
312  }
313  ++iface;
314  ++ixyz;
315  }
316  phi += dPhi;
317  }
318 
319  // Last GetCorner...
320 
321  for (G4int iCorner = 0; iCorner < GetNumRZCorner(); ++iCorner)
322  {
323  xyz[ixyz][0] = GetCorner(iCorner).r * std::cos(phi);
324  xyz[ixyz][1] = GetCorner(iCorner).r * std::sin(phi);
325  xyz[ixyz][2] = GetCorner(iCorner).z;
326  ++ixyz;
327  }
328  }
329  else // !phiIsOpen - i.e., a complete 360 degrees.
330  {
331  nNodes = GetNumSide() * GetNumRZCorner();
332  nFaces = GetNumSide() * GetNumRZCorner();;
333  xyz = new double3[nNodes];
334  faces_vec = new int4[nFaces];
335  // const G4double dPhi = (endPhi - startPhi) / numSide;
336  const G4double dPhi = twopi / GetNumSide(); // !phiIsOpen endPhi-startPhi = 360 degrees.
337  G4double phi = GetStartPhi();
338  G4int ixyz = 0, iface = 0;
339  for (G4int iSide = 0; iSide < GetNumSide(); ++iSide)
340  {
341  for (G4int iCorner = 0; iCorner < GetNumRZCorner(); ++iCorner)
342  {
343  xyz[ixyz][0] = GetCorner(iCorner).r * std::cos(phi);
344  xyz[ixyz][1] = GetCorner(iCorner).r * std::sin(phi);
345  xyz[ixyz][2] = GetCorner(iCorner).z;
346  if (iSide < GetNumSide() - 1)
347  {
348  if (iCorner < GetNumRZCorner() - 1)
349  {
350  faces_vec[iface][0] = ixyz + 1;
351  faces_vec[iface][1] = ixyz + GetNumRZCorner() + 1;
352  faces_vec[iface][2] = ixyz + GetNumRZCorner() + 2;
353  faces_vec[iface][3] = ixyz + 2;
354  }
355  else
356  {
357  faces_vec[iface][0] = ixyz + 1;
358  faces_vec[iface][1] = ixyz + GetNumRZCorner() + 1;
359  faces_vec[iface][2] = ixyz + 2;
360  faces_vec[iface][3] = ixyz - GetNumRZCorner() + 2;
361  }
362  }
363  else // Last side joins ends...
364  {
365  if (iCorner < GetNumRZCorner() - 1)
366  {
367  faces_vec[iface][0] = ixyz + 1;
368  faces_vec[iface][1] = ixyz + GetNumRZCorner() - nFaces + 1;
369  faces_vec[iface][2] = ixyz + GetNumRZCorner() - nFaces + 2;
370  faces_vec[iface][3] = ixyz + 2;
371  }
372  else
373  {
374  faces_vec[iface][0] = ixyz + 1;
375  faces_vec[iface][1] = ixyz - nFaces + GetNumRZCorner() + 1;
376  faces_vec[iface][2] = ixyz - nFaces + 2;
377  faces_vec[iface][3] = ixyz - GetNumRZCorner() + 2;
378  }
379  }
380  ++ixyz;
381  ++iface;
382  }
383  phi += dPhi;
384  }
385  }
386  G4Polyhedron* polyhedron = new G4Polyhedron;
387  G4int problem = polyhedron->createPolyhedron(nNodes, nFaces, xyz, faces_vec);
388  delete [] faces_vec;
389  delete [] xyz;
390  if (problem)
391  {
392  std::ostringstream message;
393  message << "Problem creating G4Polyhedron for: " << GetName();
394  G4Exception("G4Polyhedra::CreatePolyhedron()", "GeomSolids1002",
395  JustWarning, message);
396  delete polyhedron;
397  return 0;
398  }
399  else
400  {
401  return polyhedron;
402  }
403  }
404 }
G4String GetName() const
G4int createPolyhedron(G4int Nnodes, G4int Nfaces, const G4double xyz[][3], const G4int faces[][4])
int G4int
Definition: G4Types.hh:78
G4int GetNumRZCorner() const
G4double GetEndPhi() const
G4double GetStartPhi() const
G4PolyhedraHistorical * GetOriginalParameters() const
G4bool IsGeneric() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4PolyhedraSideRZ GetCorner(const G4int index) const
G4int GetNumSide() const
G4double kCarTolerance
Definition: G4VSolid.hh:305
double G4double
Definition: G4Types.hh:76
G4bool IsOpen() const
G4PolyhedraSideRZ G4UPolyhedra::GetCorner ( const G4int  index) const
inline

Definition at line 143 of file G4UPolyhedra.hh.

References UPolyhedra::GetCorner(), GetShape(), UPolyhedraSideRZ::r, and UPolyhedraSideRZ::z.

Referenced by CreatePolyhedron().

144 {
145  UPolyhedraSideRZ pside = GetShape()->GetCorner(index);
146  G4PolyhedraSideRZ psiderz = { pside.r, pside.z };
147 
148  return psiderz;
149 }
UPolyhedraSideRZ GetCorner(const int index) const
UPolyhedra * GetShape() const
G4double G4UPolyhedra::GetEndPhi ( ) const
inline

Definition at line 127 of file G4UPolyhedra.hh.

References UPolyhedra::GetEndPhi(), and GetShape().

Referenced by CreatePolyhedron().

128 {
129  return GetShape()->GetEndPhi();
130 }
UPolyhedra * GetShape() const
double GetEndPhi() const
G4int G4UPolyhedra::GetNumRZCorner ( ) const
inline

Definition at line 139 of file G4UPolyhedra.hh.

References UPolyhedra::GetNumRZCorner(), and GetShape().

Referenced by CreatePolyhedron().

140 {
141  return GetShape()->GetNumRZCorner();
142 }
UPolyhedra * GetShape() const
int GetNumRZCorner() const
G4int G4UPolyhedra::GetNumSide ( ) const
inline

Definition at line 119 of file G4UPolyhedra.hh.

References UPolyhedra::GetNumSide(), and GetShape().

Referenced by CreatePolyhedron().

120 {
121  return GetShape()->GetNumSide();
122 }
int GetNumSide() const
UPolyhedra * GetShape() const
G4PolyhedraHistorical * G4UPolyhedra::GetOriginalParameters ( ) const
inline

Definition at line 150 of file G4UPolyhedra.hh.

References UPolyhedraHistorical::fNumSide, UPolyhedraHistorical::fNumZPlanes, UPolyhedraHistorical::fOpeningAngle, UPolyhedraHistorical::fStartAngle, UPolyhedraHistorical::fZValues, UPolyhedra::GetOriginalParameters(), GetShape(), G4PolyhedraHistorical::numSide, G4PolyhedraHistorical::Opening_angle, UPolyhedraHistorical::Rmax, G4PolyhedraHistorical::Rmax, UPolyhedraHistorical::Rmin, G4PolyhedraHistorical::Rmin, G4PolyhedraHistorical::Start_angle, and G4PolyhedraHistorical::Z_values.

Referenced by CreatePolyhedron().

151 {
154  pdata->Start_angle = pars->fStartAngle;
155  pdata->Opening_angle = pars->fOpeningAngle;
156  pdata->numSide = pars->fNumSide;
157  for (G4int i=0; i<pars->fNumZPlanes; ++i)
158  {
159  pdata->Z_values[i] = pars->fZValues[i];
160  pdata->Rmin[i] = pars->Rmin[i];
161  pdata->Rmax[i] = pars->Rmax[i];
162  }
163  return pdata;
164 }
UPolyhedraHistorical * GetOriginalParameters()
std::vector< double > fZValues
Definition: UPolyhedra.hh:59
int G4int
Definition: G4Types.hh:78
std::vector< double > Rmin
Definition: UPolyhedra.hh:60
UPolyhedra * GetShape() const
std::vector< double > Rmax
Definition: UPolyhedra.hh:61
UPolyhedra * G4UPolyhedra::GetShape ( ) const
inline
G4double G4UPolyhedra::GetStartPhi ( ) const
inline

Definition at line 123 of file G4UPolyhedra.hh.

References GetShape(), and UPolyhedra::GetStartPhi().

Referenced by CreatePolyhedron().

124 {
125  return GetShape()->GetStartPhi();
126 }
UPolyhedra * GetShape() const
double GetStartPhi() const
G4bool G4UPolyhedra::IsGeneric ( ) const
inline

Definition at line 135 of file G4UPolyhedra.hh.

References GetShape(), and UPolyhedra::IsGeneric().

Referenced by CreatePolyhedron().

136 {
137  return GetShape()->IsGeneric();
138 }
bool IsGeneric() const
UPolyhedra * GetShape() const
G4bool G4UPolyhedra::IsOpen ( ) const
inline

Definition at line 131 of file G4UPolyhedra.hh.

References GetShape(), and UPolyhedra::IsOpen().

Referenced by CreatePolyhedron().

132 {
133  return GetShape()->IsOpen();
134 }
bool IsOpen() const
UPolyhedra * GetShape() const
G4UPolyhedra & G4UPolyhedra::operator= ( const G4UPolyhedra source)

Definition at line 110 of file G4UPolyhedra.cc.

References G4USolid::operator=().

111 {
112  if (this == &source) return *this;
113 
114  G4USolid::operator=( source );
115 
116  return *this;
117 }
G4USolid & operator=(const G4USolid &rhs)
Definition: G4USolid.cc:370
G4bool G4UPolyhedra::Reset ( )
inline

Definition at line 180 of file G4UPolyhedra.hh.

References GetShape(), and UPolyhedra::Reset().

181 {
182  return GetShape()->Reset();
183 }
bool Reset()
Definition: UPolyhedra.cc:464
UPolyhedra * GetShape() const
void G4UPolyhedra::SetOriginalParameters ( G4PolyhedraHistorical pars)
inline

Definition at line 165 of file G4UPolyhedra.hh.

References UPolyhedraHistorical::fNumSide, UPolyhedraHistorical::fNumZPlanes, UPolyhedraHistorical::fOpeningAngle, G4USolid::fPolyhedron, UPolyhedraHistorical::fStartAngle, UPolyhedraHistorical::fZValues, UPolyhedra::GetOriginalParameters(), GetShape(), G4PolyhedraHistorical::Num_z_planes, G4PolyhedraHistorical::numSide, G4PolyhedraHistorical::Opening_angle, UPolyhedraHistorical::Rmax, G4PolyhedraHistorical::Rmax, UPolyhedraHistorical::Rmin, G4PolyhedraHistorical::Rmin, G4PolyhedraHistorical::Start_angle, and G4PolyhedraHistorical::Z_values.

166 {
168  pdata->fStartAngle = pars->Start_angle;
169  pdata->fOpeningAngle = pars->Opening_angle;
170  pdata->fNumSide = pars->numSide;
171  pdata->fNumZPlanes = pars->Num_z_planes;
172  for (G4int i=0; i<pdata->fNumZPlanes; ++i)
173  {
174  pdata->fZValues[i] = pars->Z_values[i];
175  pdata->Rmin[i] = pars->Rmin[i];
176  pdata->Rmax[i] = pars->Rmax[i];
177  }
178  fPolyhedron = 0;
179 }
UPolyhedraHistorical * GetOriginalParameters()
std::vector< double > fZValues
Definition: UPolyhedra.hh:59
int G4int
Definition: G4Types.hh:78
std::vector< double > Rmin
Definition: UPolyhedra.hh:60
UPolyhedra * GetShape() const
G4Polyhedron * fPolyhedron
Definition: G4USolid.hh:183
std::vector< double > Rmax
Definition: UPolyhedra.hh:61

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