Subject: CGAL users discussion list
List archive
Re: [cgal-discuss][] how to push modified vertex back to Polyhedron data structure?
Chronological Thread
- From: Sylvain Pion <>
- To:
- Subject: Re: [cgal-discuss][] how to push modified vertex back to Polyhedron data structure?
- Date: Thu, 24 Apr 2008 19:36:24 +0200
Andreas Fabri a écrit :
samuel kim wrote:
Hi all,
How can the intentionally modified votex value be pushed back into the data
structure? The below is an example source code I want to do. for(Point_iterator pPoint = points_begin();pPoint !=
points_end();pPoint++)
{
double mdx = pPoint->x()*3.0;
double mdy = pPoint->y()*3.0;
double mdz = pPoint->z()*3.0; here, how to store the modified vertex(mdx,mdy,mdz) into
pPoint->x,y,z? }
Anyone knows this? Thanks.
Samuel
Samuel,
You can't as points are not modifiable. You need the vertex_iterator
and call vi->point() = Point(mdx,mdy,mdz)
You don't need the vertex_iterator... Points are assignable:
*pPoint = Point(mdx,mdy,mdz).
--
Sylvain Pion
INRIA Sophia-Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/
- Getting a vertex index from a Polyhedron_3, Richard Southern, 04/24/2008
- [cgal-discuss][] how to push modified vertex back to Polyhedron data structure?, samuel kim, 04/24/2008
- Re: [cgal-discuss][] how to push modified vertex back to Polyhedron data structure?, Andreas Fabri, 04/24/2008
- Re: [cgal-discuss][] how to push modified vertex back to Polyhedron data structure?, Sylvain Pion, 04/24/2008
- Re: [cgal-discuss][] how to push modified vertex back to Polyhedron data structure?, Andreas Fabri, 04/24/2008
- [cgal-discuss][] how to push modified vertex back to Polyhedron data structure?, samuel kim, 04/24/2008
Archive powered by MHonArc 2.6.16.