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

◆ Intersects() [4/9]

PlaneIntersectionType Microsoft.Xna.Framework.BoundingFrustum.Intersects ( Plane plane)
inline

Definition at line 282 of file BoundingFrustum.cs.

283 {
284 int num = 0;
285 for (int i = 0; i < 8; i++)
286 {
287 Vector3.Dot(ref cornerArray[i], ref plane.Normal, out var result);
288 num = ((!(result + plane.D > 0f)) ? (num | 2) : (num | 1));
289 if (num == 3)
290 {
291 return PlaneIntersectionType.Intersecting;
292 }
293 }
294 if (num != 1)
295 {
296 return PlaneIntersectionType.Back;
297 }
298 return PlaneIntersectionType.Front;
299 }

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