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>
34template <
class itType>
43typedef Matrix<float, 3> Mat3f;
63TLP_SCOPE
BoundingBox computeBoundingBox(
const std::vector<node> &nodes,
64 const std::vector<edge> &edges,
86TLP_SCOPE std::pair<Coord, Coord>
101TLP_SCOPE std::vector<Coord> computeConvexHull(
const Graph *graph,
const LayoutProperty *layout,
117TLP_SCOPE std::vector<Coord> computeConvexHull(
const std::vector<tlp::Coord> &points);
126TLP_SCOPE
bool computeLinesIntersection(
const std::pair<tlp::Coord, tlp::Coord> &line1,
127 const std::pair<tlp::Coord, tlp::Coord> &line2,
128 tlp::Coord &intersectionPoint);
137TLP_SCOPE tlp::Coord computePolygonCentroid(
const std::vector<tlp::Coord> &points);
147TLP_SCOPE
bool isLayoutCoPlanar(
const std::vector<Coord> &points, Mat3f &invTransformMatrix);
165TLP_SCOPE std::vector<tlp::Coord> computeRegularPolygon(
unsigned int numberOfSides,
166 const tlp::Coord ¢er,
167 const tlp::Size &size,
168 float startAngle = 0);
A graph property that maps a Boolean value to graph elements.
A graph property that maps a double value to graph elements.
A graph property that maps a tlp::Coord value to graph nodes and std::vector<tlp::Coord> for edges.
A graph property that maps a tlp::Size value to graph elements.
This class represents the 3D bounding box of an object. It is mostly used to determine whether or not...
Interface for Tulip iterators. Allows basic iteration operations only.