Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Intersects() [3/5]

PlaneIntersectionType Microsoft.Xna.Framework.Plane.Intersects ( BoundingSphere sphere)
inline

Definition at line 324 of file Plane.cs.

325 {
326 float num = sphere.Center.X * Normal.X + sphere.Center.Y * Normal.Y + sphere.Center.Z * Normal.Z;
327 float num2 = num + D;
328 if (num2 > sphere.Radius)
329 {
330 return PlaneIntersectionType.Front;
331 }
332 if (num2 < 0f - sphere.Radius)
333 {
334 return PlaneIntersectionType.Back;
335 }
336 return PlaneIntersectionType.Intersecting;
337 }

References Microsoft.Xna.Framework.Plane.D, Microsoft.Xna.Framework.Plane.Normal, Microsoft.Xna.Framework.BoundingSphere.Radius, and Microsoft.Xna.Framework.Vector3.Z.