In the Regular_triangulation, from vertices iterator’s method “point()”, what we get is Weighted_point directly!
Then use point() and weight() functions to access the basic point and the weight.
For basic point, x(),y() and z() functions are used to access each coordinate.
Following code use the weighted points in regular triangulation to draw circles:
1: iVertexFinite pf=rt.finite_vertices_begin();
2: while(pf!=rt.finite_vertices_end())
3: {
4: //wp=pf->point();
5: cout<<"****"<<*pf<
6: Utility::drawCircle((pf->point()).point().x(),(pf->point()).point().y(),(pf->point()).weight());
7: ++pf;
8: }
About the include
In C++, usually I would like to put all the necessary header files in stdafx.h. However, if I include my own header files and in my own header file the stdafx.h is also needed, then there will come out some errors.
Remember to include just the system or other library headers in stdafx.h and include own own headers exactly where we need.
The glNewList
To use glCallList funciton to show the list graphics, we should first create a list using a list number.
Notice the number 0 should not be used as the list number. As in my project , I use enum type to enumerate all the list and the first list never shows. After I set the first enum constant to 1, then everything works ok.
No 0 for the display list.
Ball weight of the skin surface
To calculate the skin surface of the given set of weighted points, the first step is to shrink the radius of these balls by sqrt(2), which means to divide the weight by 2. Then all the triangulation, voronoi diagram, mixed cells and so on are based on these new balls!
Divide the weight by 2 firstly!
Oh, that is not needed!
Point in triangle test
http://www.blackpawn.com/texts/pointinpoly/default.html
Some CGAL functions
CGAL::do_intersect
CGAL::intersection
CGAL::Segment_2
CGAL::get_intersection_points
CGAL::Point_2
CGAL::bounded_side_2 point in polygon test
OpenGL 2D rotation
Rotate 2D in opengl, everything is rotated around the z axis!
本文介绍了在Regular triangulation中如何通过迭代顶点获取加权点,并使用CGAL库进行几何运算的方法。详细解释了如何从顶点迭代器中获取基本点及其权重,并演示了如何利用这些加权点绘制圆圈。此外还提到了OpenGL中调用显示列表的注意事项及计算皮肤表面的球体权重调整技巧。
425

被折叠的 条评论
为什么被折叠?



