Hardware clipping planes in VTK

David Gobbi dgobbi at irus.rri.on.ca
Tue Jun 29 16:05:06 EDT 1999


Hi Lisa,

It would be easy to to add the SetClippingPlanes method to
vtkDataSetMapper (it will just call the same method in its
internal vtkPolyDataMapper), so I will do that.

I used vtkImplicitFunctions because it already existed, there
is no collection of vtkPlanes.  Instead, an error is reported 
at render time if any of the functions is not a plane, or
if too many planes are specified.  (Who knows, future versions
of OpenGL might allow more complicated clipping functions -- I
prefer to keep things general).

 - David

On Tue, 29 Jun 1999, Lisa Sobierajski Avila wrote:

> Hello David,
> 
> Now that XGL and Starbase are gone, this seems like a good addition - at
> least until we add some new graphics language that doesn't support hardware
> clipping! :-)
> 
> Why did you chose to add these changes to vtkPolyDataMapper instead of
> vtkDataSetMapper? It would seem that they could be added to
> vtkDataSetMapper which would allow for clipping of more than just polydata.
> And why did you add vtkImplicitFunctions instead of some other
> specification that allows for only planes? The implicit function seems too
> general - doesn't OpenGL require simple planes for hardware clipping?
> 
> Lisa Avila
> 
> 
> At 02:53 PM 6/29/99 -0400, David Gobbi wrote:
> >
> >I have added hardware clipping planes to VTK, and would
> >like to get some feedback before contributing the change
> >to Kitware.
> >
> >All of the changes are limited to vtkPolyDataMapper, which has
> >the following new methods:
> >
> >void vtkPolyDataMapper::SetClippingPlanes(vtkImplicitFunctionCollection)
> >vtkImplicitFunctionCollection vtkPolyDataMapper::GetClippingPlanes()
> >
> >These allow you to specify up to 6 clipping planes which are
> >handled by OpenGL.  This is equivalent to piping vtkPolyData
> >through a set of vtkClipPolyData filters.  When you are moving
> >the clipping planes around, doing the clipping in hardware 
> >makes the rendering go several times faster.
> >
> > - David
> >
> >--David Gobbi, MSc                    dgobbi at irus.rri.on.ca
> >  Advanced Imaging Research Group
> >  Robarts Research Institute, University of Western Ontario
> >
> >
> >
> >-----------------------------------------------------------------------------
> >This is the private VTK discussion list.  Please keep messages on-topic.
> >Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
> >To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
> ><majordomo at gsao.med.ge.com>.  For help, send message body containing
> >"info vtkusers" to the same address.     Live long and prosper.
> >-----------------------------------------------------------------------------
> > 
> 





More information about the vtkusers mailing list