21 #ifndef GL_CONVEX_HULL_H
22 #define GL_CONVEX_HULL_H
26 #include <tulip/Color.h>
27 #include <tulip/GlComposite.h>
31 struct ConvexHullItem;
38 class TLP_GL_SCOPE GlConvexHull:
public GlComposite {
49 GlConvexHull(
const std::vector<Coord> &points,
50 const std::vector<Color> &fillColors,
51 const std::vector<Color> &outlineColors,
54 const std::string &name,
55 bool computeHull=
true);
57 virtual ~GlConvexHull() {}
62 virtual void acceptVisitor(GlSceneVisitor *visitor) {
63 if(boundingBox.isValid()) {
67 for(std::list<GlSimpleEntity*>::iterator it=_sortedElements.begin(); it!=_sortedElements.end(); ++it) {
68 (*it)->acceptVisitor(visitor);
76 std::string getName() {
83 virtual void draw(
float lod,Camera *camera);
88 static ConvexHullItem *buildConvexHullsFromHierarchy(Graph *graph,
89 std::vector<Color> fColors,
90 std::vector<Color> oColors,
91 bool deduceFromChilds =
true,
93 unsigned int depth = 0);
98 virtual void translate(
const Coord& mouvement);
103 virtual void getXML(std::string &outString);
108 virtual void setWithXML(
const std::string &inString,
unsigned int ¤tPosition);
113 std::vector<Coord> _points;
114 std::vector<Color> _fillColors;
115 std::vector<Color> _outlineColors;
121 struct ConvexHullItem {
125 std::vector<ConvexHullItem *> children;