[vtkusers] Position a widget in display coordinates?

Totte Karlsson totte at dunescientific.com
Wed Mar 18 15:24:32 EDT 2015


On 3/17/2015 7:01 PM, Alex Malyushytsky wrote:
> Check link below
>
> http://vtk.org/gitweb?p=VTK.git;a=blob;f=Interaction/Widgets/Testing/Cxx/TestSliderWidget2D.cxx
>
Thanks for the link Alex, but this is for the 2D widget. Works fine for 
me too. My problem was with the 3D widget.

I have actually switched to the 2D widget cause I suspect there are bugs 
in the 3D widget causing the erratic positioning. Hope to look in 
further on that later on. The 3D widget is better looking than the 2D 
one imo.

> On Tue, Mar 17, 2015 at 5:07 PM, Totte Karlsson 
> <totte at dunescientific.com <mailto: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 <tel:425-296%201980> (office)
>     425-780 9648 <tel:425-780%209648> (cell)
>     www.dunescientific.com <http://www.dunescientific.com>
>     .........................
>
>     _______________________________________________
>     Powered by www.kitware.com <http://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/20150318/aa9e4daf/attachment.html>


More information about the vtkusers mailing list