Subject: CGAL users discussion list
List archive
- From: chrism <>
- To:
- Subject: [cgal-discuss] Modify vertex values
- Date: Fri, 25 Jul 2014 15:33:31 -0700 (PDT)
I need to apply a rotation to each triangle in my Delauny (2D) triangulation.
To do this, I calculate the rotation to move each triangle's vertex into the
new coordinate system. Because I need to perform triangle-triangle
intersection in this new coordinate system I need to update the x,y,z values
at each vertex to the new x',y',z' values. Critically though, I need to
maintain the triangles (despite the fact they will no longer be Delaunay) --
therefore removal/insert doesn't work.
Therefore, what would be the best way forward to modify the vertex's x,y,z
values?
Ideally I'd do something like:
Delaunay prj(original_tri);
for (triangulation::Finite_faces_iterator fit =
prj->finite_faces_begin(); fit != prj->finite_faces_end(); ++fit)
{
//interpolate the station data to the current element
triangulation::Face_handle face = fit;
vert(0) = face->vertex(0)->point().x();
ver(1) = face->vertex(0)->point().y();
vert(2) = face->vertex(0)->point().z();
rot_vert = rotation(vert);
face->vertex(0)->set_x(rot_vert(0));
face->vertex(1)->set_x(rot_vert(1));
face->vertex(2)->set_x(rot_vert(2));
.....
Thanks.
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Modify-vertex-values-tp4659612.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Modify vertex values, chrism, 07/26/2014
- Re: [cgal-discuss] Modify vertex values, Sylvain Pion, 07/26/2014
- Re: [cgal-discuss] Modify vertex values, chrism, 07/26/2014
- Re: [cgal-discuss] Modify vertex values, Sylvain Pion, 07/26/2014
- Re: [cgal-discuss] Modify vertex values, chrism, 07/26/2014
- Re: [cgal-discuss] Modify vertex values, Andreas Fabri, 07/26/2014
- Re: [cgal-discuss] Modify vertex values, chrism, 07/26/2014
- Re: [cgal-discuss] Modify vertex values, Andreas Fabri, 07/26/2014
- Re: [cgal-discuss] Modify vertex values, chrism, 07/26/2014
- Re: [cgal-discuss] Modify vertex values, Sylvain Pion, 07/26/2014
- Re: [cgal-discuss] Modify vertex values, chrism, 07/26/2014
- Re: [cgal-discuss] Modify vertex values, Sylvain Pion, 07/26/2014
Archive powered by MHonArc 2.6.18.