WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-29-2006, 01:02 PM
pattie pattie is offline
Member
 
Join Date: Aug 2006
Posts: 32
Pre/Post transformations

Could anyone point me to a good source of explanation of what exactly happens when we apply a pretransformation (for example preTrans or preScale, or preRot) or a posttransformation on a link object. What matrices are put into action, what happen to the link object?, etc.
In the following example:
PORT_5DT_USB = 0
sensor = viz.add('5dt.dls')
glove = hand.add(sensor,hand.GLOVE_5DT)
glove.translate(0,1,0)
block = viz.add('box.wrl')
block.translate(0,0,3)
link = viz.link(glove,viz.MainView)
link.preTrans(0,-1.82,-1)
Can anyone explain to me in detail what happens to the link object as well as to the source and destination objects?
I have read the Vizard doc on it, the openGL explanations on transformations in general and I have no problem whatsoever with it. But I still do not understand clearly what the pre and post transformations do.

Thanks for any light on this.
Patrick
Reply With Quote
  #2  
Old 09-29-2006, 01:56 PM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
Are you interested in the mathematics or the effect pre and post operations have on the destination object of the link?
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
  #3  
Old 09-29-2006, 02:05 PM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
The effective difference between pre and post link operations:
--pre operations rotate or translate the destination object in the source's local
coordinate system
--post operations rotate or translate the destination object in the world's coordinate
system
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
  #4  
Old 09-30-2006, 04:44 AM
pattie pattie is offline
Member
 
Join Date: Aug 2006
Posts: 32
Pre and Post transformation

Thanks that will keep me going for now.
If you have any link on the mathematics of those transformations, I am still interested.

Patrick
Reply With Quote
  #5  
Old 10-02-2006, 10:30 AM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
Here is how the destination matrix is computed.

All varables are 4x4 transfrom matrixes.

input:
Source
PreOps
PostOps

Destination = PreOps * Source * PostOps

There is also another level of detale avalable with link operations because the source data starts as two matrixes, position and orientation. You can specify if the operations should be applied to just the sources position or orientation matrix with the "target" parameter. Here is the expanded equation.

input:
Source_Pos
Source_Ori
PreOps_Pos
PostOps_Pos
PreOps_Ori
PostOps_Ori
PreOps_Full
PostOps_Full

Destination = (PreOps_Full)*(PreOps_Pos*Source_Pos*PostOps_Pos)* (PreOps_Ori*Source_Ori*PostOps_Ori)*(PostOps_Full)
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
  #6  
Old 10-02-2006, 04:20 PM
pattie pattie is offline
Member
 
Join Date: Aug 2006
Posts: 32
Pre/Post transforms

Thanks a lot
This will help!

Patrick
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 07:49 AM.


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