Created
September 28, 2023 15:08
-
-
Save afabri/3d1f85feee53e4b5973e50b2c9d43a7f to your computer and use it in GitHub Desktop.
iterate over vertices
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <CGAL/Surface_mesh.h> | |
#include <CGAL/Simple_cartesian.h> | |
typedef CGAL::Simple_cartesian<double> K; | |
typedef K::Point_3 Point_3; | |
typedef CGAL::Surface_mesh<Point_3> Surface_mesh; | |
int main() | |
{ | |
Surface_mesh sm; | |
boost::graph_traits<Surface_mesh>::vertex_descriptor vd = sm.add_vertex(Point_3(0,0,0)); | |
sm.remove_vertex(vd); | |
vd = sm.add_vertex(Point_3(1,0,0)); | |
for(auto v : vertices(sm)){ | |
std::cout << sm.point(v) << std::endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment