Orientation to LookAt-Point

Orientation to LookAt-Point

Post by Kristi » Thu, 05 Jun 2003 22:33:22



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

Post by Morten Erikse » Thu, 05 Jun 2003 23:07:45



> 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

Post by Kristi » Fri, 06 Jun 2003 17:18:29



>         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

 
 
 

1. Orientation of a point to a plane

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

2. TGS OpenGL Colormaps on 8 bit systems

3. Plotting a curve between two points, given orientations and min curvature

4. Making a chain?

5. Orientation of points in 2D

6. Mac and Windows LW compatible?

7. IRIS GL lookat bug?

8. plug-in experts needed !

9. lookat subroutine

10. lookat

11. problem with GL lookat() with ortho()

12. Behaviour of "lookat"

13. Lookat controller problem