GridBroadphase constructor

GridBroadphase([
  1. Vec3? aabbMin,
  2. Vec3? aabbMax,
  3. int nx = 10,
  4. int ny = 10,
  5. int nz = 10,
])

nx Number of boxes along x. ny Number of boxes along y. nz Number of boxes along z.

Implementation

GridBroadphase([
  Vec3? aabbMin,// = Vec3(100, 100, 100),
  Vec3? aabbMax,// = Vec3(-100, -100, -100),
  this.nx = 10,
  this.ny = 10,
  this.nz = 10
]):super(){
  this.aabbMin = aabbMin ?? Vec3(100, 100, 100);
  this.aabbMax = aabbMax ?? Vec3(-100, -100, -100);
  final nbins = nx * ny * nz;
  if (nbins <= 0) {
    throw"GridBroadphase: Each dimension's n must be >0";
  }
  bins = List.filled(nbins, []);
  binLengths = List.filled(nbins, 0);
}