23 #ifndef DOXYGEN_NOTFOR_DEVEL
30 #if defined(__APPLE__)
31 #include <OpenGL/gl.h>
36 #include <tulip/Coord.h>
37 #include <tulip/Color.h>
39 #include <tulip/tulipconf.h>
43 struct TLP_GL_SCOPE GlLines {
45 enum InterpolationMethod {LINEAR=0, BEZIER, SPLINE3, SPLINE4};
46 enum StippleType {TLP_PLAIN=0, TLP_DOT, TLP_DASHED, TLP_ALTERNATE};
48 static void glDrawPoint(
const Coord &p);
50 static void glDrawLine(
const Coord &startPoint,
const Coord &endPoint,
const double width,
const unsigned int stippleType,
51 const Color &startColor,
const Color &endColor,
const bool arrow=
false,
const double arrowWidth=1,
52 const double arrowHeight=1);
53 static void glDrawCurve(
const Coord &startPoint,
const std::vector<Coord> &bends,
const Coord &endPoint,
const double width,
54 const unsigned int stippleType,
const Color &startColor,
const Color &endColor,
const bool arrow=
false,
55 const double arrowWidth=1,
const double arrowHeight=1);
56 static void glDrawBezierCurve(
const Coord &startPoint,
const std::vector<Coord> &bends,
const Coord &endPoint,
unsigned int steps,
57 const double width,
const unsigned int stippleType,
const Color &startColor,
const Color &endColor,
58 const bool arrow=
false,
const double arrowWidth=1,
const double arrowHeight=1);
59 static void glDrawSplineCurve(
const Coord &startPoint,
const std::vector<Coord> &bends,
const Coord &endPoint,
unsigned int steps,
60 const double width,
const unsigned int stippleType,
const Color &startColor,
const Color &endColor,
61 const bool arrow=
false,
const double arrowWidth=1,
const double arrowHeight=1);
62 static void glDrawSpline2Curve(
const Coord &startPoint,
const std::vector<Coord> &bends,
const Coord &endPoint,
unsigned int steps,
63 const double width,
const unsigned int stippleType,
const Color &startColor,
const Color &endColor,
64 const bool arrow=
false,
const double arrowWidth=1,
const double arrowHeight=1);
67 static void glDisableLineStipple(
unsigned int stippleType);
68 static void glEnableLineStipple(
unsigned int stippleType);
69 static GLfloat *buildCurvePoints(
const Coord &startPoint,
const std::vector<Coord> &bends,
const Coord &endPoint);
70 static GLfloat *buildCurvePoints(
const Coord &p0,
const Coord &p1,
const Coord &p2,
const Coord &p3);
74 #endif //DOXYGEN_NOTFOR_DEVEL