[vtk-developers] vtkBorderWidget events

Karthik Krishnan karthik.krishnan at kitware.com
Tue Oct 26 11:53:31 EDT 2010


On Tue, Oct 26, 2010 at 8:43 PM, Leonardo M. Ramé <l.rame at griensu.com> wrote:
> On 2010-10-26 20:30:12 +0530, Karthik Krishnan wrote:
>
> I need that data to draw my vtkBorderWidget, but again, to draw it I
> have to set its coordinate system to world. If I use
> SetCoordinateSystemToNormalizedViewport I can't see the BorderWidget.
>
> Hope somebody helps me on finding a way to translate the coordinates of
> vtkInteractorStyleRubberBand2D to the normalized viewport of
> vtkBorderRepresentation.

Take a look at vtkCoordinate. It has all the methods you need to
convert a vector from one coordinate system to another. See
(./Rendering/Testing/Cxx/otherCoordinate.cxx) as an example. You
should be able to convert the world coords to NormalizedViewport
coords and then pass them along to the BorderWidget. Isn't that so ?

--
karthik



More information about the vtk-developers mailing list