<div dir="ltr">I found the answer:<div><br></div><div>double min_dist = 0;<br></div><div>var id= kdtree.FindClosestPoint(x,y,z, ref min_dist); //x,y and z are double values<br></div><div>var closestpoint = kdtree.GetDataSet().GetPoint(id);<br>
</div><div>Then closestpoint is a double[3] which represents the closest point.</div><div><br></div><div>Matias.<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 10, 2014 at 2:43 PM, Matias Montroull <span dir="ltr"><<a href="mailto:matimontg@gmail.com" target="_blank">matimontg@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I'm trying to use vtkKdTree in C# and I've got to a point where I'm stuck:</div>
<div><br></div><div>This part of the code seems not to work.. It's supposed to get a Double[] but instead is trying to access IntPtr..</div>
<div><br></div><div>kdtree.FindClosestPoint<br></div><div><br></div><div>Thank you,</div><div><br></div><div>Matias.</div><div><br></div></div>
</blockquote></div><br></div>