#include <CGAL/Cartesian_grid_3.h>
#include <CGAL/Dual_contouring_3.h>
#include <CGAL/Explicit_cartesian_grid_domain.h>
#include <CGAL/Marching_cubes_3.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/boost/graph/IO/OFF.h>
typedef std::vector<Point> Point_range;
typedef std::vector<std::vector<std::size_t>> Polygon_range;
return (value > 0) - (value < 0);
}
int main() {
std::shared_ptr<Grid> grid = std::make_shared<Grid>(7, 7, 7, bbox);
for (std::size_t x = 0; x < grid->xdim(); x++) {
for (std::size_t y = 0; y < grid->ydim(); y++) {
for (std::size_t z = 0; z < grid->zdim(); z++) {
const FT pos_x = x * grid->get_spacing()[0] + bbox.
xmin();
const FT pos_y = y * grid->get_spacing()[1] + bbox.
ymin();
const FT pos_z = z * grid->get_spacing()[2] + bbox.
zmin();
}
}
}
auto cube_gradient = [](const Point& p) {
Vector g(0, 0, 0);
g += Vector(
sign(p.x()), 0, 0);
}
g += Vector(0,
sign(p.y()), 0);
}
g += Vector(0, 0,
sign(p.z()));
}
const FT length_sq = g.squared_length();
if (length_sq > 0.00001) {
g /= CGAL::approximate_sqrt(length_sq);
}
return g;
};
auto domain = CGAL::Isosurfacing::create_explicit_cartesian_grid_domain<Kernel>(grid, cube_gradient);
Point_range points_mc, points_dc;
Polygon_range polygons_mc, polygons_dc;
}