Re: vtkProgressBar attached to an actor

David Gobbi <[email protected]>
Newsgroups gmane.comp.lib.vtk.user
Message-ID <CANwS1=GTqSb6aqkmrFufi4A-xdeKqyvt6WHKw_rZvzhpwAR=6Q@mail.gmail.com>
Hi Andrea,

A generic way of doing this is to write a callback for vtkRenderer's
StartEvent.  Then every time the renderer is preparing to render the scene,
it will call your callback, and your callback can set the position of the
2D actors.  The vtkCoordinate class provides a convenient way of converting
from 3D to 2D coordinates.

Other than callbacks, I don't think there's any way to do it.  The VTK
label actors can be used to automatically position text at 3D locations,
but there don't seem to be any classes for placing an arbitrary 2D actor at
a 3D location.

  David

On Mon, Dec 3, 2018 at 9:09 AM Andrea Gavana <[email protected]>
wrote:

> Hello everyone,
>
>     I’ve been googling around without much success until now, so I am
> turning to this kind mailing list for suggestions.
>
> I have a 3D scene with multiple unstructured grids and some STL actors at
> defined positions (in 3D). I would like to be able to “attach” a progress
> bar to each of these STL actors - as my scene in rendered in a time
> dependent way, with the user able to go back and forth in time, it would
> make a nice touch for what I’m showing.
>
> Now, it seems to me vtkProgressBarWidget is a 2D animal, so I’m unclear
> how I can place it below the STL actor and anche it there even if the user
> zooms/pans the 3D window.
>
> Maybe what I’m trying to accomplish is simply not possible, but I’m open
> to all suggestions you may have.
>
> Thank you in advance.
>
> Andrea.
>

_______________________________________________
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:
https://public.kitware.com/mailman/listinfo/vtkusers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.