Hi All,
there have been no replies to this thread,
but I have found exactly the same problem here.
In particular it appears only when scale components "x" and "y" are
equivalent, and (on our boxes, running WinXP) only in release compiled
code - the debug version works correctly!!
I don't know the theory of how to apply the scale orientation in the
correct way either, but heuristically I've found that, if you build a
rotation matrix from the quaternion, and you ignore its signs, you can
find the original scale vector by multiplying:
// scaleOrientMat.set(scaleOrientQuat)
origScaleVec = decompScaleVec * ABS( scaleOrientMatrix)
Is this something expected or there's a bug somewhere?
Thanks,
Ricky
On 01/02/2009 20.26, Östen wrote:
I have a problem with the decompose method of osg::Matrix in
combination with non-uniform scaling. I create a matrix with
osg::matrix::scale(100, 100, 1) and even though the matrix seems
correct (100, 0, 0, 0, 0, 100, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) the
decompose method returns a scale = (100, 1, 100) and a scale
orientation of (0.707, 0, 0, 0.707). I have tried to apply the scale
orientation transform to the scale but there is no way i can get it
back to (100, 100, 1).
Also if one component of the scale is negative decompose will return
negative values for all components.
How is this supposed to work? Is it a bug or am I making some
incorrect assumtions here?
Östen Lundahl
------------------------------------------------------------------------
_______________________________________________
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