WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   transform deprecation problem (https://forum.worldviz.com/showthread.php?t=1274)

cade_mccall 11-15-2007 07:53 PM

transform deprecation problem
 
I have a module that works in Vizard 2.5 but doesn't work in Vizard 3.0.

Originally, the module used .mult and .fullMult. Because 3.0 doesn't have .mult, I changed that to .postMult (I was guessing there). The script still works in 2.5 when I do that so it seems like it's the right substitute, but it still doesn't work properly in 3.0.

Also, when I try running it in 3.0, I get a deprecation warning about fullMult, but even when I replace fullMult with postMult (the suggested substitute), the program still fails to work. Any ideas?

Let me know if you want me to send the files.

Thanks,
Cade

farshizzo 11-16-2007 10:38 AM

Can you post a simple example that produces different results between 2.5 and 3.0?

cade_mccall 11-16-2007 12:07 PM

The code below prints out different values in the different versions. It also prints out different values if I use postMult instead of fullMult.

import vizmat
t = viz.Transform()
t.set( 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)
f = viz.Transform()
f.set(.5, 0.0, 0.0, 0.0,0.0,.8, 0.0,0.0,0.0,0.0,.5,1.0,0.0,0.0,-.5, 0.0 )
t.fullMult( f )

print t.getRot()
print t.getTrans()
print f.getRot()
print f.getTrans()

farshizzo 11-16-2007 12:53 PM

Do you have a more practical example that uses reasonable values for the matrix. Performing multiplications with actual rotation matrices seems to work for me.

cade_mccall 11-16-2007 01:07 PM

import vizmat

t = viz.Transform()
t.makeEuler(90,0,0)
print t.getRot()

farshizzo 11-16-2007 01:49 PM

Thanks, that gives different results for me too. The results from 2.5 are incorrect. A lot of the code for the vizmat library was rewritten in 3.0 and many bugs were fixed. If you are noticing different behavior, it is most likely caused by bugs in 2.5. If your old code was depending on the incorrect behavior then there is not much you can do other than fix it for 3.0

cade_mccall 11-16-2007 02:49 PM

Ahhh. Okay. My module works with the old Vizard because the author of the module hacked fixes for at least one bug. I know he switched the sign of the z-coordinate when using setTrans. When I undo that tweak things look better. I'm still having a problem with rotations, though. From his notes, I think he may have tweaked stuff to fix the fact that setEuler() used to apply roll then pitch then yaw. Does setEuler work differently now (does it apply yaw then pitch then roll)? Or are there other major fixes regarding rotations?

farshizzo 11-16-2007 02:59 PM

The order of eulers with vizmat should be consistent that the euler order of node objects, which is yaw, pitch, then roll. If you tell me more precisely what the code is trying to do I can provide more help.


All times are GMT -7. The time now is 11:52 PM.

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