Class QuadTreeCollisionDetectionBroadPhase

java.lang.Object
technology.sola.engine.physics.system.collision.QuadTreeCollisionDetectionBroadPhase
All Implemented Interfaces:
CollisionDetectionBroadPhase

@NullMarked public class QuadTreeCollisionDetectionBroadPhase extends Object implements CollisionDetectionBroadPhase
QuadTreeCollisionDetectionBroadPhase is a CollisionDetectionBroadPhase implementation using a QuadTreeNode internally.
  • Constructor Details

    • QuadTreeCollisionDetectionBroadPhase

      public QuadTreeCollisionDetectionBroadPhase()
      Creates an instance with bounds being auto calculated based on entries in the world, maxDepth set to 5, and maxEntitiesPerNode set to 8.
    • QuadTreeCollisionDetectionBroadPhase

      public QuadTreeCollisionDetectionBroadPhase(@Nullable Rectangle screenBounds)
      Creates an instance with desired fixed bounds, maxDepth set to 5, and maxEntitiesPerNode set to 8.
      Parameters:
      screenBounds - the bounds of the quad tree
    • QuadTreeCollisionDetectionBroadPhase

      public QuadTreeCollisionDetectionBroadPhase(@Nullable Rectangle screenBounds, int maxDepth, int maxEntitiesPerNode)
      Creates an instance with desired fixed bounds, maxDepth, and maxEntitiesPerNode.
      Parameters:
      screenBounds - the bounds of the quad tree
      maxDepth - the maximum depth of the quad tree
      maxEntitiesPerNode - the max number of entities per node
  • Method Details