Skip to content

Commit c25e389

Browse files
committed
OBJ vertex counter
1 parent 0a3b635 commit c25e389

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

storage.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ void regular_voxel_storage::obj_export(obj_export_helper& obj, bool with_compone
142142
if (side) {
143143
v[normal] += 1;
144144
}
145-
auto inserted = vertex_map.insert({ v, vertex_map.size() + 1 });
145+
auto inserted = vertex_map.insert({ v, vertex_map.size() + nv });
146146
if (inserted.second) {
147147
fs << "v";
148148
for (int i = 0; i < 3; ++i) {
@@ -197,6 +197,8 @@ void regular_voxel_storage::obj_export(obj_export_helper& obj, bool with_compone
197197
fs << "\n";
198198
}
199199
}
200+
201+
nv += vertex_map.size();
200202
}
201203

202204
regular_voxel_storage* storage_for(std::array< vec_n<3, double>, 2 >& bounds, size_t max_extents, size_t padding, size_t chunk_size) {

0 commit comments

Comments
 (0)