[vtkusers] Find polydata coordinates in renderer

David E DeMarle dave.demarle at kitware.com
Wed Aug 8 16:31:57 EDT 2018


vtkRendererer::SetWorldCoordinates(0, 0.007, 0, 0)
vtkRendererer::WorldToDisplay()
vtkRendererer::GetDisplayCoordinate()
Will convert from world space to display space (pixel, z)

When you resize the render window, you will have to call WorldToDisplay()
again to take into account the new size.

See the vtk book for a discussion of the coordinate systems.

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


On Wed, Aug 8, 2018 at 2:49 PM Nick French <nfrench at vextec.com> wrote:

> Hi all,
>
> I have a polydata output that I have created and am visualizing in the C#
> render window control.  What I want to know is the location of the a given
> polydata point in terms of the render window.  I know the points that are
> local to polydata (for example the one I'm interested is something like (0,
> 0.007, 0), but I don't know where this is in the render window screen. I
> assume that this will change with the size of my window as well.  I've seen
> terms like world, view, and display coordinates, but I'm not exactly sure
> what those mean or if they are relevant to the problem at hand.
>
> Thanks
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180808/edb27a4e/attachment.html>


More information about the vtkusers mailing list