WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-28-2006, 10:12 AM
cade_mccall cade_mccall is offline
Member
 
Join Date: Sep 2004
Posts: 61
translating viewpoint along body orientation

Peeps-

Is there a way in 2.53 to translate the viewpoint in absolute coordinates of the BODY_ORI reference frame (I believe you can do this with setPosition in R3)? "Move" allows you to set BODY_ORI as the mask, but I want to translate the viewpoint absolutely, not relatively to my current position.

Thanks.
Reply With Quote
  #2  
Old 08-28-2006, 04:32 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
I don't understand exactly what you mean by absolutely in the BODY_ORI reference frame. Translating a view absolutely is always in the world reference frame. Can you explain exactly what you are trying to accomplish?
Reply With Quote
  #3  
Old 08-29-2006, 12:16 AM
cade_mccall cade_mccall is offline
Member
 
Join Date: Sep 2004
Posts: 61
I'm using ppt data to translate the viewpoint but I'm changing the orientation of the body of the viewpoint. I'd like to translate the viewpoint according to the new orientation of the body, not according to the world axes. So, if I rotate the body 90 degrees I still want movement along the z axis of the room to result in forward movement. That only works if I use movement along the body's axes-- if I use world axes then moving forward in the room will move me sideways in the world since my body is now facing to the right. Right now I'm using the "move" function because it allows for a BODY ORI mask although then I have to calculate the relative changes in the ppt data instead of using the raw data since "move" translates relative to the current position. This works but I was wondering if I could skip the step of calculating relative changes by using something that just translates the viewpoint to absolute points within a rotated reference frame.
Reply With Quote
  #4  
Old 08-29-2006, 09:35 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Ok, I see. Then simply translate the viewpoint absolutely to (0,0,0) then apply the ppt position relatively to the BODY_ORI:
Code:
view.translate(0,0,0)
view.move(ppt[0],ppt[1],ppt[2],viz.BODY_ORI)
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 03:07 PM.


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