Quantcast

How can I get fixed-size text at a position in world space?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How can I get fixed-size text at a position in world space?

Wayne Christopher
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?

Thanks,

     Wayne
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I get fixed-size text at a position in world space?

alanwsx
Same question here. Did you figure out how to do it?

Thanks,
Shangxuan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I get fixed-size text at a position in world space?

David Lonie-2
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.

HTH,
Dave

On Tue, Apr 25, 2017 at 1:49 AM, alanwsx <[hidden email]> wrote:

> Same question here. Did you figure out how to do it?
>
> Thanks,
> Shangxuan
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/How-can-I-get-fixed-size-text-at-a-position-in-world-space-tp4576921p5742970.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Loading...