Tulip  4.6.0
Better Visualization Through Research
library/tulip-core/include/tulip/ConvexHull.h
00001 /*
00002  *
00003  * This file is part of Tulip (www.tulip-software.org)
00004  *
00005  * Authors: David Auber and the Tulip development Team
00006  * from LaBRI, University of Bordeaux
00007  *
00008  * Tulip is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation, either version 3
00011  * of the License, or (at your option) any later version.
00012  *
00013  * Tulip is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00016  * See the GNU General Public License for more details.
00017  *
00018  */
00019 
00020 /**
00021  *
00022  * This file is part of Tulip (www.tulip-software.org)
00023  *
00024  * Authors: David Auber and the Tulip development Team
00025  * from LaBRI, University of Bordeaux
00026  *
00027  * Tulip is free software; you can redistribute it and/or modify
00028  * it under the terms of the GNU Lesser General Public License
00029  * as published by the Free Software Foundation, either version 3
00030  * of the License, or (at your option) any later version.
00031  *
00032  * Tulip is distributed in the hope that it will be useful,
00033  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00034  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00035  * See the GNU General Public License for more details.
00036  *
00037  */
00038 #ifndef TLP_GEO_CONVEX_HULL_H
00039 #define TLP_GEO_CONVEX_HULL_H
00040 #include <vector>
00041 #include <tulip/Coord.h>
00042 
00043 namespace tlp {
00044 
00045 /**
00046  * \brief function for computing a 2D convex hull
00047  *
00048  * Computes a 2D convex hull using the Qhull library (www.qhull.org)
00049  *
00050  * Computes the 2D convex hull and returns a list of indexes for the
00051  * points on the convex hull in counterclockwise order.
00052  *
00053  * The convexHull vector is automatically cleared.
00054  *
00055  */
00056 TLP_SCOPE void convexHull(const std::vector<Coord> &points,
00057                           std::vector<unsigned int> &convexHull);
00058 
00059 /**
00060  * \brief function for computing a 2D/3D convex hull
00061  *
00062  * Computes a 2D/3D convex hull using the Qhull library (www.qhull.org)
00063  *
00064  * Computes a 2D/3D convex hull and returns a list of the hull facets (segments for 2D, triangles for 3D)
00065  * and a list of neighbors facets for each facet. A facet is defined by a list of indexes in the points vector.
00066  * The neighbors facets of a facet are defined by a list of indexes in the convexHullFacets vector
00067  * (facetNeighbors[i] stores the neighbors of facet convexHullFacets[i]).
00068  *
00069  * The convexHullFacets and facetNeighbors vectors are automatically cleared.
00070  */
00071 TLP_SCOPE void convexHull(const std::vector<Coord> &points,
00072                           std::vector<std::vector<unsigned int> > &convexHullFacets,
00073                           std::vector<std::vector<unsigned int> > &facetNeighbors);
00074 
00075 /*@}*/
00076 
00077 }
00078 #endif
 All Classes Files Functions Variables Enumerations Enumerator Properties