Thanks for your great work. I'm using your VoxelGrid to replace my own grid so that performance can be improved. However, I got a problem. Here's my pseudo code:
/ pesudor code
auto ptr = accessor.value(coord);
if(ptr){
DoSomething();
}
else{
accessor.setValue(coord, new_value);
}
/
If ptr is nullptr(coord has not been setValue before), error happens!
"prev_leafptr = getLeafGrid(coord, false)" in value() makes prev_leafptr nullptr,
then "prev_leafptr->mask.setOn(index)" in setValue() caused segmentfault.
Is there anything I'm missing?
Thank you.
Thanks for your great work. I'm using your VoxelGrid to replace my own grid so that performance can be improved. However, I got a problem. Here's my pseudo code: / pesudor code auto ptr = accessor.value(coord); if(ptr){ DoSomething(); } else{ accessor.setValue(coord, new_value); } / If ptr is nullptr(coord has not been setValue before), error happens! "prev_leafptr = getLeafGrid(coord, false)" in value() makes prev_leafptr nullptr, then "prev_leafptr->mask.setOn(index)" in setValue() caused segmentfault. Is there anything I'm missing? Thank you.