Archived

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

Viewing a 3D Scene

This topic is 5882 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

Quick dumb questions, conceptually which would be the best way to rotation and translate a 3D scene? Would I translate all the objects based on the camera''s orientation and location or could I just translate the camera? In OpenGL I am referring to the GL_MODELVIEW and the GL_PROJECTION mode.

Share this post


Link to post
Share on other sites
camera is just something which is abstracted by people,it doesn''t exist at all,and everything movement which is like a camera movement is caused by changing the matrix.

so when u see the scene viewport changing,it is just caused by translating(or rotating,scaling) the world system-coodinates,in fact.

so,what u do to chage the scene actually is changing the world system(and these functions transfer maxtrcs internal).

and,all these functions which r used to transfer r all beased on the GL_MODELVIEW.the GL_PROJECTION is just for those functions such as glOrtho to change the projection ways(perspective or ortho-disassembling).

jerry2
Programming,make a whole new world.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
well... you could just use gluLookAt... that''s the easiest way. It''s a pre-made function that takes simple parameters and rotates the entire world based on where you''re looking at, and where you''re looking from. That way you don''t have to worry about rotating and translating anything.

Billy

Share this post


Link to post
Share on other sites
Ok great, makes a lot of sense. I realize that a "Camera" in the 3D scene is a user defined entity. I was just curious as to how others would approach this as I am new to OpenGL and thought that it would be possible to simple move your viewpoint instead of transforming everything in the scene.

What exactly goes glLookAt do? does it send a matrix to the video to do the translations? Reason I ask this is because I am using gl4java, which is a OGL binding for Java. I don't think the binding contains the gluLookAt function (only supports GLUT 1.2).

Thanks for the previous replies, it has helped a lot.

Edited by - bslayerw on November 2, 2001 11:48:41 AM

Share this post


Link to post
Share on other sites
glulookat transfers the world system internally,so it presents an effect that the a camera is moving in the scene.

this function is included in the glu32.lib,u can use it in vc,and i think it should be used in java compiler.u know,opengl is a great lib for nearly every platform.



jerry2
Programming,make a whole new world.

Share this post


Link to post
Share on other sites