File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -480,11 +480,20 @@ namespace {
480480 auto seed = query_leftmost ()(storage_copy);
481481
482482 regular_voxel_storage* output = (regular_voxel_storage*)storage_copy->empty_copy ();
483+
484+ // largest possible type at the moment
485+ uint32_t val;
483486
484487 visitor<> v;
485- v ([output](const tagged_index& pos) {
488+ v ([output, storage_copy, &val ](const tagged_index& pos) {
486489 if (pos.which == tagged_index::VOXEL) {
487- output->Set (pos.pos );
490+ // @todo set value in case of non-bit
491+ if (output->value_bits () == 1 ) {
492+ output->Set (pos.pos );
493+ } else {
494+ storage_copy->Get (pos.pos , &val);
495+ output->Set (pos.pos , &val);
496+ }
488497 } else {
489498 ((abstract_chunked_voxel_storage*)output)->create_constant (pos.pos , 1U );
490499 }
@@ -497,6 +506,7 @@ namespace {
497506 // NB: deleted
498507 delete output;
499508 }
509+ // @todo shouldn't storage_copy get deleted?
500510 }
501511}
502512
You can’t perform that action at this time.
0 commit comments