Skip to content

Commit 1d6f2ef

Browse files
authored
PrimaryObjectのAtomicIDを0から-1に変更 (Synesthesias#180)
1 parent 7e5d473 commit 1d6f2ef

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

include/plateau/polygon_mesh/city_object_list.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ namespace plateau::polygonMesh {
5050
};
5151
}
5252

53-
CityObjectIndex nextPrimary() const {
53+
CityObjectIndex getPrimary() const {
5454
return {
5555
primary_index,
5656
invalidIndex()

src/polygon_mesh/mesh_factory.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,9 @@ namespace plateau::polygonMesh {
224224

225225
const auto& gml_id = city_object.getId();
226226

227-
mesh_->addUV4WithSameVal(available_primary_index_.toUV(), vertex_count);
228-
mesh_->city_object_list_.add(available_primary_index_, gml_id);
227+
const auto primary_index = available_primary_index_.getPrimary();
228+
mesh_->addUV4WithSameVal(primary_index.toUV(), vertex_count);
229+
mesh_->city_object_list_.add(primary_index, gml_id);
229230
++available_primary_index_.primary_index;
230231
}
231232

0 commit comments

Comments
 (0)