209 map[0][0] = float( array[0] );
210 map[0][1] = float( array[1] );
212 map[1][0] = float( array[2] );
213 map[1][1] = float( array[3] );
215 map[2][0] = float( array[4] );
216 map[2][1] = float( array[5] );
236 double a=1,b=0,c=0,d=0,e=1,f=0,g=0,h=0,i=1,
237 j=map[0][0],k=map[1][0],l=map[2][0],
238 m=map[0][1],n=map[1][1],o=map[2][1],
239 p=map[0][2],q=map[1][2],r=map[2][2];
243 b=1; j = m; k += n; l+=o;
247 d = 1; e += b; m += j; n = k; o +=l;
251 a/=j; b/=j; c/=j; k/=j; l/=j; j=1;
255 d-=m*a; e-=m*b; f-=m*c; n-=m*k; o-=m*l; m=0;
259 g-=p*a; h-=p*b; i-=p*c; q-=p*k; r-=p*l; p=0;
263 d/=n; e/=n; f/=n; o/=n; n=1;
267 a-=k*d; b-=k*e; c-=k*f; l-=k*o; k=0;
271 g-=q*d; h-=q*e; i-=q*f; r-=q*o; q=0;
275 g/=r; h/=r; i/=r; r=1;
279 d-=o*g; e-=o*h; f-=o*i; o=0;
283 a-=l*g; b-=l*h; c-=l*i; l=0;
286 map[0][0] = float( a );
287 map[1][0] = float( b );
288 map[2][0] = float( c );
289 map[0][1] = float( d );
290 map[1][1] = float( e );
291 map[2][1] = float( f );
317 float co = cos( degreeAngle * M_PI / 180 ),
318 si = sin( degreeAngle * M_PI / 180 ),
319 rot[] = { co, -si, 0 , si, co, 0, x, y, 1 };
321 double angle = ( degreeAngle / 180.0 ) * M_PI;
322 float co = float( cos( angle ) ),
323 si = float( sin( angle ) );
324 if( co > -0.0001 && co < 0.0001 )
326 else if( co > 0.9999 )
328 else if( co < -0.9999 )
330 if( si > -0.0001 && si < 0.0001 )
332 else if( si > 0.9999 )
334 else if( si < -0.9999 )
336 float rot[] = { co, -si, 0 , si, co, 0, x, y, 1 };
388 nieuwe[0][0] = map[0][0] * in.map[0][0] + map[0][1] * in.map[1][0];
389 nieuwe[0][1] = map[0][0] * in.map[0][1] + map[0][1] * in.map[1][1];
390 nieuwe[0][2] = map[0][0] * in.map[0][2] + map[0][1] * in.map[1][2];
392 nieuwe[1][0] = map[1][0] * in.map[0][0] + map[1][1] * in.map[1][0];
393 nieuwe[1][1] = map[1][0] * in.map[0][1] + map[1][1] * in.map[1][1];
394 nieuwe[1][2] = map[1][0] * in.map[0][2] + map[1][1] * in.map[1][2];
396 nieuwe[2][0] = map[2][0] * in.map[0][0] + map[2][1] * in.map[1][0] + map[2][2] * in.map[2][0];
397 nieuwe[2][1] = map[2][0] * in.map[0][1] + map[2][1] * in.map[1][1] + map[2][2] * in.map[2][1];
400 ::memcpy( &map,&nieuwe, 9 *
sizeof(int32_t) );