Subject: CGAL users discussion list
List archive
- From: "liuning" <>
- To: "cgal-discuss" <>
- Subject: Re: [cgal-discuss] range_search problem
- Date: Tue, 22 Sep 2009 10:17:35 +0800
I'm trying to change the 2D mesh vertex positions using mouse
dragging, so I initialize the mesh using constrained delaunay triangulation,
then refine it using refine_Delaunay_mesh_2 , and never call
"refine_Delaunay_mesh_2 " again , nor add/delete vertex/constrain either, the
only thing I do is to change the positions of the vertices near the
point where mouse drags , as code below
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
//typedef CGAL::Triangulation_vertex_base_2<K> Vb;
typedef Triangulation_vertex_base_2_LN<K> Vb;
//typedef CGAL::Delaunay_mesh_face_base_2<K> Fb;
typedef Delaunay_mesh_face_base_2_LN<K> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;
typedef CGAL::Constrained_Delaunay_triangulation_2<K, Tds> CDT;
CDT cdt;
In the mousemove callback function:
std::list<vertex_handle> LV;
LV.clear();
Circle circle( Point(mouse_x , mouse_y) , range_square
);
range_search( cdt, circle, std::back_inserter(LV) );
for ( it=LV.begin(); it != LV.end(); it++
)
{
// calculate the movement for each vertex...
(*it)->set_point(
Point((*it)->point().x()+movement_x, (*it)->point().y()+movement_y) );
}
LV.clear();
Redisplay(); I'm still confused that range_search( Dt& delau, Circle C,
OutputIterator res) change delau ...
or I misunderstand something? 2009-09-22
liuning
发件人:
发送时间: 2009-09-21 20:32:49
收件人: cgal-discuss
抄送:
主题: [cgal-discuss] range_search problem
hi,everyone
I had problems when using range_search ,I am trying to get the vertices with in
a certain range for a 2D point in delaunay 2D mesh, but when I tried to call
range_search, the delaunay mesh changes!(some edge flippling for example ).
So my question is : is there any way of doing range search without change the
delaunay mesh itself ?
thank you
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
|
- [cgal-discuss] range_search problem, liuning, 09/21/2009
- Re: [cgal-discuss] range_search problem, liuning, 09/22/2009
Archive powered by MHonArc 2.6.16.