GridBroadphase constructor
GridBroadphase(
[ - Vec3? aabbMin,
- Vec3? aabbMax,
- int nx = 10,
- int ny = 10,
- 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);
}