[vtkusers] Labeling axes with strings

Matjaz Subelj matjaz at lecad.uni-lj.si
Wed Jun 20 06:45:23 EDT 2001


If I understood the problem, try this:

vtkActor2D *actor;
...
actor->GetPositionCoordinate()->SetCoordinateSystemToWorld();
actor->GetPositionCoordinate()->SetValue(x);
...
x being a point on axis in world coordinates.

Or you can use vtkFollower with vtkTextSource/vtkVectorText. vtkFollower 
always faces the camera.

Matjaz


Karin Faulhaber wrote:
> 
> Hi,
> 
> does anyone know of a possibility to label an axes actor (or some points
> at the axes' endpoints) with strings (e.g. "east", "north", "height") in
> a way that the user always faces the front of the text string, even if I
> rotate the axes?
> (Scaling or Translating doesn't matter because only rotating is allowed
> in my subclass of vtkPanel.)
> 
> As far as I can see vtkLabeledDataMapper doesn't take strings,
> vtkScaledTextActor is only 2D and vtkTextSource/vtkVectorText don't
> always show the front ...
> 
> Any hints are appreciated!
> Thanks
> Karin
> 
> --
> Karin Faulhaber
> Universitaet Karlsruhe
> Institut fuer Photogrammetrie und Fernerkundung (IPF)
> Englerstr. 7
> 76128 Karlsruhe
> 
> Tel: 0721/608-3676
> E-Mail: faulhaber at ipf.uni-karlsruhe.de
> 
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers




More information about the vtkusers mailing list