23 #ifndef DOXYGEN_NOTFOR_DEVEL 26 #include <tulip/OpenGlIncludes.h> 28 #include <tulip/Coord.h> 29 #include <tulip/Color.h> 31 #include <tulip/tulipconf.h> 35 struct TLP_GL_SCOPE GlLines {
37 enum InterpolationMethod { LINEAR = 0, BEZIER, SPLINE3, SPLINE4 };
38 enum StippleType { TLP_PLAIN = 0, TLP_DOT, TLP_DASHED, TLP_ALTERNATE };
40 static void glDrawPoint(
const Coord &p);
42 static void glDrawLine(
const Coord &startPoint,
const Coord &endPoint,
const double width,
43 const unsigned int stippleType,
const Color &startColor,
44 const Color &endColor,
const bool arrow =
false,
45 const double arrowWidth = 1,
const double arrowHeight = 1);
46 static void glDrawCurve(
const Coord &startPoint,
const std::vector<Coord> &bends,
47 const Coord &endPoint,
const double width,
const unsigned int stippleType,
48 const Color &startColor,
const Color &endColor,
const bool arrow =
false,
49 const double arrowWidth = 1,
const double arrowHeight = 1);
50 static void glDrawBezierCurve(
const Coord &startPoint,
const std::vector<Coord> &bends,
51 const Coord &endPoint,
unsigned int steps,
const double width,
52 const unsigned int stippleType,
const Color &startColor,
53 const Color &endColor,
const bool arrow =
false,
54 const double arrowWidth = 1,
const double arrowHeight = 1);
55 static void glDrawSplineCurve(
const Coord &startPoint,
const std::vector<Coord> &bends,
56 const Coord &endPoint,
unsigned int steps,
const double width,
57 const unsigned int stippleType,
const Color &startColor,
58 const Color &endColor,
const bool arrow =
false,
59 const double arrowWidth = 1,
const double arrowHeight = 1);
60 static void glDrawSpline2Curve(
const Coord &startPoint,
const std::vector<Coord> &bends,
61 const Coord &endPoint,
unsigned int steps,
const double width,
62 const unsigned int stippleType,
const Color &startColor,
63 const Color &endColor,
const bool arrow =
false,
64 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,
70 const Coord &endPoint);
71 static GLfloat *buildCurvePoints(
const Coord &p0,
const Coord &p1,
const Coord &p2,
75 #endif // DOXYGEN_NOTFOR_DEVEL