PDA

View Full Version : Viewing using Eye Points



qwerty5683
10-24-2017, 07:02 PM
Hi, I have made a maze and am trying to view it. In order to view the maze I am told to implement the following functions:


mat4 look_at(GLfloat eyex, GLfloat eyey, GLfloat eyez,
GLfloat atx, GLfloat aty, GLfloat atz,
GLfloat upx, GLfloat upy, GLfloat upz);
mat4 frustum(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top,
GLfloat near, GLfloat far);


Using these functions I am trying to view my maze at the center from above, and "fly" around it in a circle. Next, I need to "fly" down to the entrance of the maze by changing the viewpoint slowly until it is right in front of the entrance.

Here's what I'm struggling with - how to implement these functions. I don't even know where to start. Also, once implemented - what to set each argument in the functions as for the different viewpoints. Any help is appreciated!

qwerty5683
10-24-2017, 07:23 PM
If anyone could provide me with the implementation of GluLookAt I'd be very appreciative! Direct code or link would be great.

Goofus43
10-25-2017, 07:46 AM
https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluLookAt.xml

Using Google.