Camera controlling is essential in 3D viewing. OpenGL provides a function gluLookAt() for this purpose. The syntax of the function gluLookAt() is
void gluLookAt ( GLdouble eyex,
GLdouble eyey,
GLdouble eyez,
GLdouble centerx,
GLdouble centery,
GLdouble centerz,
GLdouble upx,
GLdouble upy,
GLdouble upz );
It takes three sets of arguments, which specify the location of the viewpoint, define a reference point toward which the camera is aimed, and indicate which direction is up. The first three numbers represent where the camera is positioned.
تعليقات: 0
إرسال تعليق