Scene bounding - Exit through other side

Started by
-1 comments, last by TheM1ke 15 years, 4 months ago
Hello! I have one (or more) 3d object made of GL_Polygons. I want to make an invisible bound (say a cube from (-10,-10,-10) to (10,10,10)) with the following functionality: When the object is moved outside the cube, the rest of the object is drawn in the opposite direction (like pacman's walls). For example, if a polygon spans over the bound in the X-coordinate, a part of it is drawn of the min X of the bound (-10), while the rest of it is drawn normally (close to the max X value of the bound). I understand it is fairly simple if we calculate it per facet (if any of the polygon's vertices go through the bound, draw it on the opposite direction), but I really can't think how it could be done otherwise... Thanks in advance!

This topic is closed to new replies.

Advertisement