Skip to content

Commit

Permalink
Rename api call
Browse files Browse the repository at this point in the history
  • Loading branch information
ipadjen committed Jun 21, 2024
1 parent 79969ae commit 3d51686
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 22 deletions.
30 changes: 15 additions & 15 deletions apps/reconstruct_api/reconstruct_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions include/roofer/roofer.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace roofer {
* @param cfg Configuration parameters
*/
template <typename Footprint>
std::vector<Mesh> reconstruct_single_instance(
std::vector<Mesh> reconstruct(
const PointCollection& points_roof, const PointCollection& points_ground,
Footprint& footprint, ReconstructionConfig cfg = ReconstructionConfig()) {
try {
Expand Down Expand Up @@ -210,12 +210,11 @@ namespace roofer {
* //todo doc
*/
template <typename Footprint>
std::vector<Mesh> reconstruct_single_instance(
std::vector<Mesh> 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
Expand Down
6 changes: 3 additions & 3 deletions rooferpy/rooferpy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand Down

0 comments on commit 3d51686

Please sign in to comment.