Sign in to follow this  

Beginner needs help with clipping plane in OpenGL and Delphi

Recommended Posts

Hi all! This doesn't have really to do with game programming, but I figured this would be a great place to get some answers. I'm curious what the correct way to set up a clipping plane is. What I am trying to do is the following: the user enters the dimensions of the volume of interest (length, width, height). I use this information to draw a rectangular cuboid on the screen. Inside this 3D box of sorts, I draw several primitives for the user to view and inspect. Just to explain, I'm creating some graphical stuff for use in a factory, lets say. The volume of interest would be, for example, the available volume to cut out a car door on a giant milling machine, or the available measurement volume in a large measurement device such as a Coordinate Measuring Machine (CMM). Anyway, what I would like to do is to define a clipping plane WITHIN this rectangular box, in terms of the dimensions the user has entered, in such a way that the plane does not clip the box itself, only the objects inside it. The user should then, via a slider or similar control, be able to adjust the position of the clipping plane to reveal or hide more or less of the primitives within the "Volume of Interest" so to speak. If you really need to see it, look for and download a program called "DeskVox" as I got this idea from that program. install it and start it up and then look for "Clipping Plane" under the settings with the "Origin" slider. I looked at the source code for this program, but it was either done horribly or in a manner way above my head. I got fairly close, but I never really figured out how they were achieving this effect. Can anybody help me to proceed? (Sorry for the OVERT level of beginnerness) Thanks, and have a great day! -Langecrew- P.S. MAD thanks to AliMonster for helping me get started on this project in the first place!

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