[vtkusers] 3D axes - summary and commentary...

Terry J. Ligocki tjligocki at lbl.gov
Wed May 23 18:15:01 EDT 2001


I received four responses to my query about displaying 3D axes along
with a VTK visualization to provide a user with orientation
information.  One response was from Prabhu Ramachandran,
"prabhu at cyberwaveindia.com", and he suggested I look at
"vtkCubeAxesActor2D.h" in the "contrib" directory.  I didn't follow up
on this (as other suggestions worked for me) but I thank Prabhu for the
pointer!

Another response was from Hank Childs, "childs3 at llnl.gov", at LLNL.  He
has solved this problem (and others) using two additional VTK classes
(that he wrote for a visualization effort at LLNL) and 2D actors.  I
believe this method would have worked fine for my needs but another
solution (see below) worked even better in my case.  If you are
interested in this solution you should contact Hank.

The final two responses were from Ben Held, "ben.held at staarinc.com", and
Michael Bell, "mbell at coventor.com".  Ben sent me (and posted to the
group) some C++ code to create a VTK pipeline which generates the axes
and then renders the result in a separate rendering window.  This "axes"
window is then coupled to the main rendering window by applying the
camera rotations generated in the main window to the camera in the
"axes" window.  Thus, the two cameras track each other w.r.t. rotations
(just what I needed!).  I translated needed parts of Ben's code into
Tcl/Tk (which I'm using at the moment) and I now have a main window and
an "axes" window which do what I need.

Michael suggested a similar approach but also combined the two renders
into one window by using the "layers" available in VTK 3.2.  I am
currently using VTK 3.1.2 which doesn't appear to have this capability
but I plan to use it when I start using VTK 3.2.

So, thanks to everyone who helped with this.  If anyone would like more
details please contact me, tjligocki at lbl.gov, and I will be happy to
provide them.  Also, if there is interest in anything more being posted
to the VTK e-mail list let me know and I will post more...

                Terry J. (Ligocki, tjligocki at lbl.gov)





More information about the vtkusers mailing list