Sign in to follow this  

Scene bounding - Exit through other side

Recommended Posts

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!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this