21 #ifndef GL_CONVEX_HULL_H
22 #define GL_CONVEX_HULL_H
25 #include <tulip/BoundingBox.h>
26 #include <tulip/Graph.h>
27 #include <tulip/Color.h>
28 #include <tulip/Coord.h>
30 #include <tulip/GlComposite.h>
34 struct ConvexHullItem;
40 class TLP_GL_SCOPE GlConvexHull:
public GlComposite {
51 GlConvexHull(
const std::vector<Coord> &points,
52 const std::vector<Color> &fillColors,
53 const std::vector<Color> &outlineColors,
56 const std::string &name,
57 bool computeHull=
true);
59 virtual ~GlConvexHull() {}
64 virtual void acceptVisitor(GlSceneVisitor *visitor) {
65 if(boundingBox.isValid()) {
69 for(std::list<GlSimpleEntity*>::iterator it=_sortedElements.begin(); it!=_sortedElements.end(); ++it) {
70 (*it)->acceptVisitor(visitor);
78 std::string getName() {
85 virtual void draw(
float lod,Camera *camera);
90 static ConvexHullItem *buildConvexHullsFromHierarchy(Graph *graph,
91 std::vector<Color> fColors,
92 std::vector<Color> oColors,
93 bool deduceFromChilds =
true,
95 unsigned int depth = 0);
100 virtual void translate(
const Coord& mouvement);
105 virtual void getXML(std::string &outString);
110 virtual void setWithXML(
const std::string &inString,
unsigned int ¤tPosition);
115 std::vector<Coord> _points;
116 std::vector<Color> _fillColors;
117 std::vector<Color> _outlineColors;
123 struct ConvexHullItem {
127 std::vector<ConvexHullItem *> children;