Mirrors And Portals Question submitted by (13 July 1999) |
Return to The Archives |
I recently have coded a portal engine with mirrors and all that stuff
everytime i find a portal i Adjust the clipping planes to it clipping this
fustrum with the previous fustrum of course.
The portals have to be defined clockwise in order to create the correct
fustrum the problem is that when i see trough a mirror the poligons are now
anti clockwise (I use clockwise poligons)
and i dont know how to solve this... i think that there sould be a good
hack around but i dot get it :) so given a portal is there a good way to generate the clipping planes for it without taking care of the clock/anticlock-wise of the portal? |
||
a quick hack: to set a flag to indicate which direction along the
vertex array(s) you wish to traverse. if the resultant frustum
is constructed from a "mirror" portal, set the flag to -1, +1
otherwise.
Response provided by Hin Jang |
||
This article was originally an entry in flipCode's Fountain of Knowledge, an open Question and Answer column that no longer exists. |