Advertisement

clipping plane in Z not operational

Started by December 20, 2001 05:25 PM
-1 comments, last by vbbartlett 23 years, 2 months ago
I am using a clipping plane, but it doesn''t work when i try to just clip in the Z-axis... Why? i am drawing a tracking axis to show the current rotation of a model with a label on the axis both positive and negative. But I don''t want the label that is directly behind another label... ie in a non rotated view, the Z and -z axis labels are on top of one another. So to solve this i assumed i would make a clipping plane and clip the Z axis at -1 (the labels are at 1.1 or -1.1) I have changed the clipping plane to clip X and Y and it appears correctly but when i change it to the Z element it displays everything (no clipping) code segment: GLdouble eqn[4] = {0,0,1,1}; // doesn''t work // GLdouble eqn[4] = {0,1,0,1}; // works for the Y axis // GLdouble eqn[4] = {1,0,0,1}; // works for the X axis glTranslated(cx,cy,cz); // translate to the corner glScaled(scale,scale,1); // scale according to the viewspace glClipPlane(GL_CLIP_PLANE0,eqn); // set the clipping plane glEnable(GL_CLIP_PLANE0); // enable clipping glMultMatrixd(mm); // load the model''s current rotation draw the axis and labels Any ideas would be greatly appreciated and thx Carl

This topic is closed to new replies.

Advertisement