WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   simple question? (https://forum.worldviz.com/showthread.php?t=2128)

Boombay 07-02-2009 05:11 AM

simple question?
 
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:
Code:

directionVector = itracker.getMatrix().getForward()
If you want to get the value directly from an euler angle, then you can use the following code:
Code:

directionVector = viz.Matrix.euler(eulerAngles).getForward()


All times are GMT -7. The time now is 07:27 AM.

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