[vtkusers] collision detection with vtk?

Cory Quammen cquammen at cs.unc.edu
Fri Aug 23 07:52:14 EDT 2013


Daniel,

I looked at vtkIntersectionPolyData and it wouldn't be as easy as I
though to pull out just the parts you need. Moreover, those parts
won't be as efficient as you might want.

Instead, you might look at vtkCellLocator and in particular the method
FindCellsWithinBounds(). You could build the locator from one geometry
(preferably one that doesn't move) and iterate over each cell in the
other geometry, computing the bounding box for the current cell and
calling FindCellsWithinBounds() to get a list of candidate cells that
might intersect the first geometry. Then you could test whether the
candidate cells intersect with the current cell using
vtkIntersectionPolyDataFilter::TriangleTriangleIntersection. This
assume you have only triangles in your polydatas; if you don't, use
the vtkTriangleFilter.

Hope that helps. Let us know how it goes.

Cory

On Fri, Aug 23, 2013 at 7:03 AM, -Daniel- <ich_daniel at habmalnefrage.de> wrote:
> Yes Cory, it's right.
> I want to detect only whether two polydata intersect.
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/collision-detection-with-vtk-tp5722845p5722991.html
> Sent from the VTK - Users mailing list archive at Nabble.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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers



-- 
Cory Quammen
Research Associate
Department of Computer Science
The University of North Carolina at Chapel Hill



More information about the vtkusers mailing list