glut/progs/examples/mjksift.c
/* Construct an identity matrix except that the third coordinate
   can be used to "sift" the X and Y coordinates. */
Construct an identity matrix except that the third coordinate
can be used to "sift" the X and Y coordinates.
Construct an identity matrix except that the third coordinate can be used to " sift " the X and Y coordinates .
void
makeSift(GLfloat m[16], float xsift, float ysift)
{
  m[0 + 4 * 0] = 1;
  m[0 + 4 * 1] = 0;
  m[0 + 4 * 2] = xsift;
  m[0 + 4 * 3] = 0;
  m[1 + 4 * 0] = 0;
  m[1 + 4 * 1] = 1;
  m[1 + 4 * 2] = ysift;
  m[1 + 4 * 3] = 0;
  m[2 + 4 * 0] = 0;
  m[2 + 4 * 1] = 0;
  m[2 + 4 * 2] = 1;
  m[2 + 4 * 3] = 0;
  m[3 + 4 * 0] = 0;
  m[3 + 4 * 1] = 0;
  m[3 + 4 * 2] = 0;
  m[3 + 4 * 3] = 1;
}
void makeSift ( GLfloat m [ 16 ] , float xsift , float ysift ) { m [ 0 + 4 * 0 ] = 1 ; m [ 0 + 4 * 1 ] = 0 ; m [ 0 + 4 * 2 ] = xsift ; m [ 0 + 4 * 3 ] = 0 ; m [ 1 + 4 * 0 ] = 0 ; m [ 1 + 4 * 1 ] = 1 ; m [ 1 + 4 * 2 ] = ysift ; m [ 1 + 4 * 3 ] = 0 ; m [ 2 + 4 * 0 ] = 0 ; m [ 2 + 4 * 1 ] = 0 ; m [ 2 + 4 * 2 ] = 1 ; m [ 2 + 4 * 3 ] = 0 ; m [ 3 + 4 * 0 ] = 0 ; m [ 3 + 4 * 1 ] = 0 ; m [ 3 + 4 * 2 ] = 0 ; m [ 3 + 4 * 3 ] = 1 ; }
Construct an identity matrix except that the third coordinate
can be used to "sift" the X and Y coordinates.
Construct an identity matrix except that the third coordinate can be used to " sift " the X and Y coordinates .