## Orientation to LookAt-Point

### Orientation to LookAt-Point

Hello,

I want to transform the position/orientation paramters I got from a
camera Node to the corresponding postion/lookAtPoint/upVector
combination. Is there any function for this or do I have to do it
manually??

Thanks a lot
Kristian

### Orientation to LookAt-Point

> I want to transform the position/orientation paramters I got from a
> camera Node to the corresponding postion/lookAtPoint/upVector
> combination.

Well, position is position.

As for "look at" and "up" vectors, something like this should do the
trick (nb, untested):

SbRotation camerarotation = mycamera->orientation.getValue();

SbVec3f lookat(0, 0, -1); // init to default lookat direction
camerarotation.multVec(lookat, lookat);

SbVec3f upvec(0, 1, 0); // init to default up vector direction
camerarotation.multVec(upvec, upvec);

Morten
--
<URL:http://www.coin3d.org>

### Orientation to LookAt-Point

>         SbRotation camerarotation = mycamera->orientation.getValue();

>         SbVec3f lookat(0, 0, -1); // init to default lookat direction
>         camerarotation.multVec(lookat, lookat);

>         SbVec3f upvec(0, 1, 0); // init to default up vector direction
>         camerarotation.multVec(upvec, upvec);

Thanks Morten,

this is exactly what I did. I added the camera psition to the
lookat-vector so I get a Lookat-Point. It works great. This
lookat-Vector is also great to move the camera along the view
direction.

Kristian

Hi All;

I am looking for some source code/algorithm/know how on finding the
orientation of a point to a plane. If the plane is defined by three points,
and the unknown point is also available, I want to be able to determine:

if the point is above the plane, beloe the plane of on the plane.

Thanks

Fmac

10. lookat