WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-25-2012, 01:00 PM
pcatalano pcatalano is offline
Member
 
Join Date: Sep 2009
Posts: 22
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:
<viewpoint>.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).
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
setEuler method of Shadow module omidbrb Vizard 1 02-22-2010 09:35 AM
setEuler after Linking problem durf Vizard 1 06-05-2009 01:41 PM
Problem with getEuler and setEuler Sandro Holzer Vizard 6 10-21-2008 05:01 AM
quad buffered frame rate confusion michaelrepucci Vizard 11 09-17-2008 08:55 AM
confusion over vizcave and viewpoint michaelrepucci Vizard 3 08-01-2008 01:54 PM


All times are GMT -7. The time now is 04:21 AM.


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