[vtkusers] Check if point is inside convex hull

Dirk Boye body at nabla.org
Wed Nov 11 03:18:23 EST 2009


Hi David,

I created a demo here: 
http://github.com/dirkboye/vtkExamplePointsInConvexHull

I also added it to the Wiki here:
http://www.vtk.org/Wiki/How_to_check_if_points_are_in_a_convex_hull

Cheers,
Dirk

On 11/04/2009 01:54:54 PM, David Doria wrote:
> On Wed, Nov 4, 2009 at 7:23 AM, Bryn Lloyd <blloyd at vision.ee.ethz.ch>
> wrote:
> > Your mesh is a vtkUnstructuredGrid, i.e. it is a vtkDataSet.
> >
> >
> > call the function:
> >
> > vtkDataSet::FindCell(double x[3], vtkCell *cell, vtkIdType cellId,
> double
> > tol2, int &subId, double pcoords[3], double *weights)
> >
> > or any other variant of this function.
> >
> >
> > It returns the cell Id or -1 if no cell was found to contain the
> point.
> 
> 
> Dirk,
> 
> Can you make a simple, self contained demo of this once you get it to
> work and add it to the wiki?
> 
> Thanks,
> 
> David
> _______________________________________________
> 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
> 
> 






More information about the vtkusers mailing list