Exemplo n.º 1
0
        public bool Intersects(Sphere3 boundingSphere)
        {
            Vec3 clampedLocation;

            if (boundingSphere.center.x > max.x)
            {
                clampedLocation.x = max.x;
            }
            else if (boundingSphere.center.x < min.x)
            {
                clampedLocation.x = min.x;
            }
            else
            {
                clampedLocation.x = boundingSphere.center.x;
            }

            if (boundingSphere.center.y > max.y)
            {
                clampedLocation.y = max.y;
            }
            else if (boundingSphere.center.y < min.y)
            {
                clampedLocation.y = min.y;
            }
            else
            {
                clampedLocation.y = boundingSphere.center.y;
            }

            if (boundingSphere.center.z > max.z)
            {
                clampedLocation.z = max.z;
            }
            else if (boundingSphere.center.z < min.z)
            {
                clampedLocation.z = min.z;
            }
            else
            {
                clampedLocation.z = boundingSphere.center.z;
            }

            return(clampedLocation.DistanceSquared(boundingSphere.center) <= (boundingSphere.radius * boundingSphere.radius));
        }
Exemplo n.º 2
0
 public static void Intersects(ref Frustum3 boundingFrustum, ref Sphere3 boundingSphere, out bool result)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 3
0
 public static void Contains(ref Frustum3 boundingFrustum, ref Sphere3 boundingSphere, out ContainmentTypes result)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 4
0
 public bool Intersects(Sphere3 boundingSphere)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 5
0
 public ContainmentTypes Contains(Sphere3 boundingSphere)
 {
     throw new NotImplementedException();
 }