first implementation, clamp seems to be off?

This commit is contained in:
zomseffen 2025-03-06 18:11:44 +01:00
parent 7a58ba9733
commit b581364f5a
8 changed files with 157 additions and 132 deletions
src/scene

View file

@ -83,7 +83,7 @@ impl Scene {
for oct_tree in oct_tree_line_y {
let mut new_volumes: Vec<Rc<RefCell<EmptyVolume>>>;
let new_neighbors;
(new_volumes, new_neighbors) = EmptyVolume::from_oct_tree(oct_tree, Vector3 { x: x_index, y: y_index, z: z_index });
(new_volumes, new_neighbors) = EmptyVolume::from_oct_tree(oct_tree, Vector3 { x: (x_index * CHUNK_SIZE) as f32 * oct_tree.borrow().scale, y: (y_index * CHUNK_SIZE) as f32 * oct_tree.borrow().scale, z: (z_index * CHUNK_SIZE) as f32 * oct_tree.borrow().scale });
empty_volumes.append(&mut new_volumes);
neighbor_trees[z_index][y_index].push(Rc::new(new_neighbors));