mirror of https://github.com/CGAL/cgal
massaging Isosurfacing examples
rename mesh offset to signed mesh offset
This commit is contained in:
parent
e627a68205
commit
1a50b533c7
|
|
@ -8,7 +8,7 @@ find_package(CGAL REQUIRED)
|
||||||
|
|
||||||
create_single_source_cgal_program( "marching_cubes_implicit_sphere.cpp" )
|
create_single_source_cgal_program( "marching_cubes_implicit_sphere.cpp" )
|
||||||
create_single_source_cgal_program( "marching_cubes_cartesian_grid_sphere.cpp" )
|
create_single_source_cgal_program( "marching_cubes_cartesian_grid_sphere.cpp" )
|
||||||
create_single_source_cgal_program( "marching_cubes_mesh_offset.cpp" )
|
create_single_source_cgal_program( "marching_cubes_signed_mesh_offset.cpp" )
|
||||||
create_single_source_cgal_program( "marching_cubes_inrimage.cpp" )
|
create_single_source_cgal_program( "marching_cubes_inrimage.cpp" )
|
||||||
|
|
||||||
find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
|
find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
|
||||||
|
|
@ -37,7 +37,7 @@ include(CGAL_TBB_support)
|
||||||
if(TARGET CGAL::TBB_support)
|
if(TARGET CGAL::TBB_support)
|
||||||
target_link_libraries(marching_cubes_implicit_sphere PRIVATE CGAL::TBB_support)
|
target_link_libraries(marching_cubes_implicit_sphere PRIVATE CGAL::TBB_support)
|
||||||
target_link_libraries(marching_cubes_cartesian_grid_sphere PRIVATE CGAL::TBB_support)
|
target_link_libraries(marching_cubes_cartesian_grid_sphere PRIVATE CGAL::TBB_support)
|
||||||
target_link_libraries(marching_cubes_mesh_offset PRIVATE CGAL::TBB_support)
|
target_link_libraries(marching_cubes_signed_mesh_offset PRIVATE CGAL::TBB_support)
|
||||||
target_link_libraries(marching_cubes_inrimage PRIVATE CGAL::TBB_support)
|
target_link_libraries(marching_cubes_inrimage PRIVATE CGAL::TBB_support)
|
||||||
|
|
||||||
if(TARGET CGAL::Eigen3_support)
|
if(TARGET CGAL::Eigen3_support)
|
||||||
|
|
|
||||||
|
|
@ -85,13 +85,13 @@ int main() {
|
||||||
// create domain from the grid
|
// create domain from the grid
|
||||||
auto domain = CGAL::Isosurfacing::create_explicit_cartesian_grid_domain<Kernel>(grid);
|
auto domain = CGAL::Isosurfacing::create_explicit_cartesian_grid_domain<Kernel>(grid);
|
||||||
|
|
||||||
// prepare collections for output indexed surface mesh
|
// containers for output indexed triangle soup
|
||||||
Point_range points;
|
Point_range points;
|
||||||
Polygon_range polygons;
|
Polygon_range polygons;
|
||||||
|
|
||||||
// execute marching cubes with an isovalue equating offset
|
// execute marching cubes with an isovalue equating offset
|
||||||
CGAL::Isosurfacing::marching_cubes(domain, offset_value, points, polygons);
|
CGAL::Isosurfacing::marching_cubes(domain, offset_value, points, polygons);
|
||||||
|
|
||||||
// save output indexed surface mesh to a file, in the OFF format
|
// save output indexed triangle soup to a file, in the OFF format
|
||||||
CGAL::IO::write_OFF("result.off", points, polygons);
|
CGAL::IO::write_OFF("output.off", points, polygons);
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue