Tutorial 26: reflection: How to change the planes position?
I''ve been playing with the code for lesson 26 the whole day now so I can understand how it works, but there is something I can''t figure out: The plane equation of the reflecting plane.
I have lowered the plane Nehe made in his code to y==-1 but the reflection comes through the plane. I tried changing the plane equation (represented as "double eqr[] = {0.0f,-1.0f, 0.0f, 0.0f};" in the code) but there is no change.
I guessed that the fourth number was the distance to the plane so I changed it to -1 (and 1 just to make sure) but it STILL comes out of the plane. I can change this however I want, no change at all.
Can someone explain to me what I should change to get the plane reflect on y==-1 or any other arbitrary height/position?
Thank you!
STOP THE PLANET!! I WANT TO GET OFF!!
OK, I solved the problem. It had to do with the translation of the reflected object.
My next problem is in my own project: the reflected object is reflected on non-reflective surfaces.
Anyone?
My next problem is in my own project: the reflected object is reflected on non-reflective surfaces.
Anyone?
STOP THE PLANET!! I WANT TO GET OFF!!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement