From ec8ba98b56d13d231fd5de80539fe44915895653 Mon Sep 17 00:00:00 2001 From: EKNr1 Date: Thu, 29 Aug 2024 15:27:02 +0200 Subject: [PATCH] Moved some code to the right place. --- math/spvo.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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