使用CGAL构建三角网,实现三角剖分,用于CPU下快速正射校正
环境说明:
windows7;
CGAL4.13-Setup.exe 官网下载;
boost_1_67_0-msvc-12.0-64.exe 官网下载;
cmake-3.14.0-rc2-win64-x64.msi 官网下载;
VS2014需要更新到5,vs2013.5。
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
#include <fstream>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Constrained_Delaunay_triangulation_2<K> CDT;
typedef CDT::Point Point;
typedef CDT::Vertex_handle Vertex_handle;
int main( )
{
std::ifstream in("data/triangulation_prog1.cin");//实验数据
std::istream_iterator<Point> begin(in);
std::istream_iterator<Point> end;
CDT T;