[ODE] End point of a Ray

Eugen Lofing lofing at gmx.net
Wed Oct 12 14:21:46 MST 2005

Hello people!

May be somebody could help me? 

We have by using

void dGeomRayGet (dGeomID ray, dVector3 start, dVector3 dir);

Get the starting position (start) and direction (dir) of the ray. The
returned direction will be a unit length vector.


Now I need to calculate the second point (end point)

Did somebody managet it? I tried the common formulas, like

norm = sqrt(dir[0]*dir[0] + dir[1]*dir[1] + dir[2]*dir[2]);
pos2[0] = dir[0]*length/norm + pos1[0];

or also
pos2[0] = cos(dir[0])*length + pos1[0];
... (I think its the same for directions?)

But nothig works. I thought may be "a unit length vector" is a normed
vector, so I tried it also without norm (pos2[0] = dir[0]/norm + pos1[0];),
but nothing works... :(

The output is very funny but not usefull :-)

PS: How to unzip the mailinglist archives?
And how to download this complete archiv (42MB)?

Thank u very much!

10 GB Mailbox, 100 FreeSMS/Monat http://www.gmx.net/de/go/topmail
+++ GMX - die erste Adresse für Mail, Message, More +++

More information about the ODE mailing list