PDA

View Full Version : Clipping Planes



05-12-2004, 07:59 AM
Hi, im tring to use clipping planes to make hemispheres from gluSphere objects.

I'm making these hemispheres within a function using a list to be called by glCallList, however my clipping planes either dont work or clip the rest of my world as well.

Is there any way of making a clipping plane 'local' to one drawn object so that it doesnt affect anything else?

05-12-2004, 08:28 AM
also, do clipping plans move when the camera ges to a new positin, ie, is the positining of the clipping plane relative to the camera?

05-12-2004, 10:10 AM
can no-one help me?

chowe6685
05-12-2004, 10:21 AM
to make a plane "local" simply enable the plane before drawing the object and disable it afterward. I have no idea how clipping planes are transformed, but you could fairly easily write a program to check or could look it up in the spec available on the website.

05-13-2004, 06:18 AM
I've managed to make my clippling planes local to an object, however, the clipping planes are located relative to the camera which is annoying. Is there any way of making them 'static' as it were so they dont move about when i change my glLookAt coordinates?

05-13-2004, 06:38 AM
anybody got any ideas?

05-13-2004, 08:02 AM
*bump*

I really need some help

endash
05-13-2004, 08:58 AM
I'm not sure. I haven't used clipping planes. I would have gone for writing your own hemisphere code.

plasmonster
05-13-2004, 09:05 AM
Mike,

when you specify a clip plane it is transformed by the model matrix. If you don't want your planes transformed, then load an identity on the matrix stack before you set them.