pike.git / lib / modules / GLU.pmod

version» Context lines:

pike.git/lib/modules/GLU.pmod:1:   /* -  * $Id: GLU.pmod,v 1.15 2008/04/04 19:11:11 grubba Exp $ +  * $Id: GLU.pmod,v 1.16 2008/06/28 16:36:53 nilsson Exp $    *    * GL Utilities module.    */      #pike __REAL_VERSION__      //! The GL Utilities module is a partial implementation of the   //! GLU library. This module only contains functions that someone   //! at some point actually needed to get his work done. If you   //! need a GLU function that isn't in here, copy the C code from
pike.git/lib/modules/GLU.pmod:172:   #define M(row,col) m[col*4+row]    M(0,0) = sx; M(0,1) = 0.0; M(0,2) = 0.0; M(0,3) = tx;    M(1,0) = 0.0; M(1,1) = sy; M(1,2) = 0.0; M(1,3) = ty;    M(2,0) = 0.0; M(2,1) = 0.0; M(2,2) = 1.0; M(2,3) = 0.0;    M(3,0) = 0.0; M(3,1) = 0.0; M(3,2) = 0.0; M(3,3) = 1.0;   #undef M       glMultMatrix( m );   }    - static void transform_point(array(float) out, array(float)m, + protected void transform_point(array(float) out, array(float)m,    array(float) in)   {   #define M(row,col) m[col*4+row]    out[0] = M(0,0) * in[0] + M(0,1) * in[1] + M(0,2) * in[2] + M(0,3) * in[3];    out[1] = M(1,0) * in[0] + M(1,1) * in[1] + M(1,2) * in[2] + M(1,3) * in[3];    out[2] = M(2,0) * in[0] + M(2,1) * in[1] + M(2,2) * in[2] + M(2,3) * in[3];    out[3] = M(3,0) * in[0] + M(3,1) * in[1] + M(3,2) * in[2] + M(3,3) * in[3];   #undef M   }   
pike.git/lib/modules/GLU.pmod:235:      // transform_point(out,m,in);   // if (out[3]==0.0)   // return GL_FALSE;   // return ({ out[0]/out[3], out[1]/out[3], out[2]/out[3] });   // }      #else /* constant(GL) */   constant this_program_does_not_exist=1;   #endif +