Hi,

I assume you are rendering your scene in a perspective (i.e. obejcts become 
smaller with increasing distance -> many people use perspective).

In the above assumed situation, your rendering volume ist defined by the 
frustum (google: openGL frustum). The frustum is limited in front (facing to 
your camera) by the near plane. You can calculate your field of view (fov) by a 
trigonometric calculation with the frustum values.

GLU provides a function which calculates the vaues for you:

Code:

void gluPerspective(GLdouble fov, GLdouble aspect, GLdouble near, GLdouble far);



fov is the field of view in Y-direction, you can use the aspect ratio to 
calculate the fov in the other dimension.

Please read this: http://www.cprogramming.com/tutorial/opengl_projections.html 
and search for the term "gluPerspective" or "fov"



Cheers,
Torben

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=35460#35460





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to