// Checks if specified box intersects bounding box of this this voxel map. public bool IsBoxIntersectingBoundingBoxOfThisVoxelMap(ref BoundingBox boundingBox) { bool outRet; WorldAABB.Intersects(ref boundingBox, out outRet); return(outRet); }
// Return true if voxel map intersects specified sphere. // This method doesn't return exact point of intersection or any additional data. // We don't look for closest intersection - so we stop on first intersection found. public override bool GetIntersectionWithSphere(ref BoundingSphere sphere) { Profiler.Begin("MyVoxelMap.GetIntersectionWithSphere()"); try { if (!WorldAABB.Intersects(ref sphere)) { return(false); } return(Geometry.Intersects(ref sphere)); } finally { Profiler.End(); } }