[vtkusers] Text always on top

David E DeMarle dave.demarle at kitware.com
Mon Jun 3 09:08:47 EDT 2013


Add a second renderer to the renderwindow and use SetLayer to make the
second renderer be above the first.
Put the text actor in the second renderer and make sure that both renderers
get the same camera.


David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Mon, Jun 3, 2013 at 8:26 AM, Max <smapersmaper at gmail.com> wrote:

> Hi David,
> In these examples the text is shown at some corner.
> I have a vtkVectorText which is part if the scene. Code:
>
>  vtkVectorText vectorText = new vtkVectorText();
>             vectorText.SetText(text);
>
>             vtkPolyDataMapper textMapper = vtkPolyDataMapper.New();
>             textMapper.SetInputConnection(vectorText.GetOutputPort());
>
>             //face the text always to the camera
>             TextActor = new vtkFollower();
>             TextActor.SetMapper(textMapper);
>             TextActor.SetCamera(activeCamera);
>             TextActor.GetProperty().SetColor(color.R, color.G, color.B);
>             TextActor.SetPosition(textLocation.X, textLocation.Y,
> textLocation.Z);
>             TextActor.SetScale(5);
>
> The only problem is that when the text is behind an object i cannot see it.
> How can i make it appear all the time?
>
> Thank you,
> Max
>
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Text-always-on-top-tp5721132p5721141.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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130603/43008cec/attachment.htm>


More information about the vtkusers mailing list