24#include "glu/GL_glu.h"
73 GLfloat [4],
void ** ,
76 throw std::runtime_error(
"GLU::TriangleCollector tesselator requested vertex combining -- not supported yet.");
99 if (!
fTess)
throw std::bad_alloc();
112 gluDeleteTess(
fTess);
151 case GL_TRIANGLE_STRIP:
161 case GL_TRIANGLE_FAN:
169 throw std::runtime_error(
"GLU::TriangleCollector unexpected type in tess_vertex callback.");
178 const std::vector<UInt_t> &
polys,
181 if (verts.empty() ||
polys.empty())
187 for (
Int_t i = 0, j = 0; i < n_polys; ++i)
189 Int_t n_points = pols[j++];
191 gluTessBeginPolygon(
fTess,
this);
192 gluTessBeginContour(
fTess);
194 for (
Int_t k = 0; k < n_points; ++k, ++j)
196 gluTessVertex(
fTess, (
Double_t*) pnts + pols[j] * 3, (GLvoid*) &pols[j]);
199 gluTessEndContour(
fTess);
201 static int except_cnt = 0;
204 gluTessEndPolygon(
fTess);
206 if (except_cnt++ < 100) printf(
"Catch exception gluTessEndPolygon!\n");
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
double Double_t
Double 8 bytes.
TestTriangleHandler is just helper class to get access to protected members of TriangleCollector Hide...
static void tess_combine(GLdouble coords[3], void *vertex_data[4], GLfloat weight[4], void **outData, TriangleCollector *tc)
tess_combine
static void tess_begin(GLenum type, TriangleCollector *tc)
tess_begin
static void tess_vertex(Int_t *vi, TriangleCollector *tc)
tess_vertex
static void tess_end(TriangleCollector *tc)
tess_end
void process_vertex(UInt_t vi)
process_vertex
void add_triangle(UInt_t v0, UInt_t v1, UInt_t v2)
add triangle
std::vector< UInt_t > fPolyDesc
void ProcessData(const std::vector< Double_t > &verts, const std::vector< UInt_t > &polys, const Int_t n_polys)
ProcessData.
~TriangleCollector()
destructor
TriangleCollector()
constructor
Namespace for ROOT features in testing.