R_SetFrustum
()
| 613 | * R_SetFrustum |
| 614 | */ |
| 615 | void R_SetFrustum() { |
| 616 | // rotate VPN right by FOV_X/2 degrees |
| 617 | Math3D.RotatePointAroundVector(frustum[0].normal, vup, vpn, - (90f - r_newrefdef.fov_x / 2f)); |
| 618 | // rotate VPN left by FOV_X/2 degrees |
| 619 | Math3D.RotatePointAroundVector(frustum[1].normal, vup, vpn, 90f - r_newrefdef.fov_x / 2f); |
| 620 | // rotate VPN up by FOV_X/2 degrees |
| 621 | Math3D.RotatePointAroundVector(frustum[2].normal, vright, vpn, 90f - r_newrefdef.fov_y / 2f); |
| 622 | // rotate VPN down by FOV_X/2 degrees |
| 623 | Math3D.RotatePointAroundVector(frustum[3].normal, vright, vpn, - (90f - r_newrefdef.fov_y / 2f)); |
| 624 | |
| 625 | for (int i = 0; i < 4; i++) { |
| 626 | frustum[i].type = Defines.PLANE_ANYZ; |
| 627 | frustum[i].dist = Math3D.DotProduct(r_origin, frustum[i].normal); |
| 628 | frustum[i].signbits = (byte) SignbitsForPlane(frustum[i]); |
| 629 | } |
| 630 | } |
| 631 | |
| 632 | // ======================================================================= |
| 633 |
no test coverage detected