WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   <transform>.getRot() not working (https://forum.worldviz.com/showthread.php?t=95)

david 12-03-2003 04:23 PM

<transform>.getRot() not working
 
Hi,
I noticed the function getRot() is not consistent.

I got the following lines in the interactive window:
>>> import vizmat
>>> X = vizmat.Transform()
>>> X.makeRot(0,1,0,180)
>>> X.getRot()
[0.0, -1.0, 0.0, 180.00000500895632]
>>> X.makeRot(0,1,0,90)
>>> X.getRot()
[-0.70710670948028564, 0.0, 0.7071068286895752, 180.00000500895632]

Could someone help out here?

David

farshizzo 12-04-2003 10:35 AM

Hi David,

The makeRot function sets the 4x4 matrix to represent the given axis angle rotation. Since there are many ways to represent a rotation the rotation returned might not always be exactly the same as the one given. [0,1,0,180] is the same as [0,-1,0,180], even though they don't look the same.

However your second example isn't correct and I believe we have fixed that problem. If you like, i can send you a patch for it, otherwise you'll have to wait for the next release.


All times are GMT -7. The time now is 02:17 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC