CNA-BUG-071: BoundingFrustum::Intersects(Plane) counts a corner lying on the plane as Intersecting, where XNA 4.0 answers Back

CNA snapshot 3b43bd86  ·  Known Issues › Current bugs  ·  source links pinned to 3b43bd86

✓

Evidence basis: source-verified at the pinned commit; tests exist (not executed for this page). Claims on this page were checked by reading the CNA source at commit 3b43bd86; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.

The Plane overload treats a corner at zero distance as Intersecting, so a frustum touching a plane from behind is Intersecting where XNA (distance > 0 is Front, everything else Back) answers Back. The box and sphere overloads now match XNA.

Identifier
CNA-BUG-071
Category
Bug
Subsystem
Math & geometry
Status
Narrowed (partially fixed; describes only what survives)
Verified against
CNA 3b43bd86 (3b43bd8687ed46523d873f9bec4b32bd8481dcb5)
Severity
Low (a triage suggestion, not a project priority)
Evidence basis
Source-verified: read at TARGET, not executed
Tests touching this area
Yes: see Current tests
Affected contract
Microsoft::Xna::Framework::BoundingFrustum::Intersects(Plane) and its out-parameter overload

Expected behaviour

XNA 4.0 (IL): BoundingFrustum.Intersects(ref Plane) classifies each corner with dot + D > 0 as Front and everything else (including exactly 0) as Back.

Actual behaviour at TARGET

BoundingFrustum.cpp implements the Plane overload with Plane::IntersectsPoint for every corner, which returns Intersecting for a zero distance (Plane.cpp), and reports Intersecting as soon as two corners differ. A frustum with some corners behind a plane and the others exactly on it is therefore Intersecting in CNA and Back in XNA.

Source locations

Evidence

Checked by reading the named sources at 3b43bd86; nothing was built or executed for this entry. XNA behaviour from the genuine XNA 4.0 IL (the Plane overload's comparison).

Narrowed at c6dec91f: 5ab1c7729 replaced the conservative plane test of the box and sphere overloads with a convex-separation query: Intersects(const BoundingBox&, bool&) and Intersects(const BoundingSphere&, bool&) now call ConvexIntersects over the corners with a support function, pinned by FrustumSeparationOracleTest against CNA's recorded oracle of genuine XNA shape pairs (FrustumSeparationOracleTests.cpp) and by GeometryContainmentCompatibilityTest.FrustumIntersectionRequiresActualConvexSeparation. The Plane overload is unchanged.

Focused reproduction

No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.

Current tests

BoundingFrustumTests.cpp covers frustum-plane cases with clear separation, not a corner exactly on the plane.

Regression test

A frustum with one corner exactly on a plane and the others behind it, expecting Back.

Blast radius

Code that classifies a frustum against a plane and treats Intersecting and Back differently when the frustum only touches the plane.

Workaround

No workaround is known.

The same subject is explained at several altitudes. These are the neighbouring pages at each one.

Known issues
Bug index