Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ Intersects() [8/9]

void Microsoft.Xna.Framework.BoundingFrustum.Intersects ( ref Plane plane,
out PlaneIntersectionType result )
inline

Definition at line 301 of file BoundingFrustum.cs.

302 {
303 int num = 0;
304 for (int i = 0; i < 8; i++)
305 {
306 Vector3.Dot(ref cornerArray[i], ref plane.Normal, out var result2);
307 num = ((!(result2 + plane.D > 0f)) ? (num | 2) : (num | 1));
308 if (num == 3)
309 {
310 result = PlaneIntersectionType.Intersecting;
311 return;
312 }
313 }
314 result = ((num != 1) ? PlaneIntersectionType.Back : PlaneIntersectionType.Front);
315 }

References Microsoft.Xna.Framework.BoundingFrustum.cornerArray, and Microsoft.Xna.Framework.Vector3.Dot().