示例#1
0
		/** Removes the specified mesh from the tree.
		 * Assumes that it has the correct bounds information.
		 * 
		 * \returns True if the mesh was removed from the tree, false otherwise.
		 */
		public bool Remove (RecastMeshObj mesh) {
			
			if (mesh == null) throw new ArgumentNullException("mesh");
			
			if (root == null) {
				return false;
			}
			
			bool found = false;
			Bounds b = mesh.GetBounds();
			//Convert to top down rect
			Rect r = Rect.MinMaxRect (b.min.x, b.min.z, b.max.x, b.max.z);
			
			root = RemoveBox (root, mesh, r, ref found);
			
			return found;
		}