File indexing completed on 2025-01-18 10:10:39
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef ROOT7_REveGluTess
0014 #define ROOT7_REveGluTess
0015
0016 #include "Rtypes.h"
0017
0018 #include <vector>
0019
0020 struct GLUtesselator;
0021
0022 namespace ROOT {
0023 namespace Experimental {
0024 namespace EveGlu {
0025
0026
0027
0028
0029
0030 class TestTriangleHandler;
0031
0032 class TriangleCollector {
0033 friend class TestTriangleHandler;
0034 protected:
0035 GLUtesselator *fTess{nullptr};
0036 Int_t fNTriangles{0};
0037 Int_t fNVertices{0};
0038 Int_t fV0{-1}, fV1{-1};
0039 Int_t fType{0};
0040 std::vector<UInt_t> fPolyDesc;
0041
0042 void add_triangle(UInt_t v0, UInt_t v1, UInt_t v2);
0043 void process_vertex(UInt_t vi);
0044
0045 public:
0046 TriangleCollector();
0047 ~TriangleCollector();
0048
0049
0050 void ProcessData(const std::vector<Double_t> &verts, const std::vector<UInt_t> &polys, const Int_t n_polys);
0051
0052
0053 Int_t GetNTrianlges() { return fNTriangles; }
0054 std::vector<UInt_t> &RefPolyDesc() { return fPolyDesc; }
0055 };
0056
0057 }
0058 }
0059 }
0060
0061 #endif