private Vertex VertexFromPoint(OctTree <Vertex> verticesOctTree, GeoPoint closeTo) { Vertex[] close = verticesOctTree.GetObjectsFromPoint(closeTo); for (int i = 0; i < close.Length; i++) { if ((close[i].Position | closeTo) == 0.0) { return(close[i]); } } Vertex res = new Vertex(closeTo); verticesOctTree.AddObject(res); return(res); }