|
From: <Wol...@t-...> - 2001-06-18 18:31:58
|
Norman wrote:
> sgmap_vec_onto_cur_surface_plane()
Ah, this is like what I wanted to code, only that it is a bit more
complex. It does:
sgAddVec3(tmp, v0, vec);
sgSubVec3(v, tmp, u1);
// printf(" v =3D %.2f, %.2f, %.2f\n", v[0], v[1], v[2]);
// Calculate the vector "result" which is "v" - "v0" which is a
// directional vector pointing from v0 towards v
// result =3D v - v0
sgSubVec3(result, v, v0);
Obviously, adding and then subtracting v0 is unecessary.
Actually, v0 is not used otherwise, so you can remove the parameter
v0. This is intuitively clear; A directional vector does depend on the
normal of the plane, but not on the plane's position.
Does that mean I am on the right track?
Is heading indeed the angle versus north (and not, for example,
south)?
>Norman
Bye bye,
Wolfram.
|