From 3d51686885daf888f01d65aa604b720239b64a0e Mon Sep 17 00:00:00 2001 From: Ivan Paden Date: Fri, 21 Jun 2024 12:11:06 +0200 Subject: [PATCH] Rename api call --- apps/reconstruct_api/reconstruct_api.cpp | 30 ++++++++++++------------ include/roofer/roofer.h | 7 +++--- rooferpy/rooferpy.cpp | 6 ++--- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/apps/reconstruct_api/reconstruct_api.cpp b/apps/reconstruct_api/reconstruct_api.cpp index e2ac57db..a55f2ba5 100644 --- a/apps/reconstruct_api/reconstruct_api.cpp +++ b/apps/reconstruct_api/reconstruct_api.cpp @@ -93,25 +93,25 @@ int main(int argc, const char* argv[]) { // reconstruct logger.info("Reconstructing LoD2.2"); - auto mesh_lod22 = roofer::reconstruct_single_instance( - points_roof, points_ground, footprints.front(), - {.floor_elevation = floor_elevation, - .override_with_floor_elevation = true}); + auto mesh_lod22 = + roofer::reconstruct(points_roof, points_ground, footprints.front(), + {.floor_elevation = floor_elevation, + .override_with_floor_elevation = true}); logger.info("Reconstructing LoD1.3"); - auto mesh_lod13 = roofer::reconstruct_single_instance( - points_roof, points_ground, footprints.front(), - {.lod = 13, - .lod13_step_height = 2, - .floor_elevation = floor_elevation, - .override_with_floor_elevation = true}); + auto mesh_lod13 = + roofer::reconstruct(points_roof, points_ground, footprints.front(), + {.lod = 13, + .lod13_step_height = 2, + .floor_elevation = floor_elevation, + .override_with_floor_elevation = true}); logger.info("Reconstructing LoD1.2"); - auto mesh_lod12 = roofer::reconstruct_single_instance( - points_roof, points_ground, footprints.front(), - {.lod = 12, - .floor_elevation = floor_elevation, - .override_with_floor_elevation = true}); + auto mesh_lod12 = + roofer::reconstruct(points_roof, points_ground, footprints.front(), + {.lod = 12, + .floor_elevation = floor_elevation, + .override_with_floor_elevation = true}); logger.info("Outputting to OBJ files"); // lod22 diff --git a/include/roofer/roofer.h b/include/roofer/roofer.h index dd812c75..3ae12b89 100644 --- a/include/roofer/roofer.h +++ b/include/roofer/roofer.h @@ -66,7 +66,7 @@ namespace roofer { * @param cfg Configuration parameters */ template - std::vector reconstruct_single_instance( + std::vector reconstruct( const PointCollection& points_roof, const PointCollection& points_ground, Footprint& footprint, ReconstructionConfig cfg = ReconstructionConfig()) { try { @@ -210,12 +210,11 @@ namespace roofer { * //todo doc */ template - std::vector reconstruct_single_instance( + std::vector reconstruct( const PointCollection& points_roof, Footprint& footprint, ReconstructionConfig cfg = ReconstructionConfig()) { PointCollection points_ground = PointCollection(); - return reconstruct_single_instance(points_roof, points_ground, footprint, - cfg); + return reconstruct(points_roof, points_ground, footprint, cfg); } // todo maybe move to another location diff --git a/rooferpy/rooferpy.cpp b/rooferpy/rooferpy.cpp index 57c47295..c025bc37 100644 --- a/rooferpy/rooferpy.cpp +++ b/rooferpy/rooferpy.cpp @@ -91,8 +91,8 @@ namespace roofer { } roofer::LinearRing linear_ring; convert_to_linear_ring(footprint, linear_ring); - auto meshes = reconstruct_single_instance(points_roof_pc, points_ground_pc, - linear_ring, cfg); + auto meshes = + reconstruct(points_roof_pc, points_ground_pc, linear_ring, cfg); return convert_meshes_to_py_meshes(meshes); } @@ -105,7 +105,7 @@ namespace roofer { } roofer::LinearRing linear_ring; convert_to_linear_ring(footprint, linear_ring); - auto meshes = reconstruct_single_instance(points_roof_pc, linear_ring, cfg); + auto meshes = reconstruct(points_roof_pc, linear_ring, cfg); return convert_meshes_to_py_meshes(meshes); }