Using CGAL in VS2005

本文介绍了一项几何课程项目,目标是基于加权点集创建皮肤曲面,并实现不同形状间的曲面变形。项目主要步骤包括生成加权Delaunay三角剖分、Voronoi图、混合单元计算等。文中还详细记录了使用CGAL库进行开发的环境搭建过程。
The project

To start my geometry class project, which needs to create the skin surface of given sets of weighted points and deform the skin surface from one shape to another.

Main steps in this project are:

1. Generate the weighted Delaunay Triangulation, which in CGAL is called regular Delaunay Triangulation;

2. Generate the corresponding Voronoi Diagram;

3. Calculate the mixed cells, also called mixed complex, based on the first two results;

4. For each mixed complex, calculate the skin curve equation;

5. Visualize the skin curve, this step is planned to be done with OpenGL.

Set up the environment

1. Install boost (http://www.boost.org/users/download/)

2. Install CGAL (http://www.cgal.org/download.html) Note: During the installation process, it will popup windows asking for whether to install some other library, as I have no idea about whether they are needed or not, I installed all which really cost a large amount of time.

3. After that we can use it in VS2005. First create a Win32 console application and set the VS2005 environment.

4. From Tools->Options, open the Options Dialogue and select the Projects and Solutions –> VC++ Directories.

5. Select Include files, add

[CGAL directory]/include

[boost directory]/boost_[version number]

[CGAL directory]/include/CGAL/config/msvc

[CGAL directory]/auxiliary/gmp/include

6. Select Library files, add

[CGAL directory]/lib

[boost directory]/boost_[version number]/libs

[CGAL directory]/auxiliary/gmp/lib

7. Select Source files, add

[CGAL directory]/src

 

Till now, at least on my computer the code using CGAL libraries can be built. Next is to test whether it works well or not and then use it in my project. But I found the very first thing is to get known the input file format of data!

生成开始于 0:28... 1>------ 已启动生成: 项目: TestOpenGL, 配置: Release x64 ------ 1>AmbientLight.cpp 1>CncEngine.cpp 1>E:\临时项目\CGAL\TestOpenGL\TestOpenGL\CncEngine.cpp(450,7): error C2039: "generator_params": 不是 "CGAL::Named_function_parameters<CGAL::Surface_mesh<Geometry::Point_3>::Property_map<CGAL::Surface_mesh<Geometry::Point_3>::Vertex_index,CGAL::Point_3<Kernel_>>,CGAL::internal_np::vertex_point_t,CGAL::internal_np::No_property>" 的成员 1>E:\临时项目\CGAL\TestOpenGL\TestOpenGL\CncEngine.cpp(450,7): error C2039: with 1>E:\临时项目\CGAL\TestOpenGL\TestOpenGL\CncEngine.cpp(450,7): error C2039: [ 1>E:\临时项目\CGAL\TestOpenGL\TestOpenGL\CncEngine.cpp(450,7): error C2039: Kernel_=CGAL::Epeck 1>E:\临时项目\CGAL\TestOpenGL\TestOpenGL\CncEngine.cpp(450,7): error C2039: ] 1>(编译源文件“/CncEngine.cpp”) 1> E:\临时项目\CGAL\TestOpenGL\inc\CGAL-6.0.1\include\CGAL\Named_function_parameters.h(336,8): 1> 参见“CGAL::Named_function_parameters<CGAL::Surface_mesh<Geometry::Point_3>::Property_map<CGAL::Surface_mesh<Geometry::Point_3>::Vertex_index,CGAL::Point_3<Kernel_>>,CGAL::internal_np::vertex_point_t,CGAL::internal_np::No_property>”的声明 1> with 1> [ 1> Kernel_=CGAL::Epeck 1> ] 1>E:\临时项目\CGAL\TestOpenGL\TestOpenGL\CncEngine.cpp(451,25): error C2039: "delaunay_mesher": 不是 "CGAL::parameters" 的成员 1>(编译源文件“/CncEngine.cpp”) 1> E:\临时项目\CGAL\TestOpenGL\inc\CGAL-6.0.1\include\CGAL\Named_function_parameters.h(426,11): 1> 参见“CGAL::parameters”的声明 1>E:\临时项目\CGAL\TestOpenGL\TestOpenGL\CncEngine.cpp(451,25): error C3861: “delaunay_mesher”: 找不到标识符 1>(编译源文件“/CncEngine.cpp”) 1>E:\临时项目\CGAL\TestOpenGL\TestOpenGL\CncEngine.cpp(445,18): error C2440: “初始化”: 无法从“OutputIterator”转换为“bool” 1>E:\临时项目\CGAL\TestOpenGL\TestOpenGL\CncEngine.cpp(445,18): error C2440: with 1>E:\临时项目\CGAL\TestOpenGL\TestOpenGL\CncEngine.cpp(445,18): error C2440: [ 1>E:\临时项目\CGAL\TestOpenGL\TestOpenGL\CncEngine.cpp(445,18): error C2440: OutputIterator=std::back_in
03-15
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值