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

◆ Intersects() [5/5]

void Microsoft.Xna.Framework.Plane.Intersects ( ref BoundingSphere sphere,
out PlaneIntersectionType result )
inline

Definition at line 339 of file Plane.cs.

340 {
341 float num = sphere.Center.X * Normal.X + sphere.Center.Y * Normal.Y + sphere.Center.Z * Normal.Z;
342 float num2 = num + D;
343 if (num2 > sphere.Radius)
344 {
345 result = PlaneIntersectionType.Front;
346 }
347 else if (num2 < 0f - sphere.Radius)
348 {
349 result = PlaneIntersectionType.Back;
350 }
351 else
352 {
353 result = PlaneIntersectionType.Intersecting;
354 }
355 }

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