ATLAS Offline Software
Loading...
Searching...
No Matches
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
29class SbPolyhedron;
30
31
48
49class SoPolyhedron : public SoShape {
50
52
53public:
54 //SoSFBool solid;
55 //SoSFBool reducedWireFrame;
56 SoSFNode alternateRep;
57public:
61public:
62 static void initClass();
63protected:
64 virtual void computeBBox(SoAction*,SbBox3f&,SbVec3f&);
65 virtual void generatePrimitives(SoAction*);
66
67 //virtual void getPrimitiveCount(SoGetPrimitiveCountAction * action);
68protected:
69 virtual ~SoPolyhedron();
70private:
71 std::unique_ptr<SbPolyhedron> m_polyhedron;
72
73 //---------------//
74public:
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);
86public:
87 virtual void generateAlternateRep();
88 virtual void clearAlternateRep();
89 //---------------------//
90};
91
92#endif
boost::graph_traits< boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS > >::vertex_descriptor Vertex
SoPolyhedron()
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
virtual void clearAlternateRep()
std::unique_ptr< SbPolyhedron > m_polyhedron
SoSFNode alternateRep
Vertex * m_vertices
virtual void generateAlternateRep()
long * m_indices
void makeShape(SbPolyhedron *)
virtual void generatePrimitives(SoAction *)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
virtual ~SoPolyhedron()
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
virtual void computeBBox(SoAction *, SbBox3f &, SbVec3f &)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
SO_NODE_HEADER(SoPolyhedron)
static void initClass()
long hasVertex(Vertex *vertices, long len, Vertex &v)