[vtkusers] How to monitor actor positions?

Cory Quammen cory.quammen at kitware.com
Mon Jan 5 20:52:09 EST 2015


Hi Totte,

You can use the vtkDistancePolyDataFilter to compute a signed distance
between vtkPolyData:

http://www.vtk.org/doc/nightly/html/classvtkDistancePolyDataFilter.html

After the filter is updated, you can check whether any of the elements
of the point data array named "Distance" are less than or equal to
zero. If so, you have a collision.

Hope that helps,
Cory

On Mon, Jan 5, 2015 at 4:15 PM, Totte Karlsson <totte at dunescientific.com> wrote:
> Hi,
> I wonder if there are any vtk help classes for detecting, monitoring objects
> relative positions?
>
> As a simple test I would like to place two spheres in space, and moving one
> of them close to the other, using the mouse, the feedback will be a change
> in color of the spheres, as a function of say distance between the spheres.
> Is that possible?
>
> I found a vtkCollisionDetectionFilter.cxx class on the web but it don't seem
> to have much of docs :(
>
> 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



-- 
Cory Quammen
R&D Engineer
Kitware, Inc.


More information about the vtkusers mailing list