ATLAS Offline Software
SbPolyhedron.h
Go to the documentation of this file.
1 #ifndef HEPVis_SbPolyhedron_h
2 #define HEPVis_SbPolyhedron_h
3 //--------------------------------------------------------------------//
4 // JFB: //
5 // SbPolyhedron was HepPolyhedron, retrofitted to Open Inventor //
6 // infrastructure: //
7 //--------------------------------------------------------------------//
8 
9 
10 // ********************************************************************
11 // * DISCLAIMER *
12 // * *
13 // * The following disclaimer summarizes all the specific disclaimers *
14 // * of contributors to this software. The specific disclaimers,which *
15 // * govern, are listed with their locations in: *
16 // * http://cern.ch/geant4/license *
17 // * *
18 // * Neither the authors of this software system, nor their employing *
19 // * institutes,nor the agencies providing financial support for this *
20 // * work make any representation or warranty, express or implied, *
21 // * regarding this software system or assume any liability for its *
22 // * use. *
23 // * *
24 // * This code implementation is the intellectual property of the *
25 // * GEANT4 collaboration. *
26 // * By copying, distributing or modifying the Program (or any work *
27 // * based on the Program) you indicate your acceptance of this *
28 // * statement, and all its terms. *
29 // ********************************************************************
30 //
31 //
32 // $Id: SbPolyhedron.h,v 1.1.1.1 2007-05-29 16:08:16 tkittel Exp $
33 // GEANT4 tag $Name: not supported by cvs2svn $
34 //
35 //
36 // Class Description:
37 // SbPolyhedron is an intermediate class between description of a shape
38 // and visualization systems. It is intended to provide some service like:
39 // - polygonization of shapes with triangulization (quadrilaterization)
40 // of complex polygons;
41 // - calculation of normals for faces and vertices;
42 // - finding result of boolean operation on polyhedra;
43 //
44 // Public constructors:
45 //
46 // SbPolyhedronBox (dx,dy,dz)
47 // - create polyhedron for Box;
48 // SbPolyhedronTrd1 (dx1,dx2,dy,dz)
49 // - create polyhedron for G3 Trd1;
50 // SbPolyhedronTrd2 (dx1,dx2,dy1,dy2,dz)
51 // - create polyhedron for G3 Trd2;
52 // SbPolyhedronTrap (dz,theta,phi, h1,bl1,tl1,alp1, h2,bl2,tl2,alp2)
53 // - create polyhedron for G3 Trap;
54 // SbPolyhedronPara (dx,dy,dz,alpha,theta,phi)
55 // - create polyhedron for G3 Para;
56 // SbPolyhedronTube (rmin,rmax,dz)
57 // - create polyhedron for G3 Tube;
58 // SbPolyhedronTubs (rmin,rmax,dz,phi1,dphi)
59 // - create polyhedron for G3 Tubs;
60 // SbPolyhedronCone (rmin1,rmax1,rmin2,rmax2,dz)
61 // - create polyhedron for G3 Cone;
62 // SbPolyhedronCons (rmin1,rmax1,rmin2,rmax2,dz,phi1,dphi)
63 // - create polyhedron for G3 Cons;
64 // SbPolyhedronPgon (phi,dphi,npdv,nz, z(*),rmin(*),rmax(*))
65 // - create polyhedron for G3 Pgon;
66 // SbPolyhedronPcon (phi,dphi,nz, z(*),rmin(*),rmax(*))
67 // - create polyhedron for G3 Pcon;
68 // SbPolyhedronSphere (rmin,rmax,phi,dphi,the,dthe)
69 // - create polyhedron for Sphere;
70 // SbPolyhedronTorus (rmin,rmax,rtor,phi,dphi)
71 // - create polyhedron for Torus;
72 // Public functions:
73 //
74 // GetNoVertices () - returns number of vertices;
75 // GetNoFacets () - returns number of faces;
76 // GetNextVertexIndex (index,edgeFlag) - get vertex indeces of the
77 // quadrilaterals in order;
78 // returns false when finished each face;
79 // GetVertex (index) - returns vertex by index;
80 // GetNextVertex (vertex,edgeFlag) - get vertices with edge visibility
81 // of the quadrilaterals in order;
82 // returns false when finished each face;
83 // GetNextVertex (vertex,edgeFlag,normal) - get vertices with edge
84 // visibility and normal of the quadrilaterals
85 // in order; returns false when finished each face;
86 // GetNextEdgeIndeces (i1,i2,edgeFlag) - get indeces of the next edge;
87 // returns false for the last edge;
88 // GetNextEdgeIndeces (i1,i2,edgeFlag,iface1,iface2) - get indeces of
89 // the next edge with indeces of the faces
90 // to which the edge belongs;
91 // returns false for the last edge;
92 // GetNextEdge (p1,p2,edgeFlag) - get next edge;
93 // returns false for the last edge;
94 // GetNextEdge (p1,p2,edgeFlag,iface1,iface2) - get next edge with indeces
95 // of the faces to which the edge belongs;
96 // returns false for the last edge;
97 // GetFacet (index,n,nodes,edgeFlags=0,normals=0) - get face by index;
98 // GetNextFacet (n,nodes,edgeFlags=0,normals=0) - get next face with normals
99 // at the nodes; returns false for the last face;
100 // GetNormal (index) - get normal of face given by index;
101 // GetUnitNormal (index) - get unit normal of face given by index;
102 // GetNextNormal (normal) - get normals of each face in order;
103 // returns false when finished all faces;
104 // GetNextUnitNormal (normal) - get normals of unit length of each face
105 // in order; returns false when finished all faces;
106 // GetSurfaceArea() - get surface area of the polyhedron;
107 // GetVolume() - get volume of the polyhedron;
108 // GetNumberOfRotationSteps() - get number of steps for whole circle;
109 // SetNumberOfRotationSteps (n) - set number of steps for whole circle;
110 // ResetNumberOfRotationSteps() - reset number of steps for whole circle
111 // to default value;
112 // History:
113 //
114 // 20.06.96 Evgeni Chernyaev <Evgueni.Tcherniaev@cern.ch> - initial version
115 //
116 // 23.07.96 John Allison
117 // - added GetNoVertices, GetNoFacets, GetNextVertex, GetNextNormal
118 //
119 // 30.09.96 E.Chernyaev
120 // - added GetNextVertexIndex, GetVertex by Yasuhide Sawada
121 // - added GetNextUnitNormal, GetNextEdgeIndeces, GetNextEdge
122 // - improvements: angles now expected in radians
123 // int -> G4int, double -> G4double
124 // - G4ThreeVector replaced by either G4Point3D or G4Normal3D
125 //
126 // 15.12.96 E.Chernyaev
127 // - private functions G4PolyhedronAlloc, G4PolyhedronPrism renamed
128 // to AllocateMemory and CreatePrism
129 // - added private functions GetNumberOfRotationSteps, RotateEdge,
130 // RotateAroundZ, SetReferences
131 // - rewritten G4PolyhedronCons;
132 // - added G4PolyhedronPara, ...Trap, ...Pgon, ...Pcon, ...Sphere, ...Torus,
133 // so full List of implemented shapes now looks like:
134 // BOX, TRD1, TRD2, TRAP, TUBE, TUBS, CONE, CONS, PARA, PGON, PCON,
135 // SPHERE, TORUS
136 //
137 // 01.06.97 E.Chernyaev
138 // - RotateAroundZ modified and SetSideFacets added to allow Rmin=Rmax
139 // in bodies of revolution
140 //
141 // 24.06.97 J.Allison
142 // - added static private member s_numberOfRotationSteps and static public
143 // functions void SetNumberOfRotationSteps (G4int n) and
144 // void ResetNumberOfRotationSteps (). Modified
145 // GetNumberOfRotationSteps() appropriately. Made all three functions
146 // inline (at end of this .hh file).
147 // Usage:
148 // G4Polyhedron::SetNumberOfRotationSteps
149 // (fpView -> GetViewParameters ().GetNoOfSides ());
150 // pPolyhedron = solid.CreatePolyhedron ();
151 // G4Polyhedron::ResetNumberOfRotationSteps ();
152 //
153 // 19.03.00 E.Chernyaev
154 // - added boolean operations (add, subtract, intersect) on polyhedra;
155 //
156 // 25.05.01 E.Chernyaev
157 // - added GetSurfaceArea() and GetVolume();
158 //
159 // 16.03.07 T. Kittelmann
160 // - added SbPolyhedronPolygonXSect (to HEPVis, not GEANT4).
161 //
162 // 12.12.2012 R.M. Bianchi <riccardo.maria.bianchi@cern.ch>
163 // - apply some changes (from the newest OpenScientist/HEPVis from Guy BARRAND)
164 // needed for the new BooleanProcessor.h from Geant4 4.9.6
165 // - added a new GetVertexFast(), from Guy Barrand.
166 //
167 
168 #include <Inventor/C/errors/debugerror.h>
169 #include <Inventor/SbLinear.h>
170 
171 
172 // VP1 change
173 #include <VP1HEPVis/SbRotation.h> //using doubles instead of floats.
174 //---
175 
176 
177 // rbianchi change
178 
179 //- original
180 //typedef SbVec3f HVPoint3D;
181 //typedef SbVec3f HVNormal3D;
182 //typedef SbVec3f HVVector3D;
183 
184 //- new
185 //NOTE : SbVec3d() does not initialize its internal fields.
186 // To mimick the CLHEP/Point3D that initializes its fields,
187 // we introduce the below HVPoint3D.
188 class HVPoint3D : public SbVec3d {
189 public:
190  HVPoint3D();
191  HVPoint3D(double x,double y,double z);
192  HVPoint3D(const HVPoint3D& v);
193  HVPoint3D(const SbVec3d& v);
194  HVPoint3D& operator=(const HVPoint3D& v);
195  HVPoint3D& operator=(const SbVec3d& v);
196  friend HVPoint3D operator +(const HVPoint3D& v1, const HVPoint3D& v2);
197 };
198 HVPoint3D operator +(const HVPoint3D& v1,const HVPoint3D& v2);
201 //---
202 
203 // rbianchi change
204 //typedef SbPlane HVPlane3D;
205 //typedef SbPlane HVPlane3D;
206 #include <VP1HEPVis/SbPlane.h>
208 //---
209 typedef SbRotation HVRotation;
210 
211 #include <iostream>
212 
213 #ifndef DEFAULT_NUMBER_OF_STEPS
214 #define DEFAULT_NUMBER_OF_STEPS 24
215 #endif
216 
217 class SbFacet {
218  friend class SbPolyhedron;
219  friend std::ostream& operator<<(std::ostream&, const SbFacet &facet);
220 
221  private:
222  struct { int v,f; } m_edge[4];
223 
224  public:
225  SbFacet(int v1=0, int f1=0, int v2=0, int f2=0,
226  int v3=0, int f3=0, int v4=0, int f4=0)
227  { m_edge[0].v=v1; m_edge[0].f=f1; m_edge[1].v=v2; m_edge[1].f=f2;
228  m_edge[2].v=v3; m_edge[2].f=f3; m_edge[3].v=v4; m_edge[3].f=f4; }
229 };
230 
232  friend std::ostream& operator<<(std::ostream&, const SbPolyhedron &ph);
233 
234  private:
236 
237  protected:
241 
242  // Allocate memory for SbPolyhedron
243  void AllocateMemory(int Nvert, int Nface);
244 
245  // Find neighbouring facet
246  int FindNeighbour(int iFace, int iNode, int iOrder) const;
247 
248  // Find normal at node
249  HVNormal3D FindNodeNormal(int iFace, int iNode) const;
250 
251  // Create SbPolyhedron for prism with quadrilateral base
252  void CreatePrism();
253 
254  // Generate facets by revolving an edge around Z-axis
255  void RotateEdge(int k1, int k2, double r1, double r2,
256  int v1, int v2, int vEdge,
257  bool ifWholeCircle, int ns, int &kface);
258 
259  // Set side facets for the case of incomplete rotation
260  void SetSideFacets(int ii[4], int vv[4],
261  int *kk, double *r,
262  double dphi, int ns, int &kface);
263 
264  // Create SbPolyhedron for body of revolution around Z-axis
265  void RotateAroundZ(int nstep, double phi, double dphi,
266  int np1, int np2,
267  const double *z, double *r,
268  int nodeVis, int edgeVis);
269 
270  // For each edge set reference to neighbouring facet
271  void SetReferences();
272 
273  // Invert the order on nodes in facets
274  void InvertFacets();
275 
276  public:
277  // Constructor
278  SbPolyhedron(int Nvert=0, int Nface=0)
279  : m_nvert(Nvert), m_nface(Nface),
280  m_pV(Nvert ? new HVPoint3D[Nvert+1] : 0),
281  m_pF(Nface ? new SbFacet[Nface+1] : 0) {}
282 
283  // Copy constructor
284  SbPolyhedron(const SbPolyhedron & from);
285 
286  // Destructor
287  virtual ~SbPolyhedron() { delete [] m_pV; delete [] m_pF; }
288 
289  // Assignment
290  virtual SbPolyhedron & operator=(const SbPolyhedron & from);
291 
292  // Get number of vertices
293  int GetNoVertices() const { return m_nvert; }
294 
295  // Get number of facets
296  int GetNoFacets() const { return m_nface; }
297 
298  // rbianchi change
299  //- original version
300  // Transform the polyhedron
301  //SbPolyhedron & Transform(const HVRotation &rot, const HVVector3D & trans);
302  //- new version from newest OpenScientist/HEPVis
303  //G.Barrand : the same than upper but by using doubles.
305  const SbVec3d& trans);
306  //---
307 
308 
309  // Get next vertex index of the quadrilateral
310  bool GetNextVertexIndex(int & index, int & edgeFlag) const;
311 
312  // Get vertex by index
313  HVPoint3D GetVertex(int index) const;
314  // rbianchi - 14.12.2012
315  const HVPoint3D& GetVertexFast(int index) const; //G.Barrand
316  //---
317 
318  // Get next vertex + edge visibility of the quadrilateral
319  bool GetNextVertex(HVPoint3D & vertex, int & edgeFlag) const;
320 
321  // Get next vertex + edge visibility + normal of the quadrilateral
322  bool GetNextVertex(HVPoint3D & vertex, int & edgeFlag,
323  HVNormal3D & normal) const;
324 
325  // Get indeces of the next edge with indeces of the faces
326  bool GetNextEdgeIndeces(int & i1, int & i2, int & edgeFlag,
327  int & iface1, int & iface2) const;
328 
329  // Get indeces of the next edge
330  bool GetNextEdgeIndeces(int & i1, int & i2, int & edgeFlag) const;
331 
332  // Get next edge
333  bool GetNextEdge(HVPoint3D &p1, HVPoint3D &p2, int &edgeFlag) const;
334 
335  // Get next edge
336  bool GetNextEdge(HVPoint3D &p1, HVPoint3D &p2, int &edgeFlag,
337  int &iface1, int &iface2) const;
338 
339  // Get face by index
340  void GetFacet(int iFace, int &n, int *iNodes,
341  int *edgeFlags = 0, int *iFaces = 0) const;
342 
343  // Get face by index
344  void GetFacet(int iFace, int &n, HVPoint3D *nodes,
345  int *edgeFlags = 0, HVNormal3D *normals = 0) const;
346 
347  // Get next face with normals at the nodes
348  bool GetNextFacet(int &n, HVPoint3D *nodes,
349  int *edgeFlags=0, HVNormal3D *normals=0) const;
350 
351  // Get normal of the face given by index
352  HVNormal3D GetNormal(int iFace) const;
353 
354  // Get unit normal of the face given by index
355  HVNormal3D GetUnitNormal(int iFace) const;
356 
357  // Get normal of the next face
358  bool GetNextNormal(HVNormal3D &normal) const;
359 
360  // Get normal of unit length of the next face
361  bool GetNextUnitNormal(HVNormal3D &normal) const;
362 
363  // Boolean operations
364  SbPolyhedron add(const SbPolyhedron &p) const;
365  SbPolyhedron subtract(const SbPolyhedron &p) const;
366  SbPolyhedron intersect(const SbPolyhedron &p) const;
367 
368  // Get area of the surface of the polyhedron
369  double GetSurfaceArea() const;
370 
371  // Get volume of the polyhedron
372  double GetVolume() const;
373 
374  // Get number of steps for whole circle
376 
377  // Set number of steps for whole circle
378  static void SetNumberOfRotationSteps(int n);
379 
380  // Reset number of steps for whole circle to default value
383  }
384 };
385 
386 //TK-deleteclass SbPolyhedronTest : public SbPolyhedron {
387 //TK-delete public:
388 //TK-delete SbPolyhedronTest();
389 //TK-delete virtual ~SbPolyhedronTest();
390 //TK-delete virtual SbPolyhedron& operator = (const SbPolyhedron& from) {
391 //TK-delete return SbPolyhedron::operator = (from);
392 //TK-delete }
393 //TK-delete};
394 //TK-delete
395 
397  public:
398  SbPolyhedronTrd2(double Dx1, double Dx2,
399  double Dy1, double Dy2, double Dz);
400  virtual ~SbPolyhedronTrd2();
401  virtual SbPolyhedron& operator = (const SbPolyhedron& from) {
402  return SbPolyhedron::operator = (from);
403  }
404 };
405 
407  public:
408  SbPolyhedronTrd1(double Dx1, double Dx2,
409  double Dy, double Dz);
410  virtual ~SbPolyhedronTrd1();
411  virtual SbPolyhedron& operator = (const SbPolyhedron& from) {
412  return SbPolyhedron::operator = (from);
413  }
414 };
415 
417  public:
418  SbPolyhedronBox(double Dx, double Dy, double Dz);
419  virtual ~SbPolyhedronBox();
420  virtual SbPolyhedron& operator = (const SbPolyhedron& from) {
421  return SbPolyhedron::operator = (from);
422  }
423 };
424 
426 public:
427  SbPolyhedronTrap(double Dz, double Theta, double Phi,
428  double Dy1,
429  double Dx1, double Dx2, double Alp1,
430  double Dy2,
431  double Dx3, double Dx4, double Alp2);
432  virtual ~SbPolyhedronTrap();
433  virtual SbPolyhedron& operator = (const SbPolyhedron& from) {
434  return SbPolyhedron::operator = (from);
435  }
436 };
437 
439 public:
440  SbPolyhedronPara(double Dx, double Dy, double Dz,
441  double Alpha, double Theta, double Phi);
442  virtual ~SbPolyhedronPara();
443  virtual SbPolyhedron& operator = (const SbPolyhedron& from) {
444  return SbPolyhedron::operator = (from);
445  }
446 };
447 
449 public:
450  SbPolyhedronCons(double Rmn1, double Rmx1,
451  double Rmn2, double Rmx2, double Dz,
452  double Phi1, double Dphi);
453  virtual ~SbPolyhedronCons();
454  virtual SbPolyhedron& operator = (const SbPolyhedron& from) {
455  return SbPolyhedron::operator = (from);
456  }
457 };
458 
460 public:
461  SbPolyhedronCone(double Rmn1, double Rmx1,
462  double Rmn2, double Rmx2, double Dz);
463  virtual ~SbPolyhedronCone();
464  virtual SbPolyhedron& operator = (const SbPolyhedron& from) {
465  return SbPolyhedron::operator = (from);
466  }
467 };
468 
470 public:
471  SbPolyhedronTubs(double Rmin, double Rmax, double Dz,
472  double Phi1, double Dphi);
473  virtual ~SbPolyhedronTubs();
474  virtual SbPolyhedron& operator = (const SbPolyhedron& from) {
475  return SbPolyhedron::operator = (from);
476  }
477 };
478 
480 public:
481  SbPolyhedronTube (double Rmin, double Rmax, double Dz);
482  virtual ~SbPolyhedronTube();
483  virtual SbPolyhedron& operator = (const SbPolyhedron& from) {
484  return SbPolyhedron::operator = (from);
485  }
486 };
487 
489 public:
490  SbPolyhedronPgon(double phi, double dphi, int npdv, int nz,
491  const double *z,
492  const double *rmin,
493  const double *rmax);
494  virtual ~SbPolyhedronPgon();
495  virtual SbPolyhedron& operator = (const SbPolyhedron& from) {
496  return SbPolyhedron::operator = (from);
497  }
498 };
499 
501 public:
502  SbPolyhedronPcon(double phi, double dphi, int nz,
503  const double *z,
504  const double *rmin,
505  const double *rmax);
506  virtual ~SbPolyhedronPcon();
507  virtual SbPolyhedron& operator = (const SbPolyhedron& from) {
508  return SbPolyhedron::operator = (from);
509  }
510 };
511 
513 public:
514  SbPolyhedronSphere(double rmin, double rmax,
515  double phi, double dphi,
516  double the, double dthe);
517  virtual ~SbPolyhedronSphere();
518  virtual SbPolyhedron& operator = (const SbPolyhedron& from) {
519  return SbPolyhedron::operator = (from);
520  }
521 };
522 
524 public:
525  SbPolyhedronTorus(double rmin, double rmax, double rtor,
526  double phi, double dphi);
527  virtual ~SbPolyhedronTorus();
528  virtual SbPolyhedron& operator = (const SbPolyhedron& from) {
529  return SbPolyhedron::operator = (from);
530  }
531 };
532 
533 #include<vector>
535 
536  // Added March 2007 by T. Kittelmann (Thomas.Kittelmann@cern.ch).
537 
538 public:
539  SbPolyhedronPolygonXSect(const std::vector<double>& x,const std::vector<double>& y, const double& dz);
540  //fixme: add interface with plain c arrays instead of vectors?
541 virtual ~SbPolyhedronPolygonXSect();
542 
543  virtual SbPolyhedron& operator = (const SbPolyhedron& from) {
544  return SbPolyhedron::operator = (from);
545  }
546 protected:
547  class Internals;
548  friend class Internals;
549 };
550 
551 // Class SbPolyhedronArbitrary for tessellated solids inside boolean operations
553 
554  public:
555  SbPolyhedronArbitrary(const int nVertices, const int nFacets);
556  virtual ~SbPolyhedronArbitrary();
557 
558  virtual SbPolyhedron& operator = (const SbPolyhedron& from) {
559  return SbPolyhedron::operator = (from);
560  }
561 
562  void AddVertex(const double v1, const double v2, const double v3);
563  void AddFacet(const int iv1, const int iv2, const int iv3, const int iv4=0);
564 
565  void Finalize();
566 
567  protected:
570 };
571 
573 public:
574  SbPolyhedronGenericTrap(double Dz, const std::vector<std::pair<double,double> >& Vertices);
575  virtual ~SbPolyhedronGenericTrap();
576  virtual SbPolyhedron& operator = (const SbPolyhedron& from) {
577  return SbPolyhedron::operator = (from);
578  }
579 };
580 
581 #endif
SbPolyhedron::m_pF
SbFacet * m_pF
Definition: SbPolyhedron.h:240
beamspotman.r
def r
Definition: beamspotman.py:676
SbPlane.h
SbPolyhedron
Definition: SbPolyhedron.h:231
SbPolyhedronPolygonXSect::~SbPolyhedronPolygonXSect
virtual ~SbPolyhedronPolygonXSect()
Definition: SbPolyhedron.cxx:1979
SbPolyhedron::FindNodeNormal
HVNormal3D FindNodeNormal(int iFace, int iNode) const
Definition: SbPolyhedron.cxx:217
SbPolyhedron::GetVertex
HVPoint3D GetVertex(int index) const
Definition: SbPolyhedron.cxx:929
SbPolyhedronArbitrary::~SbPolyhedronArbitrary
virtual ~SbPolyhedronArbitrary()
Definition: SbPolyhedron.cxx:2361
SbPolyhedronTube
Definition: SbPolyhedron.h:479
SbPolyhedron::GetVertexFast
const HVPoint3D & GetVertexFast(int index) const
Definition: SbPolyhedron.cxx:950
SbPolyhedronPolygonXSect::Internals
Definition: SbPolyhedron.cxx:1906
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
SbPolyhedronCone::operator=
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
Definition: SbPolyhedron.h:464
SbPolyhedron::s_numberOfRotationSteps
static int s_numberOfRotationSteps
Definition: SbPolyhedron.h:235
NSWL1::nVertices
int nVertices(const Polygon &p)
Definition: GeoUtils.cxx:35
SbPolyhedron::GetNextVertex
bool GetNextVertex(HVPoint3D &vertex, int &edgeFlag) const
Definition: SbPolyhedron.cxx:957
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
SbPolyhedron::add
SbPolyhedron add(const SbPolyhedron &p) const
Definition: SbPolyhedron.cxx:1842
SbPolyhedronPcon::operator=
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
Definition: SbPolyhedron.h:507
HVVector3D
HVPoint3D HVVector3D
Definition: SbPolyhedron.h:200
SbPolyhedronArbitrary::SbPolyhedronArbitrary
SbPolyhedronArbitrary(const int nVertices, const int nFacets)
Definition: SbPolyhedron.cxx:2354
HVPoint3D::HVPoint3D
HVPoint3D()
Definition: SbPolyhedron.cxx:31
index
Definition: index.py:1
SbPolyhedronBox::SbPolyhedronBox
SbPolyhedronBox(double Dx, double Dy, double Dz)
Definition: SbPolyhedron.cxx:1382
SbPolyhedronTrd1::operator=
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
Definition: SbPolyhedron.h:411
SbPolyhedronTubs
Definition: SbPolyhedron.h:469
SbPolyhedronTube::SbPolyhedronTube
SbPolyhedronTube(double Rmin, double Rmax, double Dz)
Definition: SbPolyhedron.cxx:1544
SbPolyhedron::GetNextVertexIndex
bool GetNextVertexIndex(int &index, int &edgeFlag) const
Definition: SbPolyhedron.cxx:902
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
SbPolyhedron::GetNextEdgeIndeces
bool GetNextEdgeIndeces(int &i1, int &i2, int &edgeFlag, int &iface1, int &iface2) const
Definition: SbPolyhedron.cxx:1007
HVPoint3D::operator+
friend HVPoint3D operator+(const HVPoint3D &v1, const HVPoint3D &v2)
Definition: SbPolyhedron.cxx:43
SbPolyhedronCone::SbPolyhedronCone
SbPolyhedronCone(double Rmn1, double Rmx1, double Rmn2, double Rmx2, double Dz)
Definition: SbPolyhedron.cxx:1530
SbPolyhedron::GetFacet
void GetFacet(int iFace, int &n, int *iNodes, int *edgeFlags=0, int *iFaces=0) const
Definition: SbPolyhedron.cxx:1117
SbPolyhedronCons::operator=
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
Definition: SbPolyhedron.h:454
SbPolyhedronTubs::operator=
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
Definition: SbPolyhedron.h:474
SbPolyhedronTubs::SbPolyhedronTubs
SbPolyhedronTubs(double Rmin, double Rmax, double Dz, double Phi1, double Dphi)
Definition: SbPolyhedron.cxx:1537
SbPolyhedronTrap::SbPolyhedronTrap
SbPolyhedronTrap(double Dz, double Theta, double Phi, double Dy1, double Dx1, double Dx2, double Alp1, double Dy2, double Dx3, double Dx4, double Alp2)
Definition: SbPolyhedron.cxx:1387
Phi
@ Phi
Definition: RPCdef.h:8
SbPolyhedronArbitrary::operator=
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
Definition: SbPolyhedron.h:558
SbPolyhedronSphere::SbPolyhedronSphere
SbPolyhedronSphere(double rmin, double rmax, double phi, double dphi, double the, double dthe)
Definition: SbPolyhedron.cxx:1649
SbPolyhedronTorus::SbPolyhedronTorus
SbPolyhedronTorus(double rmin, double rmax, double rtor, double phi, double dphi)
Definition: SbPolyhedron.cxx:1749
DEFAULT_NUMBER_OF_STEPS
#define DEFAULT_NUMBER_OF_STEPS
Definition: SbPolyhedron.h:214
HEPVis::SbPlane
Definition: SbPlane.h:40
SbPolyhedronTrd1
Definition: SbPolyhedron.h:406
SbFacet::f
int f
Definition: SbPolyhedron.h:222
SbPolyhedron::operator=
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
Definition: SbPolyhedron.cxx:161
SbPolyhedron::SetReferences
void SetReferences()
Definition: SbPolyhedron.cxx:682
x
#define x
SbPolyhedronArbitrary::m_nFacetCount
int m_nFacetCount
Definition: SbPolyhedron.h:569
SbPolyhedronTubs::~SbPolyhedronTubs
virtual ~SbPolyhedronTubs()
Definition: SbPolyhedron.cxx:1542
SbPolyhedronBox
Definition: SbPolyhedron.h:416
SbPolyhedron::GetNormal
HVNormal3D GetNormal(int iFace) const
Definition: SbPolyhedron.cxx:1203
SbPolyhedronCons::~SbPolyhedronCons
virtual ~SbPolyhedronCons()
Definition: SbPolyhedron.cxx:1528
SbPolyhedronPolygonXSect::Internals
friend class Internals
Definition: SbPolyhedron.h:547
SbPolyhedron::GetNextEdge
bool GetNextEdge(HVPoint3D &p1, HVPoint3D &p2, int &edgeFlag) const
Definition: SbPolyhedron.cxx:1076
SbPolyhedron::CreatePrism
void CreatePrism()
Definition: SbPolyhedron.cxx:286
read_hist_ntuple.f2
f2
Definition: read_hist_ntuple.py:20
SbPolyhedron::GetNextNormal
bool GetNextNormal(HVNormal3D &normal) const
Definition: SbPolyhedron.cxx:1255
SbPolyhedronTrd2::SbPolyhedronTrd2
SbPolyhedronTrd2(double Dx1, double Dx2, double Dy1, double Dy2, double Dz)
Definition: SbPolyhedron.cxx:1342
SbPolyhedronTrd2::operator=
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
Definition: SbPolyhedron.h:401
xAOD::EgammaParameters::f3
@ f3
fraction of energy reconstructed in 3rd sampling
Definition: EgammaEnums.h:54
SbFacet::SbFacet
SbFacet(int v1=0, int f1=0, int v2=0, int f2=0, int v3=0, int f3=0, int v4=0, int f4=0)
Definition: SbPolyhedron.h:225
SbPolyhedronPgon::SbPolyhedronPgon
SbPolyhedronPgon(double phi, double dphi, int npdv, int nz, const double *z, const double *rmin, const double *rmax)
Definition: SbPolyhedron.cxx:1550
python.changerun.kk
list kk
Definition: changerun.py:41
SbPolyhedron::GetVolume
double GetVolume() const
Definition: SbPolyhedron.cxx:1314
HVPoint3D::operator=
HVPoint3D & operator=(const HVPoint3D &v)
Definition: SbPolyhedron.cxx:35
SbPolyhedron::Transform
SbPolyhedron & Transform(const HEPVis::SbRotation &rot, const SbVec3d &trans)
Definition: SbPolyhedron.cxx:878
SbPolyhedronTrap
Definition: SbPolyhedron.h:425
SbPolyhedron::GetNoFacets
int GetNoFacets() const
Definition: SbPolyhedron.h:296
SbPolyhedronPcon::SbPolyhedronPcon
SbPolyhedronPcon(double phi, double dphi, int nz, const double *z, const double *rmin, const double *rmax)
Definition: SbPolyhedron.cxx:1641
SbPolyhedronTube::~SbPolyhedronTube
virtual ~SbPolyhedronTube()
Definition: SbPolyhedron.cxx:1548
z
#define z
SbPolyhedronSphere
Definition: SbPolyhedron.h:512
beamspotman.n
n
Definition: beamspotman.py:731
Dz
double Dz
Definition: LArDetectorConstructionTBEC.cxx:57
SbPolyhedronPara::~SbPolyhedronPara
virtual ~SbPolyhedronPara()
Definition: SbPolyhedron.cxx:1447
SbPolyhedron::AllocateMemory
void AllocateMemory(int Nvert, int Nface)
Definition: SbPolyhedron.cxx:267
SbPolyhedron::GetNumberOfRotationSteps
static int GetNumberOfRotationSteps()
Definition: SbPolyhedron.h:375
SbPolyhedronSphere::~SbPolyhedronSphere
virtual ~SbPolyhedronSphere()
Definition: SbPolyhedron.cxx:1747
SbPolyhedronTrd2
Definition: SbPolyhedron.h:396
SbPolyhedronTorus
Definition: SbPolyhedron.h:523
SbPolyhedron::GetUnitNormal
HVNormal3D GetUnitNormal(int iFace) const
Definition: SbPolyhedron.cxx:1228
SbPolyhedronTrap::~SbPolyhedronTrap
virtual ~SbPolyhedronTrap()
Definition: SbPolyhedron.cxx:1440
SbPolyhedronArbitrary
Definition: SbPolyhedron.h:552
SbRotation.h
SbPolyhedronPgon::~SbPolyhedronPgon
virtual ~SbPolyhedronPgon()
Definition: SbPolyhedron.cxx:1639
SbPolyhedron::SetSideFacets
void SetSideFacets(int ii[4], int vv[4], int *kk, double *r, double dphi, int ns, int &kface)
Definition: SbPolyhedron.cxx:368
SbFacet::m_edge
struct SbFacet::@63 m_edge[4]
SbPolyhedronPgon
Definition: SbPolyhedron.h:488
SbPolyhedronPcon
Definition: SbPolyhedron.h:500
SbPolyhedronArbitrary::Finalize
void Finalize()
Definition: SbPolyhedron.cxx:2406
SbPolyhedron::GetNextFacet
bool GetNextFacet(int &n, HVPoint3D *nodes, int *edgeFlags=0, HVNormal3D *normals=0) const
Definition: SbPolyhedron.cxx:1173
operator+
HVPoint3D operator+(const HVPoint3D &v1, const HVPoint3D &v2)
Definition: SbPolyhedron.cxx:43
SbPolyhedron::m_pV
HVPoint3D * m_pV
Definition: SbPolyhedron.h:239
SbFacet::v
int v
Definition: SbPolyhedron.h:222
SbPolyhedronPcon::~SbPolyhedronPcon
virtual ~SbPolyhedronPcon()
Definition: SbPolyhedron.cxx:1647
SbPolyhedronCone::~SbPolyhedronCone
virtual ~SbPolyhedronCone()
Definition: SbPolyhedron.cxx:1535
SbPolyhedronPara::operator=
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
Definition: SbPolyhedron.h:443
SbPolyhedron::RotateAroundZ
void RotateAroundZ(int nstep, double phi, double dphi, int np1, int np2, const double *z, double *r, int nodeVis, int edgeVis)
Definition: SbPolyhedron.cxx:438
SbPolyhedron::ResetNumberOfRotationSteps
static void ResetNumberOfRotationSteps()
Definition: SbPolyhedron.h:381
SbPolyhedronArbitrary::AddFacet
void AddFacet(const int iv1, const int iv2, const int iv3, const int iv4=0)
Definition: SbPolyhedron.cxx:2377
SbFacet::operator<<
friend std::ostream & operator<<(std::ostream &, const SbFacet &facet)
Definition: SbPolyhedron.cxx:118
SbPolyhedronCons::SbPolyhedronCons
SbPolyhedronCons(double Rmn1, double Rmx1, double Rmn2, double Rmx2, double Dz, double Phi1, double Dphi)
Definition: SbPolyhedron.cxx:1449
SbPolyhedron::FindNeighbour
int FindNeighbour(int iFace, int iNode, int iOrder) const
Definition: SbPolyhedron.cxx:189
SbPolyhedron::~SbPolyhedron
virtual ~SbPolyhedron()
Definition: SbPolyhedron.h:287
SbPolyhedronTube::operator=
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
Definition: SbPolyhedron.h:483
HVNormal3D
HVPoint3D HVNormal3D
Definition: SbPolyhedron.h:199
ReadCellNoiseFromCoolCompare.v2
v2
Definition: ReadCellNoiseFromCoolCompare.py:364
python.PyAthena.v
v
Definition: PyAthena.py:157
SbPolyhedronTorus::~SbPolyhedronTorus
virtual ~SbPolyhedronTorus()
Definition: SbPolyhedron.cxx:1827
SbPolyhedron::GetSurfaceArea
double GetSurfaceArea() const
Definition: SbPolyhedron.cxx:1292
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
SbPolyhedron::SetNumberOfRotationSteps
static void SetNumberOfRotationSteps(int n)
Definition: SbPolyhedron.cxx:245
SbPolyhedronArbitrary::AddVertex
void AddVertex(const double v1, const double v2, const double v3)
Definition: SbPolyhedron.cxx:2365
SbPolyhedron::m_nface
int m_nface
Definition: SbPolyhedron.h:238
y
#define y
HVPlane3D
HEPVis::SbPlane HVPlane3D
Definition: SbPolyhedron.h:207
SbPolyhedron::InvertFacets
void InvertFacets()
Definition: SbPolyhedron.cxx:819
SbPolyhedronCone
Definition: SbPolyhedron.h:459
SbPolyhedronTrap::operator=
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
Definition: SbPolyhedron.h:433
SbPolyhedronGenericTrap::operator=
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
Definition: SbPolyhedron.h:576
SbPolyhedronTrd1::SbPolyhedronTrd1
SbPolyhedronTrd1(double Dx1, double Dx2, double Dy, double Dz)
Definition: SbPolyhedron.cxx:1376
SbPolyhedronTorus::operator=
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
Definition: SbPolyhedron.h:528
SbPolyhedronBox::operator=
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
Definition: SbPolyhedron.h:420
Rmin
double Rmin
Definition: LArDetectorConstructionTBEC.cxx:54
SbPolyhedronPolygonXSect::SbPolyhedronPolygonXSect
SbPolyhedronPolygonXSect(const std::vector< double > &x, const std::vector< double > &y, const double &dz)
Definition: SbPolyhedron.cxx:1963
SbPolyhedron::RotateEdge
void RotateEdge(int k1, int k2, double r1, double r2, int v1, int v2, int vEdge, bool ifWholeCircle, int ns, int &kface)
Definition: SbPolyhedron.cxx:306
python.SystemOfUnits.ns
int ns
Definition: SystemOfUnits.py:130
SbPolyhedron::SbPolyhedron
SbPolyhedron(int Nvert=0, int Nface=0)
Definition: SbPolyhedron.h:278
SbPolyhedronPolygonXSect::operator=
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
Definition: SbPolyhedron.h:543
SbPolyhedron::GetNoVertices
int GetNoVertices() const
Definition: SbPolyhedron.h:293
SbPolyhedronGenericTrap
Definition: SbPolyhedron.h:572
SbFacet
Definition: SbPolyhedron.h:217
SbPolyhedronPara::SbPolyhedronPara
SbPolyhedronPara(double Dx, double Dy, double Dz, double Alpha, double Theta, double Phi)
Definition: SbPolyhedron.cxx:1442
SbPolyhedron::operator<<
friend std::ostream & operator<<(std::ostream &, const SbPolyhedron &ph)
Definition: SbPolyhedron.cxx:125
SbPolyhedronGenericTrap::~SbPolyhedronGenericTrap
virtual ~SbPolyhedronGenericTrap()
Definition: SbPolyhedron.cxx:2427
SbPolyhedronPgon::operator=
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
Definition: SbPolyhedron.h:495
SbPolyhedron::subtract
SbPolyhedron subtract(const SbPolyhedron &p) const
Definition: SbPolyhedron.cxx:1878
SbPolyhedronCons
Definition: SbPolyhedron.h:448
SbPolyhedronArbitrary::m_nVertexCount
int m_nVertexCount
Definition: SbPolyhedron.h:568
PlotCalibFromCool.vv
vv
Definition: PlotCalibFromCool.py:716
HVRotation
SbRotation HVRotation
Definition: SbPolyhedron.h:209
SbPolyhedronPara
Definition: SbPolyhedron.h:438
SbPolyhedronSphere::operator=
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
Definition: SbPolyhedron.h:518
NSWL1::Vertices
std::vector< Vertex > Vertices
Definition: GeoUtils.h:19
SbPolyhedron::GetNextUnitNormal
bool GetNextUnitNormal(HVNormal3D &normal) const
Definition: SbPolyhedron.cxx:1276
SbPolyhedronBox::~SbPolyhedronBox
virtual ~SbPolyhedronBox()
Definition: SbPolyhedron.cxx:1385
SbPolyhedronTrd1::~SbPolyhedronTrd1
virtual ~SbPolyhedronTrd1()
Definition: SbPolyhedron.cxx:1380
SbPolyhedron::intersect
SbPolyhedron intersect(const SbPolyhedron &p) const
Definition: SbPolyhedron.cxx:1860
HVPoint3D
Definition: SbPolyhedron.h:188
SbPolyhedron::m_nvert
int m_nvert
Definition: SbPolyhedron.h:238
HEPVis::SbRotation
Definition: SbRotation.h:35
SbPolyhedronTrd2::~SbPolyhedronTrd2
virtual ~SbPolyhedronTrd2()
Definition: SbPolyhedron.cxx:1374
read_hist_ntuple.f1
f1
Definition: read_hist_ntuple.py:4
SbPolyhedronPolygonXSect
Definition: SbPolyhedron.h:534
SbPolyhedronGenericTrap::SbPolyhedronGenericTrap
SbPolyhedronGenericTrap(double Dz, const std::vector< std::pair< double, double > > &Vertices)
Definition: SbPolyhedron.cxx:2411