📄 cdt.c
字号:
/********************************************************************************* cdt.C: implementation of the C interface defined in cdt.h**** Copyright (C) 1995 by Dani Lischinski **** 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.********************************************************************************/#include "quadedge.h"// assumes that given points form a bounding convex polygonextern "C"void *create_mesh( int num_bdry_vertices, double *bdry_vertices){ return new Mesh( num_bdry_vertices, bdry_vertices );}// insert a Delaunay siteextern "C"void insert_vertex( Mesh *mesh, double x, double y ){ mesh->InsertSite(Point2d(x, y));}// insert a constraint edgeextern "C"void insert_edge( Mesh *mesh, double x1, double y1, double x2, double y2 ){ mesh->InsertEdge(Point2d(x1, y1), Point2d(x2, y2));}extern "C"void apply_vertices( Mesh *mesh, void *apply_arg, void (*func)( void *apply_arg, void *vertex )){ mesh->ApplyVertices(func, apply_arg);}extern "C"void apply_edges( Mesh *mesh, void *apply_arg, void (*func)( void *apply_arg, void *edge, int constrained )){ mesh->ApplyEdges(func, apply_arg);}extern "C"void destroy_mesh (Mesh *mesh){ delete mesh;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -