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,
const unsigned int stippleType,
43 const Color &startColor,
const Color &endColor,
const bool arrow=
false,
const double arrowWidth=1,
44 const double arrowHeight=1);
45 static void glDrawCurve(
const Coord &startPoint,
const std::vector<Coord> &bends,
const Coord &endPoint,
const double width,
46 const unsigned int stippleType,
const Color &startColor,
const Color &endColor,
const bool arrow=
false,
47 const double arrowWidth=1,
const double arrowHeight=1);
48 static void glDrawBezierCurve(
const Coord &startPoint,
const std::vector<Coord> &bends,
const Coord &endPoint,
unsigned int steps,
49 const double width,
const unsigned int stippleType,
const Color &startColor,
const Color &endColor,
50 const bool arrow=
false,
const double arrowWidth=1,
const double arrowHeight=1);
51 static void glDrawSplineCurve(
const Coord &startPoint,
const std::vector<Coord> &bends,
const Coord &endPoint,
unsigned int steps,
52 const double width,
const unsigned int stippleType,
const Color &startColor,
const Color &endColor,
53 const bool arrow=
false,
const double arrowWidth=1,
const double arrowHeight=1);
54 static void glDrawSpline2Curve(
const Coord &startPoint,
const std::vector<Coord> &bends,
const Coord &endPoint,
unsigned int steps,
55 const double width,
const unsigned int stippleType,
const Color &startColor,
const Color &endColor,
56 const bool arrow=
false,
const double arrowWidth=1,
const double arrowHeight=1);
59 static void glDisableLineStipple(
unsigned int stippleType);
60 static void glEnableLineStipple(
unsigned int stippleType);
61 static GLfloat *buildCurvePoints(
const Coord &startPoint,
const std::vector<Coord> &bends,
const Coord &endPoint);
62 static GLfloat *buildCurvePoints(
const Coord &p0,
const Coord &p1,
const Coord &p2,
const Coord &p3);
66 #endif //DOXYGEN_NOTFOR_DEVEL