While looking at the implementation of BoundingFrustum, I have found this method:
public void GetCorners(Vector3[] corners)
{
corners = this.corners;
}
In its current form, this method will never return the corners of the frustum. The statement corners=this.corners is only replacing the value of parameter corners INSIDE this method, as it is passed by value to the function. For this to work, it should be:
public void GetCorners(ref Vector3[] corners)
{
corners = this.corners;
}
-or-
public void GetCorners(Vector3[] corners)
{
if( corners.Length < BoundingFrustum.CornerCount )
throw new InvalidOperationExceptio();
for(int i=0; i<BoundingFrustum.CornerCount; i++)
corners[i] = this.corners[i];
}