[vtk-developers] vtkImplicitPlaneWidget and changes to vtkInteractorEventRecorder
Will Schroeder
will.schroeder at kitware.com
Tue Aug 6 10:13:24 EDT 2002
Hi Folks-
I've added a new 3D widget: a vtkImplicitPlaneWidget. Basically it controls
an implicit plane (vtkPlane) which can be used for clipping, cutting,
modeling, etc. The widget consists of a axis-aligned bounding box with a
plane that cuts through the bounding box to produce edges (which may be
tubed). A plane is shown along with two normal vectors (on either side of
the plane). The normal vectors can be selected and used to rotate the
plane. There is also a handle at the point where the normals meet the plane
that can be grabbed and moved around the plane (effectively controlling the
point of rotation, i.e. the origin, of the plane). Grabbing the plane with
the mouse allows you to move the plane back and forth along the normal.
Using the middle mouse you can move the plane arbitrarily within the
bounding box; using the right mouse you can scale the bounding box. Also,
you can grab the bounding box and move it (and the plane inside of it)
arbitrarily through your data.
I have added a test: Hybrid/Testing/Cxx/TestImplicitPlaneWidget.cxx.
A note on testing: I modified the vtkInteractorEventRecorder so that it can
read from a string as well as a file. This allows you to create strings of
events in C++ code (see the above test and TestPointWidget.cxx) which
exercise the widget. That way tests do not have to depend on external data
files (logs of events). Using the vtkInteractorEventRecorder is a great way
to create these tests and up the coverage of the interactor classes.
Have fun,
Will
More information about the vtk-developers
mailing list