Class SpatialQuadtree<T extends SpatialQuadtree.SpatialObject2D>
java.lang.Object
org.episteme.core.mathematics.structures.SpatialQuadtree<T>
- Type Parameters:
T- The type of objects stored in the quadtree, must implement SpatialObject2D.
Generic Spatial Quadtree structure for high-performance 2D spatial partitioning.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a node in the Spatial Quadtree.static interfaceInterface for objects that can be stored in a SpatialQuadtree. -
Constructor Summary
ConstructorsConstructorDescriptionSpatialQuadtree(Real centerX, Real centerY, Real size) Creates a new Spatial Quadtree with given bounds. -
Method Summary
Modifier and TypeMethodDescriptionvoidRecursively computes the center of mass for all nodes.getRoot()Returns the root node of the quadtree.voidInserts an object into the quadtree.
-
Constructor Details
-
SpatialQuadtree
-
-
Method Details
-
insert
Inserts an object into the quadtree.- Parameters:
object- The object to insert
-
computeCenterOfMass
public void computeCenterOfMass()Recursively computes the center of mass for all nodes. -
getRoot
Returns the root node of the quadtree.- Returns:
- The root node
-