21 #ifndef _DRAWINGTOOLS_H 22 #define _DRAWINGTOOLS_H 25 #include <tulip/Node.h> 26 #include <tulip/Edge.h> 27 #include <tulip/Coord.h> 28 #include <tulip/BoundingBox.h> 29 #include <tulip/Matrix.h> 30 #include <tulip/Size.h> 34 template<
class itType >
41 class BooleanProperty;
43 typedef Matrix<float, 3> Mat3f;
51 TLP_SCOPE BoundingBox computeBoundingBox(
const Graph *graph,
52 const LayoutProperty *layout,
53 const SizeProperty *size,
54 const DoubleProperty *rotation,
55 const BooleanProperty *selection = NULL);
67 const LayoutProperty *layout,
68 const SizeProperty *size,
69 const DoubleProperty *rotation,
70 const BooleanProperty *selection = NULL);
79 TLP_SCOPE BoundingBox computeBoundingBox(
const std::vector<node>& nodes,
80 const std::vector<edge>& edges,
81 const LayoutProperty *layout,
82 const SizeProperty *size,
83 const DoubleProperty *rotation,
84 const BooleanProperty *selection = NULL);
100 TLP_SCOPE std::pair<Coord, Coord> computeBoundingRadius (
const Graph *graph,
101 const LayoutProperty *layout,
102 const SizeProperty *size,
103 const DoubleProperty *rotation,
104 const BooleanProperty *selection = NULL);
116 TLP_SCOPE std::vector<Coord> computeConvexHull (
const Graph *graph,
117 const LayoutProperty *layout,
118 const SizeProperty *size,
119 const DoubleProperty *rotation,
120 const BooleanProperty *selection = NULL);
132 TLP_SCOPE std::vector<Coord> computeConvexHull(
const std::vector<tlp::Coord> &points);
142 TLP_SCOPE
bool computeLinesIntersection(
const std::pair<tlp::Coord, tlp::Coord> &line1,
143 const std::pair<tlp::Coord, tlp::Coord> &line2,
144 tlp::Coord &intersectionPoint);
153 TLP_SCOPE tlp::Coord computePolygonCentroid(
const std::vector<tlp::Coord> &points);
163 TLP_SCOPE
bool isLayoutCoPlanar(
const std::vector<Coord> &points, Mat3f &invTransformMatrix);
181 TLP_SCOPE std::vector<tlp::Coord> computeRegularPolygon(
unsigned int numberOfSides,
const tlp::Coord ¢er,
182 const tlp::Size &size,
float startAngle = 0);
Interface for Tulip iterators. Allows basic iteration operations only.