public bool BuildKDTree_Rednaxela(PointCloudVertices target) { GlobalVariables.ResetTime(); ResetVerticesLists(target); try { KdTree_Rednaxela = new KDTreeRednaxela.KDTree_Rednaxela <EllipseWrapper>(3); for (int i = 0; i < target.Count; ++i) { Vertex p = target[i]; KdTree_Rednaxela.AddPoint(new float[] { Convert.ToSingle(p.Vector.X), Convert.ToSingle(p.Vector.Y), Convert.ToSingle(p.Vector.Z) }, new EllipseWrapper(p)); } } catch (Exception err) { MessageBox.Show("Error building kd-tree " + err.Message); return(false); } GlobalVariables.ShowLastTimeSpan("Build Tree Rednaxela - Number of points: " + target.Count.ToString() + " : "); return(true); }
public bool BuildKDTree_Rednaxela(List <Vertex> vTarget) { TimeCalc.ResetTime(); try { KdTree_Rednaxela = new KDTreeRednaxela.KDTree_Rednaxela <EllipseWrapper>(3); for (int i = 0; i < vTarget.Count; ++i) { Vertex p = vTarget[i]; KdTree_Rednaxela.AddPoint(new double[] { p.Vector.X, p.Vector.Y, p.Vector.Z }, new EllipseWrapper(p)); } } catch (Exception err) { throw err; } TimeCalc.ShowLastTimeSpan("Build Tree Rednaxala"); return(true); }