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> 
   33 template<
class itType >
 
   40 class BooleanProperty;
 
   42 typedef Matrix<float, 3> Mat3f;
 
   50 TLP_SCOPE   BoundingBox computeBoundingBox(
const Graph *graph,
 
   51     const LayoutProperty *layout,
 
   52     const SizeProperty *size,
 
   53     const DoubleProperty *rotation,
 
   54     const BooleanProperty *selection = NULL);
 
   64 TLP_SCOPE BoundingBox computeBoundingBox(Iterator<node> *itN,
 
   66     const LayoutProperty *layout,
 
   67     const SizeProperty *size,
 
   68     const DoubleProperty *rotation,
 
   69     const BooleanProperty *selection = NULL);
 
   85 TLP_SCOPE   std::pair<Coord, Coord> computeBoundingRadius (
const Graph *graph,
 
   86     const LayoutProperty *layout,
 
   87     const SizeProperty *size,
 
   88     const DoubleProperty *rotation,
 
   89     const BooleanProperty *selection = NULL);
 
  101 TLP_SCOPE   std::vector<Coord> computeConvexHull (
const Graph *graph,
 
  102     const LayoutProperty *layout,
 
  103     const SizeProperty *size,
 
  104     const DoubleProperty *rotation,
 
  105     const BooleanProperty *selection = NULL);
 
  117 TLP_SCOPE std::vector<Coord> computeConvexHull(
const std::vector<tlp::Coord> &points);
 
  127 TLP_SCOPE 
bool computeLinesIntersection(
const std::pair<tlp::Coord, tlp::Coord> &line1,
 
  128                                         const std::pair<tlp::Coord, tlp::Coord> &line2,
 
  129                                         tlp::Coord &intersectionPoint);
 
  138 TLP_SCOPE tlp::Coord computePolygonCentroid(
const std::vector<tlp::Coord> &points);
 
  148 TLP_SCOPE 
bool isLayoutCoPlanar(
const std::vector<Coord> &points, Mat3f &invTransformMatrix);