mirror of https://github.com/CGAL/cgal
Change comments
This commit is contained in:
parent
cbf3f4d94b
commit
b9bbc93d5b
|
|
@ -79,7 +79,7 @@ int main(int, char**)
|
||||||
CGAL::Isosurfacing::marching_cubes(domain, isovalue, points_mc, polygons_mc);
|
CGAL::Isosurfacing::marching_cubes(domain, isovalue, points_mc, polygons_mc);
|
||||||
CGAL::Isosurfacing::dual_contouring(domain, isovalue, points_dc, polygons_dc);
|
CGAL::Isosurfacing::dual_contouring(domain, isovalue, points_dc, polygons_dc);
|
||||||
|
|
||||||
// save output indexed meshes to files, in the OFF format @fixme these are not meshes...
|
// save indexed face sets to files, in the OFF format
|
||||||
CGAL::IO::write_OFF("output_mc.off", points_mc, polygons_mc);
|
CGAL::IO::write_OFF("output_mc.off", points_mc, polygons_mc);
|
||||||
CGAL::IO::write_OFF("output_dc.off", points_dc, polygons_dc);
|
CGAL::IO::write_OFF("output_dc.off", points_dc, polygons_dc);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ int main(int, char**)
|
||||||
// run dual contouring isosurfacing
|
// run dual contouring isosurfacing
|
||||||
CGAL::Isosurfacing::dual_contouring(domain, 0.8, points, polygons);
|
CGAL::Isosurfacing::dual_contouring(domain, 0.8, points, polygons);
|
||||||
|
|
||||||
// write output indexed surface mesh to file, in OFF format
|
// save indexed face set to file, in the OFF format
|
||||||
CGAL::IO::write_OFF("output.off", points, polygons);
|
CGAL::IO::write_OFF("output.off", points, polygons);
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ int main(int, char**)
|
||||||
const Vector vec_spacing(spacing, spacing, spacing);
|
const Vector vec_spacing(spacing, spacing, spacing);
|
||||||
|
|
||||||
// create a domain with given bounding box and grid spacing
|
// create a domain with given bounding box and grid spacing
|
||||||
auto domain = CGAL::Isosurfacing::create_implicit_Cartesian_grid_domain<Kernel>(bbox, vec_spacing, iwp_value, iwp_gradient);
|
auto domain = CGAL::Isosurfacing::create_implicit_Cartesian_grid_domain(bbox, vec_spacing, iwp_value, iwp_gradient);
|
||||||
|
|
||||||
// prepare collections for the result
|
// prepare collections for the result
|
||||||
Point_range points;
|
Point_range points;
|
||||||
|
|
@ -52,7 +52,7 @@ int main(int, char**)
|
||||||
// run duak contouring with isovalue set to 0.0
|
// run duak contouring with isovalue set to 0.0
|
||||||
CGAL::Isosurfacing::dual_contouring(domain, 0.0, points, polygons);
|
CGAL::Isosurfacing::dual_contouring(domain, 0.0, points, polygons);
|
||||||
|
|
||||||
// save output to the OFF format
|
// save indexed face set to file, in the OFF format
|
||||||
CGAL::IO::write_OFF("output.off", points, polygons);
|
CGAL::IO::write_OFF("output.off", points, polygons);
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ int main(int, char**)
|
||||||
};
|
};
|
||||||
|
|
||||||
// create a domain with given bounding box and grid spacing
|
// create a domain with given bounding box and grid spacing
|
||||||
auto domain = CGAL::Isosurfacing::create_implicit_Cartesian_grid_domain<Kernel>(bbox, grid_spacing,
|
auto domain = CGAL::Isosurfacing::create_implicit_Cartesian_grid_domain(bbox, grid_spacing,
|
||||||
mesh_distance, mesh_normal);
|
mesh_distance, mesh_normal);
|
||||||
// containers for output indexed surface mesh
|
// containers for output indexed surface mesh
|
||||||
Point_range points;
|
Point_range points;
|
||||||
|
|
@ -78,7 +78,7 @@ int main(int, char**)
|
||||||
// run dual contouring
|
// run dual contouring
|
||||||
CGAL::Isosurfacing::dual_contouring(domain, offset_value, points, polygons);
|
CGAL::Isosurfacing::dual_contouring(domain, offset_value, points, polygons);
|
||||||
|
|
||||||
// save output indexed mesh to a file, in the OFF format
|
// save indexed face set to file, in the OFF format
|
||||||
CGAL::IO::write_OFF("result.off", points, polygons);
|
CGAL::IO::write_OFF("result.off", points, polygons);
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ int main(int, char**)
|
||||||
// run marching cubes with an isovalue of 0.8
|
// run marching cubes with an isovalue of 0.8
|
||||||
CGAL::Isosurfacing::marching_cubes(domain, 0.8, points, triangles);
|
CGAL::Isosurfacing::marching_cubes(domain, 0.8, points, triangles);
|
||||||
|
|
||||||
// save output indexed surface mesh to file, in the OFF format
|
// save indexed face set to file, in the OFF format
|
||||||
CGAL::IO::write_OFF("output.off", points, triangles);
|
CGAL::IO::write_OFF("output.off", points, triangles);
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,7 @@ int main(int, char**)
|
||||||
const Vector vec_spacing(spacing, spacing, spacing);
|
const Vector vec_spacing(spacing, spacing, spacing);
|
||||||
|
|
||||||
// create domain with sphere function
|
// create domain with sphere function
|
||||||
auto domain = CGAL::Isosurfacing::create_implicit_Cartesian_grid_domain<Kernel>
|
auto domain = CGAL::Isosurfacing::create_implicit_Cartesian_grid_domain(bbox, vec_spacing, sphere_function);
|
||||||
(bbox, vec_spacing, sphere_function);
|
|
||||||
|
|
||||||
// points and triangles for the output indexed mesh
|
// points and triangles for the output indexed mesh
|
||||||
Point_range points;
|
Point_range points;
|
||||||
|
|
@ -43,7 +42,7 @@ int main(int, char**)
|
||||||
timer.stop();
|
timer.stop();
|
||||||
std::cout << "done (" << timer.time() << "s, " << triangles.size() << " triangles)" << std::endl;
|
std::cout << "done (" << timer.time() << "s, " << triangles.size() << " triangles)" << std::endl;
|
||||||
|
|
||||||
// save ouput indexed mesh to a file, in the OFF format
|
// save indexed face set to file, in the OFF format
|
||||||
CGAL::IO::write_OFF("output.off", points, triangles);
|
CGAL::IO::write_OFF("output.off", points, triangles);
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ int main(int, char**)
|
||||||
// execute marching cubes
|
// execute marching cubes
|
||||||
CGAL::Isosurfacing::marching_cubes(domain, 1120 /*isovalue*/, points, polygons);
|
CGAL::Isosurfacing::marching_cubes(domain, 1120 /*isovalue*/, points, polygons);
|
||||||
|
|
||||||
// save output indexed mesh to a file, in the OFF format
|
// save indexed face set to file, in the OFF format
|
||||||
CGAL::IO::write_OFF("result.off", points, polygons);
|
CGAL::IO::write_OFF("result.off", points, polygons);
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ int main(int argc, char **argv)
|
||||||
auto domain = CGAL::Isosurfacing::create_explicit_Cartesian_grid_domain(grid);
|
auto domain = CGAL::Isosurfacing::create_explicit_Cartesian_grid_domain(grid);
|
||||||
|
|
||||||
// run Marching cubes with a range of offsets,
|
// run Marching cubes with a range of offsets,
|
||||||
// and save all output meshes to files "output-index.off"
|
// and save all outputs to files "output-index.off"
|
||||||
int index = 0;
|
int index = 0;
|
||||||
for(FT offset = 0.0; offset < 0.3; offset += 0.01, index++)
|
for(FT offset = 0.0; offset < 0.3; offset += 0.01, index++)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,7 @@ int main(int, char**)
|
||||||
const Vector vec_spacing(spacing, spacing, spacing);
|
const Vector vec_spacing(spacing, spacing, spacing);
|
||||||
|
|
||||||
// create domain with sphere function
|
// create domain with sphere function
|
||||||
auto domain = CGAL::Isosurfacing::create_implicit_Cartesian_grid_domain<Kernel>
|
auto domain = CGAL::Isosurfacing::create_implicit_Cartesian_grid_domain(bbox, vec_spacing, sphere_function);
|
||||||
(bbox, vec_spacing, sphere_function);
|
|
||||||
|
|
||||||
// points and triangles for the output indexed mesh
|
// points and triangles for the output indexed mesh
|
||||||
Point_range points;
|
Point_range points;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue