[vtkusers] Position a widget in display coordinates?

Alex Malyushytsky malyushytsky at gmail.com
Tue Mar 17 22:01:44 EDT 2015


Check link below

http://vtk.org/gitweb?p=VTK.git;a=blob;f=Interaction/Widgets/Testing/Cxx/TestSliderWidget2D.cxx

On Tue, Mar 17, 2015 at 5:07 PM, Totte Karlsson <totte at dunescientific.com>
wrote:

> Hello,
> This question is regarding usage of the  3D slider widget.
> I have been using world coordinates to set the widgets position, and that
> seem to be working fine.
>
> Now, however, I would like to simply place the widget horizontally at the
> bottom of the render window.  Whats the right way to do such?
>
> I imagine I would need to go from normalized (2D) display values, say
> (-0.8, -0.8) & (0.8,-0.8) which would be at the bottom of the window, to
> world coordinates (3D).
> Any pointers on how to achieve this?
>
> The widget position would need to be recalculated if the camera changes.
> Thanks,
> tk
>
> --
> .........................
> Totte Karlsson, Ph.D.
> Dune Scientific, LLC
> 425-296 1980 (office)
> 425-780 9648 (cell)
> www.dunescientific.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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150317/2542d631/attachment.html>


More information about the vtkusers mailing list