Class SpatialOctree<T extends SpatialOctree.SpatialObject>

java.lang.Object
org.episteme.core.mathematics.structures.SpatialOctree<T>
Type Parameters:
T - The type of objects stored in the octree, must implement SpatialObject.

public class SpatialOctree<T extends SpatialOctree.SpatialObject> extends Object
Generic Spatial Octree structure for high-performance spatial partitioning.
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • SpatialOctree

      public SpatialOctree(Real centerX, Real centerY, Real centerZ, Real size)
      Creates a new Spatial Octree with given bounds.
      Parameters:
      centerX - Center X coordinate
      centerY - Center Y coordinate
      centerZ - Center Z coordinate
      size - Size of the cube (edge length)
  • Method Details

    • insert

      public void insert(T object)
      Inserts an object into the octree.
      Parameters:
      object - The object to insert
    • computeCenterOfMass

      public void computeCenterOfMass()
      Recursively computes the center of mass for all nodes.
    • getRoot

      public SpatialOctree.Node<T> getRoot()
      Returns the root node of the octree.
      Returns:
      The root node