SAPBroadphase constructor

SAPBroadphase(
  1. World? world
)

Implementation

SAPBroadphase(World? world):super() {
  this.world = world;

  _addBodyHandler = (dynamic event){
    axisList.add(event.target.bodies.last);
  };

  _removeBodyHandler = (dynamic event){
    final idx = axisList.indexOf(event.target.bodies.last);
    if (idx != -1) {
      axisList.removeAt(idx);
    }
  };

  if (world != null) {
    setWorld(world);
  }
}