[vtkusers] efficient vtkViewport::WorldToDisplay() ?

Paul Harris harris.pc at gmail.com
Sun Jul 18 23:15:53 EDT 2010


Does anyone know the answer to this?  Or can point me in the right
direction?
thanks

On 6 July 2010 16:40, Paul Harris <harris.pc at gmail.com> wrote:

> Hi all,
>
> I have written a vtk Picker that works with some rendered points that I
> display.
> I previously tried all sorts of techniques like ray tracing etc but I've
> discovered the most accurate way is to simply check every point I plot
> against the pixel location, by converting each point to the Display
> coordinate with WorldToDisplay()
>
> Unfortunately, that means 100k+ calls to WorldToDisplay(), which is pretty
> damn slow.
>
> How can I make this faster?  I assume I could get the WorldToDisplay
> conversion matrix and then just multiply each point by the matrix.  That
> would be a lot faster... at the moment WorldToDisplay() seems to reconstruct
> the matrix every single time.
>
> thanks,
> Paul
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100719/33e16ae3/attachment.htm>


More information about the vtkusers mailing list