Talk About Network

Google





Graphics > OpenGL 3D API > Re: how to chan...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 3 Topic 4769 of 5061
Post > Topic >>

Re: how to change camera location based on object location

by Jonathan Campbell <jg.campbell.ng@[EMAIL PROTECTED] > May 26, 2008 at 03:41 PM

Shafran wrote:
> Hello
> 
> I am trying to move my gluLookAt to an object position (the object's
> origin) but I can't do it.
> i tried while creating the object to save its matrix:
> glGetFloatv(GL_MODELVIEW_MATRIX,mat); and somewhere else in the code
> to glMultMatrix(mat), but it seems wrong...
> 
> maybe I misunderstand it all?
> 
> can someone help?
> 
> thanks!

gluLookAt (eyeX, eyeY, eyeZ, atX, atY, atZ, upX, upY, upZ);

eyeX, eyeY, eyeZ give the location of the camera / eye.

atX, atY, atZ give the pointing direction of the camera;

upX, upY, upZ give the orientation. (0.0; 1.0; 0.0) means the camera is 
oriented with up along the y-axis --- the default.

Best regards,

Jon C.
 




 3 Posts in Topic:
how to change camera location based on object location
Shafran <odedshafran@[  2008-05-26 06:38:39 
Re: how to change camera location based on object location
Jonathan Campbell <jg.  2008-05-26 15:41:21 
Re: how to change camera location based on object location
Sourcerer <enlorkMAKNI  2008-05-27 15:37:53 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 14:33:51 PST 2009.