#region CPL License
/*
Nuclex Framework
Copyright (C) 2002-2011 Nuclex Development Labs
This library is free software; you can redistribute it and/or
modify it under the terms of the IBM Common Public License as
published by the IBM Corporation; either version 1.0 of the
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
IBM Common Public License for more details.
You should have received a copy of the IBM Common Public
License along with this library
*/
#endregion
#if ENABLE_RTREES
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
namespace Nuclex.Game.Space {
/// Rectangle Tree (R-Tree) for two-dimensional data
///
///
/// An R-Tree serves a similar purpose to a Quad-Tree, but doesn't require
/// a predefined "universe size" and is not prone to the splitting issues
/// observed in a Quad-Tree which can only subdivide quadrants along
/// predefined lines, making it very expensive to split large numbers of
/// nodes grouped in small areas.
///
///
public partial class RectangleTree : SpatialIndex2
where ItemType : IBoundingRectangleProvider {
/// Initializes a new rectangle tree
public RectangleTree() {
this.root = new Node();
this.root.IsLeaf = true;
}
/// Queries the spatial database for all objects in a region
/// Region of which the objects will be returned
/// All objects in the queried region
public override IEnumerable Query(BoundingRectangle region) {
throw new NotImplementedException();
}
/// Inserts an object into the spatial database
/// Item that will be inserted
public override void Insert(ItemType itemToAdd) {
throw new NotImplementedException();
}
/// Removes an object from the spatial database
/// Item that will be removed
public override void Remove(ItemType itemToRemove) {
throw new NotImplementedException();
}
/// Updates the position of an object in the spatial database
/// Item whose bounding rectangle has changed
public override void Update(ItemType itemToUpdate) {
throw new NotImplementedException();
}
/// The root node of the tree
private Node root;
}
} // namespace Nuclex.Game.Space
#endif // ENABLE_RTREES