32 #include <OgreMatrix4.h> 37 void buildScaledOrthoMatrix(Ogre::Matrix4& proj,
float left,
float right,
float bottom,
float top,
float near,
float far)
39 float invw = 1 / (right - left);
40 float invh = 1 / (top - bottom);
41 float invd = 1 / (far - near);
43 proj = Ogre::Matrix4::ZERO;
44 proj[0][0] = 2 * invw;
45 proj[0][3] = -(right + left) * invw;
46 proj[1][1] = 2 * invh;
47 proj[1][3] = -(top + bottom) * invh;
48 proj[2][2] = -2 * invd;
49 proj[2][3] = -(far + near) * invd;
void buildScaledOrthoMatrix(Ogre::Matrix4 &proj, float left, float right, float bottom, float top, float near, float far)