[vtk-developers] PV corner axes widget for VTK?

dean.inglis at camris.ca dean.inglis at camris.ca
Mon May 10 15:26:13 EDT 2004


possible VTK additions

I have hammered out 3 new classes to form an Orientation Marker scheme:
the first two inherit from vtkProp3D:

              vtkProp3D 
              /            \
vtkAxesActor   vtkAnnotatedCubeActor


vtkAxesActor which is essentially vtkPVAxesActor from Paraview,
and 
vtkAnnotatedCubeActor which uses 6 vtkVectorText/Actor pairs, and a vtkCubeSource
to essentially generate something very similar to what is seen in VolView (I think VolView uses
texture mapping in its orientation marker).  Access to the cube and the text actor's vtkProperty
allow for combinations of solid and/or wireframe representations. The vector text outlines can also 
be displayed and are generated by an internal vtkFeatureEdges.

The new widget is vtkOrientationMarkerWidget (better name anyone?) which
is essentially vtkPVAxesWidget from Paraview except that it takes any vtkProp3D
on input.  The beauty of this is that one can do something like:

vtkOrientationMarkerWidget* widget  = vtkOrientationMarkerWidget::New();

vtkAnnotatedCubeActor* act1 = vtkAnnotatedCubeActor::New();
act1->SetFaceTextScale(0.5);

vtkAxesActor* act2 = vtkAxesActor::New();

vtkAssembly* assemble = vtkAssembly::New();
assemble->AddPart(act1);
assemble->AddPart(act2);

widget->SetOrientationMarker((vtkProp3D*)assemble);

widget->SetParentRenderer(ren1);
widget->SetInteractor(iren);
widget->SetEnabled(1);

and you end up with something very flexible that can look like the orientation marker 
seen in Goodwin Lawlor's posted tcl example:
http://public.kitware.com/pipermail/vtkusers/2004-May/024186.html

comments/criticism?

Dean





More information about the vtk-developers mailing list