| 1728 | // Left, Right, Bottom, and Top specify the coordinates of their respective clipping planes. |
| 1729 | // Near and Far specify the distances to the near and far clipping planes. |
| 1730 | static inline HMM_Mat4 HMM_Orthographic_RH_ZO(float Left, float Right, float Bottom, float Top, float Near, float Far) |
| 1731 | { |
| 1732 | ASSERT_COVERED(HMM_Orthographic_RH_ZO); |
| 1733 | |
| 1734 | HMM_Mat4 Result = {0}; |
| 1735 | |
| 1736 | Result.Elements[0][0] = 2.0f / (Right - Left); |
| 1737 | Result.Elements[1][1] = 2.0f / (Top - Bottom); |
| 1738 | Result.Elements[2][2] = 1.0f / (Near - Far); |
| 1739 | Result.Elements[3][3] = 1.0f; |
| 1740 | |
| 1741 | Result.Elements[3][0] = (Left + Right) / (Left - Right); |
| 1742 | Result.Elements[3][1] = (Bottom + Top) / (Bottom - Top); |
| 1743 | Result.Elements[3][2] = (Near) / (Near - Far); |
| 1744 | |
| 1745 | return Result; |
| 1746 | } |
| 1747 | |
| 1748 | COVERAGE(HMM_Orthographic_LH_NO, 1) |
| 1749 | // Produces a left-handed orthographic projection matrix with Z ranging from -1 to 1 (the GL convention). |
no outgoing calls
no test coverage detected