public intersection ( Bounds2D, other ) : Bounds2D, | ||
other | Bounds2D, | |
return | Bounds2D, |
private void getBits() { //Intersection of the two bounds in global space. Bounds2D intersection = boundsA.intersection(boundsB); //Intersections in local space. Bounds2D intersectionA = boundsA.toLocal(intersection); Bounds2D intersectionB = boundsB.toLocal(intersection); bitsA = getBitArray(intersectionA, a.collisionMask); bitsB = getBitArray(intersectionB, b.collisionMask); }