That was quick .. Thanks Paul !

Nick

http://www.linkedin.com/in/tnick
Sent from Devlet, Ankara, Turkey

On Sat, Jan 23, 2010 at 8:10 PM, Paul Martz <[email protected]> wrote:

> Trajce Nikolov wrote:
>
>> Hi,
>>
>> does anyone knows what this matrix should look like ?
>>
>
> In row major form, the general orientation matrix is:
>
> Xx  Xy  Xz  0
> Yx  Yy  Yz  0
> Zx  Zy  Zz  0
> 0   0   0   1
>
> ...where X is the new x axis, Y the new y axis, and Z the new z axis.
>
> Matrices don't really know the meaning of the word "up"; that's a
> subjective term we use. So when you ask for a matrix that converts y up to z
> up, you're really asking for a matrix that replaces the y axis with the z
> axis. Here's one matrix that does that:
>
> 1  0  0  0
> 0  0  1  0
> 0  1  0  0
> 0  0  0  1
>
> There are other ways to make a "y up to z up" matrix, that's just one way.
> The way you actually choose to compose this matrix will depend on what you
> want for the x and z axes in the new coordinate system. In the matrix above,
> I just swapped y and z, and left x unchanged.
>
> An alternative would be to negate the new z axis:
>
> 1  0  0  0
> 0  0  1  0
> 0 -1  0  0
> 0  0  0  1
>
>   -Paul
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to