[vtk-developers] vtkButtonWidget and related classes

Will Schroeder will.schroeder at kitware.com
Mon Mar 7 15:03:10 EST 2011


I've added several new widget classes to VTK. These implement a new widget
type that supports n-state buttons. There are also three new concrete button
representation types including a 2D overlay button (simple image); a 3D
polydata with texture (textures change with button state applied to any
user-specified, vtkPolyData); and an arbitrary vtkProp3D button where each
button state can be represented via a separate vtkProp3D (including
vtkVolumes and vtkImageActors). The 3D buttons also have built in
vtkFollower capability (they face the camera if requested). Tests and other
stuff were added as well. (Try out Widgets/Testing/Cxx/TestButtonWidget.cxx
to see them in action.)

vtkButtonWidget
vtkButtonRepresentation
  vtkTexturedButtonRepresentation2D
  vtkTexturedButtonRepresentation
  vtkProp3DButtonRepresentation

I also fixed the picking bug in vtkFollower. Since I found vtkFollower too
limited (only supports vtkActor-stuff since it is a subclass of vtkActor) I
added a more general vtkProp3DFollower class so any vtkProp3D can employ
camera following behavior (just set the vtkProp3D and the vtkCamera).

Obviously there are all sorts of other things that can be done with the
buttons including creating frames, etc. for multiple button arrangements.
Maybe someday....

Comments and suggestions are welcome.

W

-- 
William J. Schroeder, PhD
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
will.schroeder at kitware.com
http://www.kitware.com
(518) 881-4902
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20110307/46f0b8b8/attachment.html>


More information about the vtk-developers mailing list