WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Pre/Post transformations (https://forum.worldviz.com/showthread.php?t=765)

pattie 09-29-2006 01:02 PM

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

Gladsomebeast 09-29-2006 01:56 PM

Are you interested in the mathematics or the effect pre and post operations have on the destination object of the link?

Gladsomebeast 09-29-2006 02:05 PM

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

pattie 09-30-2006 04:44 AM

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

Gladsomebeast 10-02-2006 10:30 AM

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)

pattie 10-02-2006 04:20 PM

Pre/Post transforms
 
Thanks a lot
This will help!

Patrick


All times are GMT -7. The time now is 11:54 PM.

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