Jump to content

  • Log In with Google      Sign In   
  • Create Account

Lacoste

Member Since 14 May 2013
Offline Last Active May 29 2013 07:18 AM

Posts I've Made

In Topic: How cameras work

14 May 2013 - 08:28 AM

Thank you very much will check your answer and ask for any questions, maybe will share some piece of code ..

Must tell that i have no interaction with via email or other spammers, ad-senders, etc please explain why my second post was marked as an addvertisment? smile.pnghuh.png

 


In Topic: How cameras work

14 May 2013 - 07:25 AM

For all 3d graphics, the "camera" is just a useful abstraction for how to construct the view and projection transform matrix.

 

If it "moves" or not, is up to you as a programmer to decide, depending on how you want to look at it.

 

It's equally valid to see it as the camera moves around, as it is to see it as the world is rotated and moved around the camera.

The math will be the same.

 

I'd recommend you chose whatever you feel is intuitive, that usually results in better structured code.

 

A very common way is to construct the view matrix from an eye-position, a lookat-point, and an up-vector.

The "camera" would just be these values stored somewhere (maybe in a class called Camera)

 

Here is the code for gluLookAt, which implement this: http://www.opengl.org/wiki/GluLookAt_code

Thank you very much for your answer, will take a look.

In the camera class example you've shared, there are no near pane/far pane am i understand right? So, how much space you will see if there are no edges


In Topic: How cameras work

14 May 2013 - 04:41 AM

also please take a look a the CSR Racing 

any thoughts about how camera is working in this game? is camera fixed or is moving with the vehicle how to determine


PARTNERS