201#ifndef HEP_POLYHEDRON_HH
202#define HEP_POLYHEDRON_HH
212#ifndef DEFAULT_NUMBER_OF_STEPS
213#define DEFAULT_NUMBER_OF_STEPS 24
221 struct G4Edge {
G4int v,f; };
227 { edge[0].v=v1; edge[0].f=f1; edge[1].v=v2; edge[1].f=f2;
228 edge[2].v=v3; edge[2].f=f3; edge[3].v=v4; edge[3].f=f4; }
270 const std::vector<G4TwoVector> &rz,
275 std::vector<G4int> &result);
348 G4int *edgeFlags =
nullptr,
G4int *iFaces =
nullptr)
const;
544 const std::vector<G4TwoVector> &rz);
556 const std::vector<G4TwoVector> &rz);
621 const std::vector<G4ThreeVector>& positions);
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)
~HepPolyhedronBoxMesh() override
~HepPolyhedronBox() override
~HepPolyhedronCone() override
~HepPolyhedronCons() override
~HepPolyhedronEllipsoid() override
~HepPolyhedronEllipticalCone() override
~HepPolyhedronHype() override
~HepPolyhedronHyperbolicMirror() override
~HepPolyhedronPara() override
~HepPolyhedronParaboloid() override
~HepPolyhedronPcon() override
~HepPolyhedronPgon() override
~HepPolyhedronSphere() override
~HepPolyhedronTetMesh() override
~HepPolyhedronTet() override
~HepPolyhedronTorus() override
~HepPolyhedronTrap() override
~HepPolyhedronTrd1() override
~HepPolyhedronTrd2() override
~HepPolyhedronTube() override
~HepPolyhedronTubs() override
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
G4int createTwistedTrap(G4double Dz, const G4double xy1[][2], const G4double xy2[][2])
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 SetVertex(G4int index, const G4Point3D &v)
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
void SetFacet(G4int index, G4int iv1, G4int iv2, G4int iv3, G4int iv4=0)
G4Point3D GetVertex(G4int index) const
G4double GetSurfaceArea() const
HepPolyhedron subtract(const HepPolyhedron &p) const
G4bool GetNextVertex(G4Point3D &vertex, G4int &edgeFlag) const
void GetFacet(G4int iFace, G4int &n, G4int *iNodes, G4int *edgeFlags=nullptr, G4int *iFaces=nullptr) 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)
static G4ThreadLocal G4int fNumberOfRotationSteps
G4bool GetNextVertexIndex(G4int &index, G4int &edgeFlag) const
G4bool GetNextFacet(G4int &n, G4Point3D *nodes, G4int *edgeFlags=nullptr, G4Normal3D *normals=nullptr) const
void JoinCoplanarFacets(G4double tolerance)
HepPolyhedron add(const HepPolyhedron &p) const
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)