Local project added

This commit is contained in:
2025-10-19 22:56:25 +02:00
parent 7c15a8b78d
commit 8124165e9b
96 changed files with 17552 additions and 0 deletions

View File

@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
public class OctreeNode
{
public Bounds bounds; // The 3D space covered by this node
public bool isLeaf; // True if this node is not subdivided
public bool isOccupied; // True if this node contains solid voxels
public bool hasChildrenOccupied; // True if this node contains solid voxels
public OctreeNode[] children; // 8 sub-nodes (for each octant)
public float penetrationFactor;
public float reflexionFactor;
public OctreeNode(Bounds bounds)
{
penetrationFactor = 1;
reflexionFactor = 1;
this.bounds = bounds;
isLeaf = true;
isOccupied = false;
hasChildrenOccupied = false;
children = new OctreeNode[8];
children[0] = null;
children[1] = null;
children[2] = null;
children[3] = null;
children[4] = null;
children[5] = null;
children[6] = null;
children[7] = null;
}
}