Skip to content

Commit 857913a

Browse files
committed
AIコメント対応
1 parent 528a6ed commit 857913a

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#pragma once
2+
3+
#include "citygml/citymodel.h"
4+
#include <map>
5+
#include <memory>
6+
#include <utility>
7+
#include <vector>
8+
9+
namespace plateau::polygonMesh {
10+
using CityModelVector = std::shared_ptr<std::vector<std::weak_ptr<const citygml::CityModel>>>;
11+
}

include/plateau/polygon_mesh/tile_extractor.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
#include <memory>
66
#include <plateau/polygon_mesh/mesh.h>
77
#include <plateau/geometry/geo_coordinate.h>
8+
#include <plateau/polygon_mesh/polygon_mesh_types.h>
89
#include "citygml/citymodel.h"
910
#include "model.h"
1011

1112
namespace plateau::polygonMesh {
1213

13-
using CityModelVector = std::shared_ptr<std::vector<std::weak_ptr<const citygml::CityModel>>>;
14-
1514
/**
1615
* TileExtractorは、複数のCityModelからメッシュを抽出し、指定された範囲(extents)に基づいて結合メッシュを抽出するクラスです。
1716
*

src/c_wrapper/tile_extractor_c.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ using namespace plateau::polygonMesh;
88
extern "C"{
99

1010
LIBPLATEAU_C_EXPORT APIResult LIBPLATEAU_C_API plateau_tile_extractor_extract_with_combine(
11-
const CityModelHandle** const city_model_handles,
11+
const CityModelHandle* const* city_model_handles,
1212
const int city_model_size,
1313
const MeshExtractOptions options,
1414
const std::vector<plateau::geometry::Extent>* extents,
@@ -62,6 +62,11 @@ extern "C"{
6262
return APIResult::ErrorInvalidArgument;
6363
}
6464
TileExtractor::extractWithGrid(*out_model, city_model_handle->getCityModel(), options, *extents);
65+
auto cityModelPtr = city_model_handle->getCityModelPtr();
66+
if (!cityModelPtr) {
67+
return APIResult::ErrorInvalidArgument;
68+
}
69+
TileExtractor::extractWithGrid(*out_model, *cityModelPtr, options, *extents);
6570
return APIResult::Success;
6671
}
6772
API_CATCH;

src/polygon_mesh/area_mesh_factory.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
#include "plateau/geometry/geo_reference.h"
55
#include <plateau/polygon_mesh/mesh.h>
66
#include <plateau/polygon_mesh/mesh_extract_options.h>
7+
#include <plateau/polygon_mesh/polygon_mesh_types.h>
78

89
namespace plateau::polygonMesh {
9-
using CityModelVector = std::shared_ptr<std::vector<std::weak_ptr<const citygml::CityModel>>>;
10-
1110
// グループIDとグリッドIDのペアをキーとし、その結合後Meshのmapです。
1211
// キー: std::pair<group_id, grid_id>
1312
using GridMergeResult = std::map<std::pair<unsigned, unsigned>, std::unique_ptr<Mesh>>;

0 commit comments

Comments
 (0)