- void createPerspective(float fovy, float aspect, float zNear, float zFar)
- {
- float f = (float)(1 / tan(fovy*DEG_TO_RAD/2));
- this[0]= f/aspect; this[4]= 0; this[ 8]= 0; this[12]= 0;
- this[1]= 0; this[5]= f; this[ 9]= 0; this[13]= 0;
- this[2]= 0; this[6]= 0; this[10]=(zFar+zNear)/(zNear-zFar) ; this[14]= 2*(zFar*zNear)/(zNear-zFar);
- this[3]= 0; this[7]=0; this[11]=-1; this[15]= 0;
- }