Remove dead code: the old stuff to abuse the gl triangulation

routines, since I now have my own.

[git-p4: depot-paths = "//depot/solvespace/": change = 2074]
solver
Jonathan Westhues 2009-11-09 03:59:30 -08:00
parent 61da5969f6
commit c79ca083c1
2 changed files with 0 additions and 61 deletions

View File

@ -691,65 +691,6 @@ bool SPolygon::SelfIntersecting(Vector *intersectsAt) {
return ret; return ret;
} }
static int TriMode, TriVertexCount;
static Vector Tri1, TriNMinus1, TriNMinus2;
static Vector TriNormal;
static SMesh *TriMesh;
static STriMeta TriMeta;
static void GLX_CALLBACK TriBegin(int mode)
{
TriMode = mode;
TriVertexCount = 0;
}
static void GLX_CALLBACK TriEnd(void)
{
}
static void GLX_CALLBACK TriVertex(Vector *triN)
{
if(TriVertexCount == 0) {
Tri1 = *triN;
}
if(TriMode == GL_TRIANGLES) {
if((TriVertexCount % 3) == 2) {
TriMesh->AddTriangle(
TriMeta, TriNormal, TriNMinus2, TriNMinus1, *triN);
}
} else if(TriMode == GL_TRIANGLE_FAN) {
if(TriVertexCount >= 2) {
TriMesh->AddTriangle(
TriMeta, TriNormal, Tri1, TriNMinus1, *triN);
}
} else if(TriMode == GL_TRIANGLE_STRIP) {
if(TriVertexCount >= 2) {
TriMesh->AddTriangle(
TriMeta, TriNormal, TriNMinus2, TriNMinus1, *triN);
}
} else oops();
TriNMinus2 = TriNMinus1;
TriNMinus1 = *triN;
TriVertexCount++;
}
void SPolygon::TriangulateInto(SMesh *m) {
STriMeta meta;
ZERO(&meta);
TriangulateInto(m, meta);
}
void SPolygon::TriangulateInto(SMesh *m, STriMeta meta) {
TriMesh = m;
TriNormal = normal;
TriMeta = meta;
GLUtesselator *gt = gluNewTess();
gluTessCallback(gt, GLU_TESS_BEGIN, (glxCallbackFptr *)TriBegin);
gluTessCallback(gt, GLU_TESS_END, (glxCallbackFptr *)TriEnd);
gluTessCallback(gt, GLU_TESS_VERTEX, (glxCallbackFptr *)TriVertex);
glxTesselatePolygon(gt, this);
gluDeleteTess(gt);
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Low-quality routines to cutter radius compensate a polygon. Assumes the // Low-quality routines to cutter radius compensate a polygon. Assumes the
// polygon is in the xy plane, and the contours all go in the right direction // polygon is in the xy plane, and the contours all go in the right direction

View File

@ -128,8 +128,6 @@ public:
bool ContainsPoint(Vector p); bool ContainsPoint(Vector p);
void MakeEdgesInto(SEdgeList *el); void MakeEdgesInto(SEdgeList *el);
void FixContourDirections(void); void FixContourDirections(void);
void TriangulateInto(SMesh *m);
void TriangulateInto(SMesh *m, STriMeta meta);
void Clear(void); void Clear(void);
bool SelfIntersecting(Vector *intersectsAt); bool SelfIntersecting(Vector *intersectsAt);
bool IsEmpty(void); bool IsEmpty(void);