WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-12-2012, 04:05 PM
shivanangel shivanangel is offline
Member
 
Join Date: Feb 2006
Location: New Jersey
Posts: 182
MainView and getEuler

Dear Vizard Staff,

I have a question I'm sure you'll be able to wrap up easily.

I have a viewpoint being controlled by an XBox controller:

Code:
#Move locally in the Left to Right Direction self.viewport.setEuler([self.gRotation[0], 0.0, 0.0], viz.BODY_ORI, viz.REL_LOCAL)
		
#Move globally in the Up to Down Direction
self.viewport.setEuler([0.0, self.gRotation[1], 0.0], viz.HEAD_ORI, viz.REL_LOCAL)
			
#Roll
self.viewport.setEuler([0.0, 0.0, self.gRotation[2]], viz.HEAD_ORI, viz.REL_LOCAL)
The problem comes up when I am attempting to save the orientation of the MainView for another program using this script.

When I try and use getEuler(), the values I get back do not match the actual orientation of the MainView.

I've tried using the masks for the body and the head, however I still can not match the original orientation.

Is there a method to concatenate the matrix transforms so I can get the final orientation value to save the orientation?
Reply With Quote
  #2  
Old 01-20-2012, 10:31 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
It's hard to tell what the problem is without more information or sample code. Either way, I would recommend using quaternions (getQuat/setQuat) to save and restore orientations.
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


All times are GMT -7. The time now is 05:47 PM.


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