Open ErykHalicki opened 5 months ago
I ran into the same issue as you. Also curious, is there a reason why move constructors are not provided? I notice that some of the properties of VoxelGrid
are const
. I've got a PR (#31) that gives a potential implementation.
TLDR: Is there a way to use a move assignment operator with VoxelGrid?
Hey there!
First of all I'd like to say this project is incredible, it has spend up the 3d mapping systems of the robotics project I'm working on significantly.
Also I'm kind of new to c++ so please bear with me.
I wasn't able to find a visualisation tool for the project, so I threw together a janky one using openGL, and I ran into a minor issue/question while I was making it. Here's the github repo.
After making the initial visualiser, I wanted to see my serialized file update real time, so I tried adding a function that would deserialise the map file on a regular interval and assign the new deserialized map to the visualizer "global" map so that it could be drawn.
The issue I ran into was with the assignment/move operation.
When I tried compiling this:
I would get the following error message:
So I just removed the const modifier from the listed variables and now its working fine.
So I was mainly wondering if there was a better way to move data from my deserialized grid to my global grid.
Also, is it a bad idea to remove the const modifier like I did? Is there a reason there is no move assignment operator defined for VoxelGrid?
Thanks in advance!!