33namespace Experimental {
76 throw std::runtime_error(
"GLU::TriangleCollector tesselator requested vertex combining -- not supported yet.");
99 if (!
fTess)
throw std::bad_alloc();
147 add_triangle(fV0, fV1, vi);
153 if (fNVertices % 2 == 0)
154 add_triangle(fV1, fV0, vi);
156 add_triangle(fV0, fV1, vi);
163 add_triangle(fV0, fV1, vi);
169 throw std::runtime_error(
"GLU::TriangleCollector unexpected type in tess_vertex callback.");
178 const std::vector<UInt_t> &
polys,
184 for (
Int_t i = 0, j = 0; i < n_polys; ++i)
186 Int_t n_points = pols[j++];
191 for (
Int_t k = 0; k < n_points; ++k, ++j)
198 static int except_cnt = 0;
203 if (except_cnt++ < 100) printf(
"Catch exception gluTessEndPolygon!\n");
void gluTessBeginPolygon(GLUtesselator *tess, GLvoid *data)
#define GLU_TESS_BEGIN_DATA
#define GLU_TESS_COMBINE_DATA
void gluTessCallback(GLUtesselator *tess, GLenum which, _GLUfuncptr CallBackFunc)
#define GLU_TESS_END_DATA
void gluDeleteTess(GLUtesselator *tess)
GLUtesselator * gluNewTess(void)
void gluTessEndContour(GLUtesselator *tess)
void gluTessBeginContour(GLUtesselator *tess)
#define GLU_TESS_VERTEX_DATA
void gluTessEndPolygon(GLUtesselator *tess)
#define GL_TRIANGLE_STRIP
void gluTessVertex(GLUtesselator *tess, GLdouble *location, GLvoid *data)
void(* _GLUfuncptr)(void)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
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
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.