Geant4-11
HepPolyhedron.h
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// Class Description:
27// HepPolyhedron is an intermediate class between description of a shape
28// and visualization systems. It is intended to provide some service like:
29// - polygonization of shapes with triangulization (quadrilaterization)
30// of complex polygons;
31// - calculation of normals for faces and vertices;
32// - finding result of boolean operation on polyhedra;
33//
34// Public constructors:
35//
36// HepPolyhedronBox (dx,dy,dz)
37// - create polyhedron for Box;
38// HepPolyhedronTrd1 (dx1,dx2,dy,dz)
39// - create polyhedron for Trd1;
40// HepPolyhedronTrd2 (dx1,dx2,dy1,dy2,dz)
41// - create polyhedron for Trd2;
42// HepPolyhedronTrap (dz,theta,phi, h1,bl1,tl1,alp1, h2,bl2,tl2,alp2)
43// - create polyhedron for Trap;
44// HepPolyhedronPara (dx,dy,dz,alpha,theta,phi)
45// - create polyhedron for Para;
46// HepPolyhedronTube (rmin,rmax,dz)
47// - create polyhedron for Tube;
48// HepPolyhedronTubs (rmin,rmax,dz,phi1,dphi)
49// - create polyhedron for Tubs;
50// HepPolyhedronCone (rmin1,rmax1,rmin2,rmax2,dz)
51// - create polyhedron for Cone;
52// HepPolyhedronCons (rmin1,rmax1,rmin2,rmax2,dz,phi1,dphi)
53// - create polyhedron for Cons;
54// HepPolyhedronPgon (phi,dphi,npdv,nz, z(*),rmin(*),rmax(*))
55// - create polyhedron for Pgon;
56// HepPolyhedronPcon (phi,dphi,nz, z(*),rmin(*),rmax(*))
57// - create polyhedron for Pcon;
58// HepPolyhedronSphere (rmin,rmax,phi,dphi,the,dthe)
59// - create polyhedron for Sphere;
60// HepPolyhedronTorus (rmin,rmax,rtor,phi,dphi)
61// - create polyhedron for Torus;
62// HepPolyhedronTet (p0[3],p1[3],p2[3],p3[3])
63// - create polyhedron for Tet;
64// HepPolyhedronEllipsoid (dx,dy,dz,zcut1,zcut2)
65// - create polyhedron for Ellipsoid;
66// HepPolyhedronEllipticalCone(dx,dy,z,zcut1)
67// - create polyhedron for Elliptical cone;
68// HepPolyhedronParaboloid (r1,r2,dz,phi,dphi)
69// - create polyhedron for Paraboloid;
70// HepPolyhedronHype (r1,r2,tan1,tan2,halfz)
71// - create polyhedron for Hype;
72// HepPolyhedronHyperbolicMirror (a,h,r)
73// - create polyhedron for Hyperbolic mirror;
74// Public functions:
75//
76// GetNoVertices () - returns number of vertices;
77// GetNoFacets () - returns number of faces;
78// GetNextVertexIndex (index,edgeFlag) - get vertex indices of the
79// quadrilaterals in order;
80// returns false when finished each face;
81// GetVertex (index) - returns vertex by index;
82// GetNextVertex (vertex,edgeFlag) - get vertices with edge visibility
83// of the quadrilaterals in order;
84// returns false when finished each face;
85// GetNextVertex (vertex,edgeFlag,normal) - get vertices with edge
86// visibility and normal of the quadrilaterals
87// in order; returns false when finished each face;
88// GetNextEdgeIndices (i1,i2,edgeFlag) - get indices of the next edge;
89// returns false for the last edge;
90// GetNextEdgeIndices (i1,i2,edgeFlag,iface1,iface2) - get indices of
91// the next edge with indices of the faces
92// to which the edge belongs;
93// returns false for the last edge;
94// GetNextEdge (p1,p2,edgeFlag) - get next edge;
95// returns false for the last edge;
96// GetNextEdge (p1,p2,edgeFlag,iface1,iface2) - get next edge with indices
97// of the faces to which the edge belongs;
98// returns false for the last edge;
99// GetFacet (index,n,nodes,edgeFlags=0,normals=0) - get face by index;
100// GetNextFacet (n,nodes,edgeFlags=0,normals=0) - get next face with normals
101// at the nodes; returns false for the last face;
102// GetNormal (index) - get normal of face given by index;
103// GetUnitNormal (index) - get unit normal of face given by index;
104// GetNextNormal (normal) - get normals of each face in order;
105// returns false when finished all faces;
106// GetNextUnitNormal (normal) - get normals of unit length of each face
107// in order; returns false when finished all faces;
108// GetSurfaceArea() - get surface area of the polyhedron;
109// GetVolume() - get volume of the polyhedron;
110// GetNumberOfRotationSteps() - get number of steps for whole circle;
111// SetNumberOfRotationSteps (n) - set number of steps for whole circle;
112// ResetNumberOfRotationSteps() - reset number of steps for whole circle
113// to default value;
114// History:
115//
116// 20.06.96 Evgeni Chernyaev <Evgueni.Tcherniaev@cern.ch> - initial version
117//
118// 23.07.96 John Allison
119// - added GetNoVertices, GetNoFacets, GetNextVertex, GetNextNormal
120//
121// 30.09.96 E.Chernyaev
122// - added GetNextVertexIndex, GetVertex by Yasuhide Sawada
123// - added GetNextUnitNormal, GetNextEdgeIndices, GetNextEdge
124// - improvements: angles now expected in radians
125// int -> G4int, double -> G4double
126// - G4ThreeVector replaced by either G4Point3D or G4Normal3D
127//
128// 15.12.96 E.Chernyaev
129// - private functions G4PolyhedronAlloc, G4PolyhedronPrism renamed
130// to AllocateMemory and CreatePrism
131// - added private functions GetNumberOfRotationSteps, RotateEdge,
132// RotateAroundZ, SetReferences
133// - rewritten G4PolyhedronCons;
134// - added G4PolyhedronPara, ...Trap, ...Pgon, ...Pcon, ...Sphere, ...Torus,
135// so full List of implemented shapes now looks like:
136// BOX, TRD1, TRD2, TRAP, TUBE, TUBS, CONE, CONS, PARA, PGON, PCON,
137// SPHERE, TORUS
138//
139// 01.06.97 E.Chernyaev
140// - RotateAroundZ modified and SetSideFacets added to allow Rmin=Rmax
141// in bodies of revolution
142//
143// 24.06.97 J.Allison
144// - added static private member fNumberOfRotationSteps and static public
145// functions void SetNumberOfRotationSteps (G4int n) and
146// void ResetNumberOfRotationSteps (). Modified
147// GetNumberOfRotationSteps() appropriately. Made all three functions
148// inline (at end of this .hh file).
149// Usage:
150// G4Polyhedron::SetNumberOfRotationSteps
151// (fpView -> GetViewParameters ().GetNoOfSides ());
152// pPolyhedron = solid.CreatePolyhedron ();
153// G4Polyhedron::ResetNumberOfRotationSteps ();
154//
155// 19.03.00 E.Chernyaev
156// - added boolean operations (add, subtract, intersect) on polyhedra;
157//
158// 25.05.01 E.Chernyaev
159// - added GetSurfaceArea() and GetVolume();
160//
161// 05.11.02 E.Chernyaev
162// - added createTwistedTrap() and createPolyhedron();
163//
164// 06.03.05 J.Allison
165// - added IsErrorBooleanProcess
166//
167// 20.06.05 G.Cosmo
168// - added HepPolyhedronEllipsoid
169//
170// 18.07.07 T.Nikitina
171// - added HepPolyhedronParaboloid;
172//
173// 21.10.09 J.Allison
174// - removed IsErrorBooleanProcess (now error is returned through argument)
175//
176// 22.02.20 E.Chernyaev
177// - added HepPolyhedronTet, HepPolyhedronHyberbolicMirror
178//
179// 12.05.21 E.Chernyaev
180// - added TriangulatePolygon(), RotateContourAroundZ()
181// - added HepPolyhedronPgon, HepPolyhedronPcon given by rz-countour
182//
183
184#ifndef HEP_POLYHEDRON_HH
185#define HEP_POLYHEDRON_HH
186
187#include <vector>
188#include "G4Types.hh"
189#include "G4TwoVector.hh"
190#include "G4Point3D.hh"
191#include "G4Normal3D.hh"
192#include "G4Transform3D.hh"
193
194#ifndef DEFAULT_NUMBER_OF_STEPS
195#define DEFAULT_NUMBER_OF_STEPS 24
196#endif
197
198class G4Facet {
199 friend class HepPolyhedron;
200 friend std::ostream& operator<<(std::ostream&, const G4Facet &facet);
201
202 private:
203 struct G4Edge { G4int v,f; };
205
206 public:
207 G4Facet(G4int v1=0, G4int f1=0, G4int v2=0, G4int f2=0,
208 G4int v3=0, G4int f3=0, G4int v4=0, G4int f4=0)
209 { edge[0].v=v1; edge[0].f=f1; edge[1].v=v2; edge[1].f=f2;
210 edge[2].v=v3; edge[2].f=f3; edge[3].v=v4; edge[3].f=f4; }
211};
212
214 friend std::ostream& operator<<(std::ostream&, const HepPolyhedron &ph);
215
216 protected:
221
222 // Re-allocate memory for HepPolyhedron
223 void AllocateMemory(G4int Nvert, G4int Nface);
224
225 // Find neighbouring facet
226 G4int FindNeighbour(G4int iFace, G4int iNode, G4int iOrder) const;
227
228 // Find normal at node
229 G4Normal3D FindNodeNormal(G4int iFace, G4int iNode) const;
230
231 // Create HepPolyhedron for prism with quadrilateral base
232 void CreatePrism();
233
234 // Generate facets by revolving an edge around Z-axis
235 void RotateEdge(G4int k1, G4int k2, G4double r1, G4double r2,
236 G4int v1, G4int v2, G4int vEdge,
237 G4bool ifWholeCircle, G4int ns, G4int &kface);
238
239 // Set side facets for the case of incomplete rotation
240 void SetSideFacets(G4int ii[4], G4int vv[4],
241 G4int *kk, G4double *r,
242 G4double dphi, G4int ns, G4int &kface);
243
244 // Create HepPolyhedron for body of revolution around Z-axis
245 void RotateAroundZ(G4int nstep, G4double phi, G4double dphi,
246 G4int np1, G4int np2,
247 const G4double *z, G4double *r,
248 G4int nodeVis, G4int edgeVis);
249
250 // Create HepPolyhedron for body of revolution around Z-axis
251 void RotateContourAroundZ(G4int nstep, G4double phi, G4double dphi,
252 const std::vector<G4TwoVector> &rz,
253 G4int nodeVis, G4int edgeVis);
254
255 // Triangulate closed polygon (contour)
256 G4bool TriangulatePolygon(const std::vector<G4TwoVector> &polygon,
257 std::vector<G4int> &result);
258
259 // Helper function for TriangulatePolygon()
260 G4bool CheckSnip(const std::vector<G4TwoVector> &contour,
261 G4int a, G4int b, G4int c,
262 G4int n, const G4int* V);
263
264 // For each edge set reference to neighbouring facet
265 void SetReferences();
266
267 // Invert the order on nodes in facets
268 void InvertFacets();
269
270 public:
271 // Constructor
272 HepPolyhedron() : nvert(0), nface(0), pV(0), pF(0) {}
273
274 // Copy constructor
275 HepPolyhedron(const HepPolyhedron & from);
276
277 // Move constructor
279
280 // Destructor
281 virtual ~HepPolyhedron() { delete [] pV; delete [] pF; }
282
283 // Assignment
284 HepPolyhedron & operator=(const HepPolyhedron & from);
285
286 // Move assignment
288
289 // Get number of vertices
290 G4int GetNoVertices() const { return nvert; }
291 G4int GetNoVerteces() const { return nvert; } // Old spelling.
292
293 // Get number of facets
294 G4int GetNoFacets() const { return nface; }
295
296 // Transform the polyhedron
298
299 // Get next vertex index of the quadrilateral
300 G4bool GetNextVertexIndex(G4int & index, G4int & edgeFlag) const;
301
302 // Get vertex by index
303 G4Point3D GetVertex(G4int index) const;
304
305 // Get next vertex + edge visibility of the quadrilateral
306 G4bool GetNextVertex(G4Point3D & vertex, G4int & edgeFlag) const;
307
308 // Get next vertex + edge visibility + normal of the quadrilateral
309 G4bool GetNextVertex(G4Point3D & vertex, G4int & edgeFlag,
310 G4Normal3D & normal) const;
311
312 // Get indices of the next edge with indices of the faces
313 G4bool GetNextEdgeIndices(G4int & i1, G4int & i2, G4int & edgeFlag,
314 G4int & iface1, G4int & iface2) const;
315 G4bool GetNextEdgeIndeces(G4int & i1, G4int & i2, G4int & edgeFlag,
316 G4int & iface1, G4int & iface2) const
317 {return GetNextEdgeIndices(i1,i2,edgeFlag,iface1,iface2);} // Old spelling
318
319 // Get indices of the next edge
320 G4bool GetNextEdgeIndices(G4int & i1, G4int & i2, G4int & edgeFlag) const;
321 G4bool GetNextEdgeIndeces(G4int & i1, G4int & i2, G4int & edgeFlag) const
322 {return GetNextEdgeIndices(i1,i2,edgeFlag);} // Old spelling.
323
324 // Get next edge
325 G4bool GetNextEdge(G4Point3D &p1, G4Point3D &p2, G4int &edgeFlag) const;
326
327 // Get next edge
328 G4bool GetNextEdge(G4Point3D &p1, G4Point3D &p2, G4int &edgeFlag,
329 G4int &iface1, G4int &iface2) const;
330
331 // Get face by index
332 void GetFacet(G4int iFace, G4int &n, G4int *iNodes,
333 G4int *edgeFlags = 0, G4int *iFaces = 0) const;
334
335 // Get face by index
336 void GetFacet(G4int iFace, G4int &n, G4Point3D *nodes,
337 G4int *edgeFlags=0, G4Normal3D *normals=0) const;
338
339 // Get next face with normals at the nodes
340 G4bool GetNextFacet(G4int &n, G4Point3D *nodes, G4int *edgeFlags=0,
341 G4Normal3D *normals=0) const;
342
343 // Get normal of the face given by index
344 G4Normal3D GetNormal(G4int iFace) const;
345
346 // Get unit normal of the face given by index
347 G4Normal3D GetUnitNormal(G4int iFace) const;
348
349 // Get normal of the next face
351
352 // Get normal of unit length of the next face
354
355 // Boolean operations
356 HepPolyhedron add(const HepPolyhedron &p) const;
357 HepPolyhedron subtract(const HepPolyhedron &p) const;
358 HepPolyhedron intersect(const HepPolyhedron &p) const;
359
360 // Get area of the surface of the polyhedron
361 G4double GetSurfaceArea() const;
362
363 // Get volume of the polyhedron
364 G4double GetVolume() const;
365
366 // Get number of steps for whole circle
368
369 // Set number of steps for whole circle
370 static void SetNumberOfRotationSteps(G4int n);
371
372 // Reset number of steps for whole circle to default value
373 static void ResetNumberOfRotationSteps();
374
385 const G4double xy1[][2], const G4double xy2[][2]);
386
404 G4int createPolyhedron(G4int Nnodes, G4int Nfaces,
405 const G4double xyz[][3], const G4int faces[][4]);
406};
407
409{
410 public:
412 G4double Dy1, G4double Dy2, G4double Dz);
413 virtual ~HepPolyhedronTrd2();
414};
415
417{
418 public:
420 G4double Dy, G4double Dz);
421 virtual ~HepPolyhedronTrd1();
422};
423
425{
426 public:
428 virtual ~HepPolyhedronBox();
429};
430
432{
433 public:
435 G4double Dy1,
436 G4double Dx1, G4double Dx2, G4double Alp1,
437 G4double Dy2,
438 G4double Dx3, G4double Dx4, G4double Alp2);
439 virtual ~HepPolyhedronTrap();
440};
441
443{
444 public:
446 G4double Alpha, G4double Theta, G4double Phi);
447 virtual ~HepPolyhedronPara();
448};
449
451{
452 public:
454 G4double r2,
455 G4double dz,
456 G4double Phi1,
457 G4double Dphi);
458 virtual ~HepPolyhedronParaboloid();
459};
460
462{
463 public:
465 G4double r2,
466 G4double tan1,
467 G4double tan2,
468 G4double halfZ);
469 virtual ~HepPolyhedronHype();
470};
471
473{
474 public:
476 G4double Rmn2, G4double Rmx2, G4double Dz,
477 G4double Phi1, G4double Dphi);
478 virtual ~HepPolyhedronCons();
479};
480
482{
483 public:
485 G4double Rmn2, G4double Rmx2, G4double Dz);
486 virtual ~HepPolyhedronCone();
487};
488
490{
491 public:
493 G4double Phi1, G4double Dphi);
494 virtual ~HepPolyhedronTubs();
495};
496
498{
499 public:
501 virtual ~HepPolyhedronTube();
502};
503
505{
506 public:
507 HepPolyhedronPgon(G4double phi, G4double dphi, G4int npdv, G4int nz,
508 const G4double *z,
509 const G4double *rmin,
510 const G4double *rmax);
512 const std::vector<G4TwoVector> &rz);
513 virtual ~HepPolyhedronPgon();
514};
515
517{
518 public:
520 const G4double *z,
521 const G4double *rmin,
522 const G4double *rmax);
524 const std::vector<G4TwoVector> &rz);
525 virtual ~HepPolyhedronPcon();
526};
527
529{
530 public:
532 G4double phi, G4double dphi,
533 G4double the, G4double dthe);
534 virtual ~HepPolyhedronSphere();
535};
536
538{
539 public:
541 G4double phi, G4double dphi);
542 virtual ~HepPolyhedronTorus();
543};
544
546{
547 public:
548 HepPolyhedronTet(const G4double p0[3],
549 const G4double p1[3],
550 const G4double p2[3],
551 const G4double p3[3]);
552 virtual ~HepPolyhedronTet();
553};
554
556{
557 public:
559 G4double zcut1, G4double zcut2);
560 virtual ~HepPolyhedronEllipsoid();
561};
562
564{
565 public:
567 G4double zcut1);
569};
570
572{
573 public:
576};
577
578#endif /* HEP_POLYHEDRON_HH */
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
G4Edge edge[4]
friend std::ostream & operator<<(std::ostream &, const G4Facet &facet)
G4Facet(G4int v1=0, G4int f1=0, G4int v2=0, G4int f2=0, G4int v3=0, G4int f3=0, G4int v4=0, G4int f4=0)
virtual ~HepPolyhedronBox()
HepPolyhedronBox(G4double Dx, G4double Dy, G4double Dz)
virtual ~HepPolyhedronCone()
HepPolyhedronCone(G4double Rmn1, G4double Rmx1, G4double Rmn2, G4double Rmx2, G4double Dz)
virtual ~HepPolyhedronCons()
HepPolyhedronCons(G4double Rmn1, G4double Rmx1, G4double Rmn2, G4double Rmx2, G4double Dz, G4double Phi1, G4double Dphi)
HepPolyhedronEllipsoid(G4double dx, G4double dy, G4double dz, G4double zcut1, G4double zcut2)
HepPolyhedronEllipticalCone(G4double dx, G4double dy, G4double z, G4double zcut1)
HepPolyhedronHype(G4double r1, G4double r2, G4double tan1, G4double tan2, G4double halfZ)
virtual ~HepPolyhedronHype()
HepPolyhedronHyperbolicMirror(G4double a, G4double h, G4double r)
virtual ~HepPolyhedronPara()
HepPolyhedronPara(G4double Dx, G4double Dy, G4double Dz, G4double Alpha, G4double Theta, G4double Phi)
HepPolyhedronParaboloid(G4double r1, G4double r2, G4double dz, G4double Phi1, G4double Dphi)
virtual ~HepPolyhedronPcon()
HepPolyhedronPcon(G4double phi, G4double dphi, G4int nz, const G4double *z, const G4double *rmin, const G4double *rmax)
virtual ~HepPolyhedronPgon()
HepPolyhedronPgon(G4double phi, G4double dphi, G4int npdv, G4int nz, const G4double *z, const G4double *rmin, const G4double *rmax)
virtual ~HepPolyhedronSphere()
HepPolyhedronSphere(G4double rmin, G4double rmax, G4double phi, G4double dphi, G4double the, G4double dthe)
virtual ~HepPolyhedronTet()
HepPolyhedronTet(const G4double p0[3], const G4double p1[3], const G4double p2[3], const G4double p3[3])
HepPolyhedronTorus(G4double rmin, G4double rmax, G4double rtor, G4double phi, G4double dphi)
virtual ~HepPolyhedronTorus()
HepPolyhedronTrap(G4double Dz, G4double Theta, G4double Phi, G4double Dy1, G4double Dx1, G4double Dx2, G4double Alp1, G4double Dy2, G4double Dx3, G4double Dx4, G4double Alp2)
virtual ~HepPolyhedronTrap()
HepPolyhedronTrd1(G4double Dx1, G4double Dx2, G4double Dy, G4double Dz)
virtual ~HepPolyhedronTrd1()
virtual ~HepPolyhedronTrd2()
HepPolyhedronTrd2(G4double Dx1, G4double Dx2, G4double Dy1, G4double Dy2, G4double Dz)
virtual ~HepPolyhedronTube()
HepPolyhedronTube(G4double Rmin, G4double Rmax, G4double Dz)
HepPolyhedronTubs(G4double Rmin, G4double Rmax, G4double Dz, G4double Phi1, G4double Dphi)
virtual ~HepPolyhedronTubs()
G4bool GetNextEdgeIndeces(G4int &i1, G4int &i2, G4int &edgeFlag, G4int &iface1, G4int &iface2) const
G4int GetNoVerteces() const
friend std::ostream & operator<<(std::ostream &, const HepPolyhedron &ph)
static void SetNumberOfRotationSteps(G4int n)
void RotateAroundZ(G4int nstep, G4double phi, G4double dphi, G4int np1, G4int np2, const G4double *z, G4double *r, G4int nodeVis, G4int edgeVis)
G4bool GetNextEdgeIndices(G4int &i1, G4int &i2, G4int &edgeFlag, G4int &iface1, G4int &iface2) const
G4Normal3D GetUnitNormal(G4int iFace) const
void GetFacet(G4int iFace, G4int &n, G4int *iNodes, G4int *edgeFlags=0, G4int *iFaces=0) const
G4int createTwistedTrap(G4double Dz, const G4double xy1[][2], const G4double xy2[][2])
G4Point3D * pV
G4bool GetNextNormal(G4Normal3D &normal) const
HepPolyhedron & operator=(const HepPolyhedron &from)
G4Normal3D FindNodeNormal(G4int iFace, G4int iNode) const
static G4int GetNumberOfRotationSteps()
G4Normal3D GetNormal(G4int iFace) const
G4int FindNeighbour(G4int iFace, G4int iNode, G4int iOrder) const
G4bool TriangulatePolygon(const std::vector< G4TwoVector > &polygon, std::vector< G4int > &result)
void RotateContourAroundZ(G4int nstep, G4double phi, G4double dphi, const std::vector< G4TwoVector > &rz, G4int nodeVis, G4int edgeVis)
G4bool GetNextEdgeIndeces(G4int &i1, G4int &i2, G4int &edgeFlag) const
G4Point3D GetVertex(G4int index) const
G4double GetSurfaceArea() const
HepPolyhedron subtract(const HepPolyhedron &p) const
G4bool GetNextVertex(G4Point3D &vertex, G4int &edgeFlag) const
G4double GetVolume() const
HepPolyhedron intersect(const HepPolyhedron &p) const
HepPolyhedron & Transform(const G4Transform3D &t)
G4int createPolyhedron(G4int Nnodes, G4int Nfaces, const G4double xyz[][3], const G4int faces[][4])
void AllocateMemory(G4int Nvert, G4int Nface)
G4int GetNoFacets() const
G4bool GetNextUnitNormal(G4Normal3D &normal) const
static void ResetNumberOfRotationSteps()
G4bool CheckSnip(const std::vector< G4TwoVector > &contour, G4int a, G4int b, G4int c, G4int n, const G4int *V)
void RotateEdge(G4int k1, G4int k2, G4double r1, G4double r2, G4int v1, G4int v2, G4int vEdge, G4bool ifWholeCircle, G4int ns, G4int &kface)
G4bool GetNextFacet(G4int &n, G4Point3D *nodes, G4int *edgeFlags=0, G4Normal3D *normals=0) const
static G4ThreadLocal G4int fNumberOfRotationSteps
G4bool GetNextVertexIndex(G4int &index, G4int &edgeFlag) const
G4Facet * pF
HepPolyhedron add(const HepPolyhedron &p) const
virtual ~HepPolyhedron()
G4int GetNoVertices() const
G4bool GetNextEdge(G4Point3D &p1, G4Point3D &p2, G4int &edgeFlag) const
void SetSideFacets(G4int ii[4], G4int vv[4], G4int *kk, G4double *r, G4double dphi, G4int ns, G4int &kface)
static double normal(HepRandomEngine *eptr)
Definition: RandPoisson.cc:79
#define G4ThreadLocal
Definition: tls.hh:77
#define ns
Definition: xmlparse.cc:614