Sean Spicer (spicer@bme.stanford.edu)
Tue, 3 Aug 1999 07:46:53 -0700 (PDT)
Volker,
Recall that you must translate (and possible scale) the clipping plane
into position as well as define its operating plane equation. Here's an
example from some working code....
// Negitive X axis clipping (X lo)
glPushMatrix();
glTranslatef((float) state -> ClipIdx[0][0],
0.0, 0.0);
clipeqn[0] = 1.0; // Negative X axis;
clipeqn[1] = clipeqn[2] = clipeqn[3] = 0.0;
glClipPlane(GL_CLIP_PLANE0, clipeqn);
glEnable(GL_CLIP_PLANE0);
glPopMatrix();
This is the most straightforward way to things in my opinion. I wouldn't
bother to look at using voGeometryActions::clip(). But as always, it's
your call.
Hope that helps,
sean
> From V.Heid@DKFZ-Heidelberg.de Tue Aug 3 07:42:52 1999
> Date: Tue, 03 Aug 1999 15:57:54 +0200
> From: Volker Heid <V.Heid@DKFZ-Heidelberg.de>
> To: Volumizer <info-volumizer@corp.sgi.com>
> Subject: clipping example wanted
>
> Hi,
> I am searching for an example where parts of a volume are clipped. I
> want to use one of the voGeometryActions::clip() methods.
>
> I also tried the simple OpelGL command before the drawing routine:
>
> float eqn[4] = { 0.0, 1.0, 0.0, 0.0 };
> glClipPlane (GL_CLIP_PLANE0, eqn);
> glEnable (GL_CLIP_PLANE0);
>
> But this did not work.
>
>
> Can anybody help me?
>
> Volker
___________________________________________________________________________
Sean Spicer Stanford University Medical Center
Biomechanical Engineering Division of Vascular Surgery, Suite H3642
Cardiovascular Biomechanics Lab Stanford CA, 94305
Telephone...650.723.1695
Fax.........650.723.8762
http://solvedeath.stanford.edu/~spicer
This archive was generated by hypermail 2.0b2 on Mon Nov 01 1999 - 14:21:39 PST