Camera view matrix

Started by
3 comments, last by finas 22 years, 8 months ago
my cameras data sturcture is : pos : x, y, z lookvector : x, y, z i want to set view from this camera. I know that I must use a transilate and rotate matrix but which... please help
do you speak english :)?
Advertisement
If your using openGL try using the gluLookat. It allows you to position and move a camera by specifing a look vector for the direction the camera is to point in and a position for the camera in 3D space. Make sure you include the OpenGL utlility libary though (glu.h) and glu32.lib

Hope this helps

~Steve~
are u using directx or openGL ?

its quite easy ..
if u are using dx, just read up some of the sdk samples
like the billboard or dolphin. . you can get
some camera code for there. .



{ Stating the obvious never helped any situation !! }
I''m using openGL, but first I want to understand how it ( transform to camera coord. )works
I want to see a that matrix. View Matrix = rotation * transilate.
and I know, that transilate matrix is:

1 0 0 0
transilate = 0 1 0 0
0 0 1 0
-px -py -pz 1

[ px, py, pz ] - camera position coord. but....


RotateMatrix = ???
do you speak english :)?
I''m using openGL, but first I want to understand how it ( transform to camera coord. )works
I want to see a that matrix. View Matrix = rotation * transilate.
and I know, that transilate matrix is:

1 0 0 0
transilate = 0 1 0 0
0 0 1 0
-px -py -pz 1

[ px, py, pz ] - camera position coord. but....


RotateMatrix = ???

[finas]
do you speak english :)?

This topic is closed to new replies.

Advertisement