// fragtri.hpp -- map fragment triangulation // // Written by Frederic Bouvier, started March 2004. // // Copyright (C) 2004 Frederic Bouvier - fredb@users.sourceforge.net // // 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., 675 Mass Ave, Cambridge, MA 02139, USA. // // $Id: fragtri.hpp,v 1.2 2005/05/09 07:13:21 fredb Exp $ #ifndef _fragtri_hpp_ #define _fragtri_hpp_ #ifdef ABSOLUTE #undef ABSOLUTE #endif #ifdef RELATIVE #undef RELATIVE #endif //#include #include #include #include //typedef CGAL::Cartesian K; struct K : CGAL::Exact_predicates_inexact_constructions_kernel {}; typedef CGAL::Triangulation_vertex_base_2 Vb; template > class FGSD_MapFace : public Fb { typedef Fb Base; public: typedef typename Fb::Vertex_handle Vertex_handle; typedef typename Fb::Face_handle Face_handle; template < typename TDS2 > struct Rebind_TDS { typedef typename Fb::template Rebind_TDS::Other Fb2; typedef FGSD_MapFace Other; }; FGSD_MapFace() : Base() , inside( -2 ) {} FGSD_MapFace(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2) : Base(v0,v1,v2) , inside( -2 ) {} FGSD_MapFace(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, Face_handle n0, Face_handle n1, Face_handle n2) : Base(v0,v1,v2,n0,n1,n2) , inside( -2 ) {} FGSD_MapFace(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, Face_handle n0, Face_handle n1, Face_handle n2, bool c0, bool c1, bool c2) : Base(v0,v1,v2,n0,n1,n2,c0,c1,c2) , inside( -2 ) {} FGSD_MapFace( const FGSD_MapFace &r) : Base(r) , inside( r.inside ) {} // -2: not visited, -1: not checked, 0: outside (greyed), 1: inside int inside; }; typedef CGAL::Triangulation_data_structure_2 > Tds; typedef CGAL::Exact_predicates_tag Itag; typedef CGAL::Constrained_triangulation_2 CTb; typedef CGAL::Constrained_triangulation_plus_2 CT; class FGSD_MapTriangulation : public CT {}; #endif