Hardware clipping planes in VTK
Will Schroeder
will.schroeder at kitware.com
Wed Jun 30 08:34:28 EDT 1999
There is a vtkPlanes implicit function class that can represent a number of planes (as compared to vtkPlane which is a single plane).
Will
At 06:10 PM 6/29/99 -0400, David Gobbi wrote:
>On Tue, 29 Jun 1999, Lisa Sobierajski Avila wrote:
>
>> Since you have named them "ClippingPlanes" it does not seem necessary to
>> have a more general representation (because even if in the future OpenGL
>> does allow more general clipping functions you would have to change the
>> name anyway, right?).
>
>You got me there. Time for me to bring the old grey matter in for a
>tune-up.
>
>> If vtkImplicitFunctionCollection is the best way to
>> store this internally, that's fine (although I think there is probably a
>> simpler way) but you might want to add access methods (add/remove clipping
>> plane) that do the error checking when you set the clipping plane rather
>> than at render time. (So when a user adds a plane you can make sure it is
>> truly a plane and that you have not exceeded the limit) What do you think?
>
>Yes, internalizing the vtkImplicitFunctionCollection would be a clean
>solution. I'll make the changes.
>
> - David
>
>> Lisa
>>
>>
>> At 04:05 PM 6/29/99 -0400, David Gobbi wrote:
>> >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.
>> >>
>> >-----------------------------------------------------------------------------
>> >> >
>> >>
>> >
>> >
>> >
>> >-----------------------------------------------------------------------------
>> >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.
>> >-----------------------------------------------------------------------------
>> >
>>
>
>
>
>
>-----------------------------------------------------------------------------
>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.
>-----------------------------------------------------------------------------
>
-----------------------------------------------------------------------------
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