Skip to content

Commit a7ef23e

Browse files
perf: another improvement in meshing speed
1 parent 1c8bc46 commit a7ef23e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

zi_lib/zi/mesh/marching_cubes.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ class marching_cubes
288288
std::size_t const sy, std::size_t const sz,
289289
Tag const& order_tag)
290290
{
291+
meshes_.reserve(sx * sy);
292+
291293
constexpr std::array<PositionType, 8> cube_corners = {
292294
pack_coords(0, 0, 0), pack_coords(2, 0, 0), pack_coords(2, 0, 2),
293295
pack_coords(0, 0, 2), pack_coords(0, 2, 0), pack_coords(2, 2, 0),

0 commit comments

Comments
 (0)