23 #ifndef DOXYGEN_NOTFOR_DEVEL
26 #include <tulip/OpenGlConfigManager.h>
28 #include <tulip/Size.h>
29 #include <tulip/Coord.h>
30 #include <tulip/Color.h>
34 struct TLP_GL_SCOPE GlLines {
36 enum InterpolationMethod {LINEAR=0, BEZIER, SPLINE3, SPLINE4};
37 enum StippleType {TLP_PLAIN=0, TLP_DOT, TLP_DASHED, TLP_ALTERNATE};
39 static void glDrawPoint(
const Coord &p);
41 static void glDrawLine(
const Coord &startPoint,
const Coord &endPoint,
const double width,
const unsigned int stippleType,
42 const Color &startColor,
const Color &endColor,
const bool arrow=
false,
const double arrowWidth=1,
43 const double arrowHeight=1);
44 static void glDrawCurve(
const Coord &startPoint,
const std::vector<Coord> &bends,
const Coord &endPoint,
const double width,
45 const unsigned int stippleType,
const Color &startColor,
const Color &endColor,
const bool arrow=
false,
46 const double arrowWidth=1,
const double arrowHeight=1);
47 static void glDrawBezierCurve(
const Coord &startPoint,
const std::vector<Coord> &bends,
const Coord &endPoint,
unsigned int steps,
48 const double width,
const unsigned int stippleType,
const Color &startColor,
const Color &endColor,
49 const bool arrow=
false,
const double arrowWidth=1,
const double arrowHeight=1);
50 static void glDrawSplineCurve(
const Coord &startPoint,
const std::vector<Coord> &bends,
const Coord &endPoint,
unsigned int steps,
51 const double width,
const unsigned int stippleType,
const Color &startColor,
const Color &endColor,
52 const bool arrow=
false,
const double arrowWidth=1,
const double arrowHeight=1);
53 static void glDrawSpline2Curve(
const Coord &startPoint,
const std::vector<Coord> &bends,
const Coord &endPoint,
unsigned int steps,
54 const double width,
const unsigned int stippleType,
const Color &startColor,
const Color &endColor,
55 const bool arrow=
false,
const double arrowWidth=1,
const double arrowHeight=1);
58 static void glDisableLineStipple(
unsigned int stippleType);
59 static void glEnableLineStipple(
unsigned int stippleType);
60 static GLfloat *buildCurvePoints(
const Coord &startPoint,
const std::vector<Coord> &bends,
const Coord &endPoint);
61 static GLfloat *buildCurvePoints(
const Coord &p0,
const Coord &p1,
const Coord &p2,
const Coord &p3);
65 #endif //DOXYGEN_NOTFOR_DEVEL