[vtk-developers] 3D widget changes

Will Schroeder will.schroeder at kitware.com
Thu Sep 5 12:21:59 EDT 2002


Hi Folks-

For those working with 3D widgets I've added some features to control the 
size of the handles and other 3D objects that you grab and manipulate. The 
idea is to allow the user to be able to manipulate the widget no matter how 
much the camera is zoomed, and how small the widget becomes.

There is a HandleSize ivar in the vtk3DWidget class. This is the fraction 
of the size of the diagonal of the renderer. There is also a convenience 
method SizeHandles(float) that returns a representative size given the 
HandleSize ivar and the factor (normally 1.0) that is passed into the 
method. I've also create a virtual, empty SizeHandles() method that 
subclasses can implement. This is generally called in the SetEnabled() 
widget method, and when the interaction ends (e.g., mouse button goes up). 
Note: some widgets (like Dean's ImagePlaneWidget and the PointWidget) have 
no handles to speak of, so this functionality does not apply.

I'm still experimenting a bit, so feedback is welcome. I've converted the 
line widget, plane widget, implicit plane widget, and box widget to use 
this functionality.

Will




More information about the vtk-developers mailing list