/* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __GEOMCLEANER_H__ #define __GEOMCLEANER_H__ /** \file \ingroup freestyle * \brief Class to define a cleaner of geometry providing a set of useful tools */ #include "Geom.h" #include "../system/FreestyleConfig.h" #ifdef WITH_CXX_GUARDEDALLOC #include "MEM_guardedalloc.h" #endif namespace Freestyle { using namespace Geometry; class GeomCleaner { public: inline GeomCleaner() {} inline ~GeomCleaner() {} /*! Sorts an array of Indexed vertices * iVertices * Array of vertices to sort. It is organized as a float series of vertex coordinates: XYZXYZXYZ... * iVSize * The size of iVertices array. * iIndices * The array containing the vertex indices (used to refer to the vertex coordinates in an indexed face). Each * element is an unsignedeger multiple of 3. * iISize * The size of iIndices array * oVertices * Output of sorted vertices. A vertex v1 precedes another one v2 in this array if v1.x