How can I get fixed-size text at a position in world space?
I have been trying to accomplish the following with no luck: create a
text annotation that has a fixed height, in pixels, and a fixed
orientation (i.e. stays upright, faces the user), that has a fixed
location in world space.
vtkVectorText + vtkFollower does not work because vtkFollower can only
adjust the orientation and not the size. I don't want to zoom in on the
text when the user zooms in, I want it to stay 20 pixels high. Also I
would rather not create a large number of polygons unnecessarily.
vtkTextActor does not work because I can only set a screen position, not
a world position. I would like the annotations to move with the data as
the view transformation changes.
Am I missing something? Is this impossible without writing a custom actor?
Powered by www.kitware.com
Re: How can I get fixed-size text at a position in world space?
Recent versions of VTK include vtkBillboardTextActor3D, which should
do what you're asking. Older versions of VTK have vtkTextActor, which
draws in an overlay, but can be anchored to a world coordinate by
manipulating the object returned by GetPositionCoordinate.