1 #include "../src/models/shape_loader_private.h"
7 int main(
int argc,
char **argv)
11 if (argc < 3 || argc > 7) {
12 std::cout <<
"Usage: ed_heightmap_to_mesh INPUT_IMAGE OUTPUT_FILE RESOLUTION [BLOCK_HEIGHT] [ORIGIN_X ORIGIN_Y]" <<
std::endl;
19 double resolution = 0.2;
21 resolution = atof(argv[3]);
24 double block_height = 1;
26 block_height = atof(argv[4]);
29 double origin_x = 0, origin_y = 0;
32 std::cout <<
"ORIGIN_X and ORIGIN_Y are optional, but shoud be provided together" <<
std::endl;
35 origin_x = atof(argv[5]);
36 origin_y = atof(argv[6]);
42 resolution, resolution,
false,
error);
52 std::cout <<
"Could not convert loaded shape to mesh file: " << output_file <<
std::endl;
56 std::cout <<
"Succesfully converted: '" << input_file <<
"' to '" << output_file <<
"'. With " <<
57 shape->getMesh().getPoints().size() <<
" points and " << shape->getMesh().getTriangleIs().size() <<