Not really following what you are after, but one point:

2009/12/31 Ümit Uzun <[email protected]>

> Hi Paul,
>
> Thanks for your reply. I need only one explanation about that;
>
> //////////////////////////////////////////////// psudo code
> Matrix matrix1= identity;
> matrix1->rotate( 10 degree on LOCAL X axis )
> matrix1->rotate( 10 degree on LOCAL Y axis )
> matrix1->rotate( -10 degree on LOCAL X axis )
> matrix1->rotate( -10 degree on LOCAL Y axis )
>
> matrix1 is NOT IDENTITY at last.
> /////////////////////////////////////////////////
>

No it won't be the identity, you've got the undo in the wrong order.

Matrix matrix1= identity;

// rotate
matrix1->rotate( 10 degree on LOCAL X axis )
matrix1->rotate( 10 degree on LOCAL Y axis )

// un-rotate
matrix1->rotate( -10 degree on LOCAL Y axis )
matrix1->rotate( -10 degree on LOCAL X axis )

ASSERT(matrix1 == identity);

If you want undo, just use matrix invert, which
will work unless you've got a scale by 0 in the transform.

-- 
http://www.ssTk.co.uk
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to