diff --git a/math/spvo.py b/math/spvo.py index 5b27c72..5316975 100644 --- a/math/spvo.py +++ b/math/spvo.py @@ -12,18 +12,18 @@ Thanks to this "compression", there are no zero values on places where there is class Node: - def __init__(self): + def __init__(self, data=None): self.children = [None] * 8 self.leaf = True + self.data = data + class SparseVoxelOctree: - def __init__(self, data=None): + def __init__(self): self.root_node = Node() self.origin = (0, 0, 0) - self.data = data - def _get_child_index(self, x, y, z, size): index = 0