Jump to content
  • Advertisement

Archived

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

finas

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.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
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~

Share this post


Link to post
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 this post


Link to post
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 this post


Link to post
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]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!