1#ifndef HEPVis_SbPolyhedron_h
2#define HEPVis_SbPolyhedron_h
168#include <Inventor/C/errors/debugerror.h>
169#include <Inventor/SbLinear.h>
213#ifndef DEFAULT_NUMBER_OF_STEPS
214#define DEFAULT_NUMBER_OF_STEPS 24
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)
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);
262 double dphi,
int ns,
int &kface);
267 const double *
z,
double *
r,
268 int nodeVis,
int edgeVis);
305 const SbVec3d& trans);
327 int & iface1,
int & iface2)
const;
337 int &iface1,
int &iface2)
const;
340 void GetFacet(
int iFace,
int &n,
int *iNodes,
341 int *edgeFlags = 0,
int *iFaces = 0)
const;
345 int *edgeFlags = 0,
HVNormal3D *normals = 0)
const;
349 int *edgeFlags=0,
HVNormal3D *normals=0)
const;
399 double Dy1,
double Dy2,
double Dz);
409 double Dy,
double Dz);
429 double Dx1,
double Dx2,
double Alp1,
431 double Dx3,
double Dx4,
double Alp2);
441 double Alpha,
double Theta,
double Phi);
451 double Rmn2,
double Rmx2,
double Dz,
452 double Phi1,
double Dphi);
462 double Rmn2,
double Rmx2,
double Dz);
472 double Phi1,
double Dphi);
515 double phi,
double dphi,
516 double the,
double dthe);
526 double phi,
double dphi);
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);
Scalar phi() const
phi method
HEPVis::SbPlane HVPlane3D
HVPoint3D operator+(const HVPoint3D &v1, const HVPoint3D &v2)
#define DEFAULT_NUMBER_OF_STEPS
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 ~SbPolyhedronArbitrary()
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 ~SbPolyhedronGenericTrap()
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 ~SbPolyhedronPolygonXSect()
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
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
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)
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()
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)