WorldViz User Forum translating viewpoint along body orientation
 Register FAQ Search Today's Posts Mark Forums Read

#1
08-28-2006, 10:12 AM
 cade_mccall 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.
#2
08-28-2006, 04:32 PM
 farshizzo 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?
#3
08-29-2006, 12:16 AM
 cade_mccall 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.
#4
08-29-2006, 09:35 AM
 farshizzo 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)```

 Thread Tools Display Modes Rate This Thread Linear Mode Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements Vizard Precision Position Tracker (PPT) Plug-in development

All times are GMT -7. The time now is 03:07 PM.