[vtkusers] ActiViz | vtkKdTree question
Matias Montroull
matimontg at gmail.com
Mon Feb 10 15:23:58 EST 2014
I found the answer:
double min_dist = 0;
var id= kdtree.FindClosestPoint(x,y,z, ref min_dist); //x,y and z are
double values
var closestpoint = kdtree.GetDataSet().GetPoint(id);
Then closestpoint is a double[3] which represents the closest point.
Matias.
On Mon, Feb 10, 2014 at 2:43 PM, Matias Montroull <matimontg at gmail.com>wrote:
> Hi,
>
> I'm trying to use vtkKdTree in C# and I've got to a point where I'm stuck:
>
> This part of the code seems not to work.. It's supposed to get a Double[]
> but instead is trying to access IntPtr..
>
> kdtree.FindClosestPoint
>
> Thank you,
>
> Matias.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140210/166c601d/attachment.html>
More information about the vtkusers
mailing list