#### Archived

This topic is now archived and is closed to further replies.

# Camera view matrix

This topic is 6198 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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

##### Share on other sites
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~

##### Share on other sites
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 !! }

##### Share on other sites
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 = ???

##### Share on other sites
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]

1. 1
Rutin
26
2. 2
3. 3
JoeJ
20
4. 4
5. 5

• 9
• 9
• 9
• 46
• 41
• ### Forum Statistics

• Total Topics
631750
• Total Posts
3002062
×