pike.git / lib / modules / GLU.pmod

version» Context lines:

pike.git/lib/modules/GLU.pmod:1:   /* -  * $Id: GLU.pmod,v 1.9 2001/11/19 16:21:12 nilsson Exp $ +  * $Id: GLU.pmod,v 1.10 2002/02/13 02:59:53 nilsson Exp $    *    * GL Utilities module.    */      #pike __REAL_VERSION__      #if constant(GL.glGet)   import GL;   import Math;   
pike.git/lib/modules/GLU.pmod:97:   #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 );   }    - //! @fixme - //! Document this function. +    static 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   }