ATLAS Offline Software
Loading...
Searching...
No Matches
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.
188class HVPoint3D : public SbVec3d {
189public:
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};
198HVPoint3D 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//---
209typedef SbRotation HVRotation;
210
211#include <iostream>
212
213#ifndef DEFAULT_NUMBER_OF_STEPS
214#define DEFAULT_NUMBER_OF_STEPS 24
215#endif
216
217class 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
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
426public:
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
439public:
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
449public:
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
460public:
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
470public:
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
480public:
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
489public:
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
501public:
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
513public:
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
524public:
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
538public:
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?
542
543 virtual SbPolyhedron& operator = (const SbPolyhedron& from) {
544 return SbPolyhedron::operator = (from);
545 }
546protected:
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
573public:
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
Scalar phi() const
phi method
HEPVis::SbPlane HVPlane3D
HVPoint3D operator+(const HVPoint3D &v1, const HVPoint3D &v2)
HVPoint3D HVNormal3D
SbRotation HVRotation
#define DEFAULT_NUMBER_OF_STEPS
HVPoint3D HVVector3D
#define y
#define x
#define z
friend HVPoint3D operator+(const HVPoint3D &v1, const HVPoint3D &v2)
HVPoint3D & operator=(const HVPoint3D &v)
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)
friend class SbPolyhedron
struct SbFacet::@146305307241173307306147201343177135163056232201 m_edge[4]
friend std::ostream & operator<<(std::ostream &, const SbFacet &facet)
SbPolyhedronArbitrary(const int nVertices, const int nFacets)
void AddFacet(const int iv1, const int iv2, const int iv3, const int iv4=0)
void AddVertex(const double v1, const double v2, const double v3)
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
SbPolyhedronBox(double Dx, double Dy, double Dz)
virtual ~SbPolyhedronBox()
virtual ~SbPolyhedronCone()
SbPolyhedronCone(double Rmn1, double Rmx1, double Rmn2, double Rmx2, double Dz)
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
SbPolyhedronCons(double Rmn1, double Rmx1, double Rmn2, double Rmx2, double Dz, double Phi1, double Dphi)
virtual ~SbPolyhedronCons()
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
SbPolyhedronGenericTrap(double Dz, const std::vector< std::pair< double, double > > &Vertices)
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
virtual ~SbPolyhedronPara()
SbPolyhedronPara(double Dx, double Dy, double Dz, double Alpha, double Theta, double Phi)
SbPolyhedronPcon(double phi, double dphi, int nz, const double *z, const double *rmin, const double *rmax)
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
virtual ~SbPolyhedronPcon()
virtual ~SbPolyhedronPgon()
SbPolyhedronPgon(double phi, double dphi, int npdv, int nz, const double *z, const double *rmin, const double *rmax)
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
SbPolyhedronPolygonXSect(const std::vector< double > &x, const std::vector< double > &y, const double &dz)
virtual ~SbPolyhedronSphere()
SbPolyhedronSphere(double rmin, double rmax, double phi, double dphi, double the, double dthe)
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
SbPolyhedronTorus(double rmin, double rmax, double rtor, double phi, double dphi)
virtual ~SbPolyhedronTorus()
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
SbPolyhedronTrap(double Dz, double Theta, double Phi, double Dy1, double Dx1, double Dx2, double Alp1, double Dy2, double Dx3, double Dx4, double Alp2)
virtual ~SbPolyhedronTrap()
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
virtual ~SbPolyhedronTrd1()
SbPolyhedronTrd1(double Dx1, double Dx2, double Dy, double Dz)
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
SbPolyhedronTrd2(double Dx1, double Dx2, double Dy1, double Dy2, double Dz)
virtual ~SbPolyhedronTrd2()
SbPolyhedronTube(double Rmin, double Rmax, double Dz)
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
virtual ~SbPolyhedronTube()
virtual ~SbPolyhedronTubs()
SbPolyhedronTubs(double Rmin, double Rmax, double Dz, double Phi1, double Dphi)
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
bool GetNextVertex(HVPoint3D &vertex, int &edgeFlag) const
bool GetNextEdge(HVPoint3D &p1, HVPoint3D &p2, int &edgeFlag) const
SbPolyhedron intersect(const SbPolyhedron &p) const
SbPolyhedron add(const SbPolyhedron &p) const
int FindNeighbour(int iFace, int iNode, int iOrder) const
virtual SbPolyhedron & operator=(const SbPolyhedron &from)
bool GetNextNormal(HVNormal3D &normal) const
void RotateAroundZ(int nstep, double phi, double dphi, int np1, int np2, const double *z, double *r, int nodeVis, int edgeVis)
bool GetNextEdgeIndeces(int &i1, int &i2, int &edgeFlag, int &iface1, int &iface2) const
double GetSurfaceArea() const
static int s_numberOfRotationSteps
int GetNoFacets() const
HVPoint3D * m_pV
void AllocateMemory(int Nvert, int Nface)
const HVPoint3D & GetVertexFast(int index) const
HVNormal3D GetUnitNormal(int iFace) const
friend std::ostream & operator<<(std::ostream &, const SbPolyhedron &ph)
bool GetNextUnitNormal(HVNormal3D &normal) const
int GetNoVertices() const
SbPolyhedron subtract(const SbPolyhedron &p) const
double GetVolume() const
void SetSideFacets(int ii[4], int vv[4], int *kk, double *r, double dphi, int ns, int &kface)
bool GetNextVertexIndex(int &index, int &edgeFlag) const
void RotateEdge(int k1, int k2, double r1, double r2, int v1, int v2, int vEdge, bool ifWholeCircle, int ns, int &kface)
virtual ~SbPolyhedron()
HVPoint3D GetVertex(int index) const
SbPolyhedron & Transform(const HEPVis::SbRotation &rot, const SbVec3d &trans)
static void ResetNumberOfRotationSteps()
SbPolyhedron(int Nvert=0, int Nface=0)
static int GetNumberOfRotationSteps()
SbFacet * m_pF
HVNormal3D FindNodeNormal(int iFace, int iNode) const
void GetFacet(int iFace, int &n, int *iNodes, int *edgeFlags=0, int *iFaces=0) const
bool GetNextFacet(int &n, HVPoint3D *nodes, int *edgeFlags=0, HVNormal3D *normals=0) const
HVNormal3D GetNormal(int iFace) const
static void SetNumberOfRotationSteps(int n)
int r
Definition globals.cxx:22
Definition index.py:1