imstkLocalMarchingCubes copying a lot of data
In mcSubImage
new data gets stored in a local std::list
then a new imstkVecData
structure gets created, the data from the lists copied into the imstkVecData
and then set in the mesh via initialize
.
What i'd expect to see would be us to be able to rebuild the mesh data throught the shared_ptr
handle the the mesh provides to its points and triangle structures, it seems that the current implementation works around issue #297 (closed). If we can just modify the meshes data structure (and fix #298 (closed)) the allocations would stop or at least occur at a different frequency.
The use of a local list means that every new point in every new iteration will incur an allocation, even a move to a member local intermediary std::vector
would allow that system to amortize these allocations over time and eventual once a maximum is reached not allocate per frame (at the cost of local storage in the