Hi all, I have read some reference abt the implementation of reflection. And the procedure is as follows:
-
Initialize the modelview and projection matrices to the identity (glLoadIdentity).
-
Set up a projection matrix using the glFrustum command.
-
Set up the “real” eye point at the desired position using a gluLookAt command (or something
similar). -
Reflect the viewing frustum (or the scene) through the plane containing the reflector by computing a reflection matrix and combining it with the current modelview or projectionmatrices
using the glMultMatrix command. -
Draw the scene.
-
Move the eye point back to its “real” position.
I am a bit confused abt the first four procedure. If I have a pond and want to reflect the object above the pond… is that what I should do in the first four procedure is to extract the modelview from the viewing frustum and then locate the eye point under the pond?
After that, is that i should draw the object above the pond and then move the eye point back to real position? If so, what is the reflection matrix referring to?
Thanks a lot