ATLAS Offline Software
SoPolyhedron.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // //
7 // Header file for class SoPolyhedron //
8 // //
9 // //
10 // Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
11 // Initial version: November 2008 //
12 // Update: Giorgi Gvaberidze (ggvaberi@cern.ch) //
13 // November 2010 //
15 
16 #ifndef HEPVis_SoPolyhedron_h
17 #define HEPVis_SoPolyhedron_h
18 
19 // Inheritance :
20 #include <Inventor/C/errors/debugerror.h>
21 #include <Inventor/nodes/SoShape.h>
22 #include <Inventor/fields/SoSFBool.h>
23 
24 #include <Inventor/fields/SoSFNode.h>
25 #include <Inventor/actions/SoGetPrimitiveCountAction.h>
26 
27 #include <memory>
28 
29 class SbPolyhedron;
30 
31 
49 class SoPolyhedron : public SoShape {
50 
52 
53 public:
54  //SoSFBool solid;
55  //SoSFBool reducedWireFrame;
56  SoSFNode alternateRep;
57 public:
58  SoPolyhedron();
59  SoPolyhedron(const SbPolyhedron&);
60  SoPolyhedron(const SbPolyhedron*);
61 public:
62  static void initClass();
63 protected:
64  virtual void computeBBox(SoAction*,SbBox3f&,SbVec3f&);
65  virtual void generatePrimitives(SoAction*);
66 
67  //virtual void getPrimitiveCount(SoGetPrimitiveCountAction * action);
68 protected:
69  virtual ~SoPolyhedron();
70 private:
71  std::unique_ptr<SbPolyhedron> m_polyhedron;
72 
73  //---------------//
74 public:
75  typedef struct{
76  float pos[3];
77  float nor[3];
78  } Vertex;
79 
80  Vertex* m_vertices{nullptr};
81  long* m_indices{nullptr};
82  long m_vcount{0};
83  long m_icount{0};
84  long hasVertex(Vertex* vertices, long len, Vertex& v);
85  void makeShape(SbPolyhedron*);
86 public:
87  virtual void generateAlternateRep();
88  virtual void clearAlternateRep();
89  //---------------------//
90 };
91 
92 #endif
SoPolyhedron::m_indices
long * m_indices
Definition: SoPolyhedron.h:81
SbPolyhedron
Definition: SbPolyhedron.h:231
xAOD::Vertex
Vertex_v1 Vertex
Define the latest version of the vertex class.
Definition: Event/xAOD/xAODTracking/xAODTracking/Vertex.h:16
SoPolyhedron::~SoPolyhedron
virtual ~SoPolyhedron()
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition: SoPolyhedron.cxx:100
SoPolyhedron::computeBBox
virtual void computeBBox(SoAction *, SbBox3f &, SbVec3f &)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition: SoPolyhedron.cxx:285
SoPolyhedron::m_vcount
long m_vcount
Definition: SoPolyhedron.h:82
SoPolyhedron::SoPolyhedron
SoPolyhedron()
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition: SoPolyhedron.cxx:56
SoPolyhedron::makeShape
void makeShape(SbPolyhedron *)
Definition: SoPolyhedron.cxx:517
SoPolyhedron::clearAlternateRep
virtual void clearAlternateRep()
Definition: SoPolyhedron.cxx:415
SoPolyhedron::SO_NODE_HEADER
SO_NODE_HEADER(SoPolyhedron)
SoPolyhedron::hasVertex
long hasVertex(Vertex *vertices, long len, Vertex &v)
Definition: SoPolyhedron.cxx:424
SoPolyhedron::generatePrimitives
virtual void generatePrimitives(SoAction *)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition: SoPolyhedron.cxx:111
SoPolyhedron::Vertex
Definition: SoPolyhedron.h:75
SoPolyhedron::alternateRep
SoSFNode alternateRep
Definition: SoPolyhedron.h:56
SoPolyhedron::m_vertices
Vertex * m_vertices
Definition: SoPolyhedron.h:80
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
SoPolyhedron::m_icount
long m_icount
Definition: SoPolyhedron.h:83
python.PyAthena.v
v
Definition: PyAthena.py:154
SoPolyhedron::m_polyhedron
std::unique_ptr< SbPolyhedron > m_polyhedron
Definition: SoPolyhedron.h:71
SoPolyhedron::generateAlternateRep
virtual void generateAlternateRep()
Definition: SoPolyhedron.cxx:373
SoPolyhedron::initClass
static void initClass()
Definition: SoPolyhedron.cxx:47
SoPolyhedron
SoPolyhedron is an Inventor encapsulation of the HepPolyedron class written by E.Chernyaev.
Definition: SoPolyhedron.h:49