PDA

View Full Version : simple question?


Boombay
07-02-2009, 05:11 AM
hello everyone,

somebody knows a function, from which i can calculate a direction vector out of a given point (anywhere in the world coordination system) + a given euler angle from a tracker?

my code looks like this:

track = itracker.getEuler()
point = object.getPosition()
directionVector = ?

the direction Vector should be an arrow, pointing from the given Position in the direction of the tracker.

i have already searched about preEuler Matrix transformations, but i didnt get a working system.

farshizzo
07-06-2009, 10:51 AM
You can get the forward vector of the tracker using the following code: directionVector = itracker.getMatrix().getForward()If you want to get the value directly from an euler angle, then you can use the following code:directionVector = viz.Matrix.euler(eulerAngles).getForward()