public AABB3D Union(AABB3D other) { return(new AABB3D { LowerBound = math.min(other.LowerBound, LowerBound), UpperBound = math.max(other.UpperBound, UpperBound) }); }
public float4 Lz, Hz; // Lower and upper bounds along the Z axis. public void SetAabb(int index, AABB3D aabb) { Lx[index] = aabb.LowerBound.x; Hx[index] = aabb.UpperBound.x; Ly[index] = aabb.LowerBound.y; Hy[index] = aabb.UpperBound.y; Lz[index] = aabb.LowerBound.z; Hz[index] = aabb.UpperBound.z; }
public static bool DoesOverlap(ref AABB3D box, ref NativeBVHTree.Ray ray, float3 invD) { return(IntersectTest(box.LowerBound, box.UpperBound, ray.origin, ray.minDistance, ray.maxDistance, invD, out _)); }