WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   setEuler argument/documentation confusion (https://forum.worldviz.com/showthread.php?t=4126)

pcatalano 01-25-2012 01:00 PM

setEuler argument/documentation confusion
 
Hello,

The documentation for the setEuler function (and some other rotation/translation functions) is, at least to me, misleading with respect to its arguments.

The doc lists:
Code:

.setEuler( 
    [yaw,pitch,roll]     
    mask = viz.HEAD_ORI    # Positional argument
    mode = viz.ABS_PARENT    # Positional argument
)

However, this doesn't produce the correct results. For example:
Code:

viz.MainView.setEuler([90, 0, 0], mode = viz.REL_LOCAL)
will not rotate 90 degrees relative to local. The mode argument doesn't make a difference when the function is called this way.

The only way to get the desired results is to call like this
Code:

viz.MainView.setEuler(90, 0, 0, mode = viz.REL_LOCAL)
or
Code:

viz.MainView.setEuler([90, 0, 0], viz.HEAD_ORI, viz.REL_LOCAL)
I imagine this is why there is a comment "positional arguments" next to mask and mode arguments in the documentation, but, at least for me, the documentation doesn't clearly indicate the correct way to call the function (and it's easy to incorrectly call it and not realize it).


All times are GMT -7. The time now is 03:45 AM.

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