예제 #1
0
        public void CheckChangeSection(Point newPosition, ISpatialIndexMember objectToMove, SpatialObjectKey spatialObjectType)
        {
            SpatialTreeNode leafNodeToRemoveFrom = PositionToLeafNode(objectToMove.SpatialIndexPosition);
            SpatialTreeNode leafNodeToAdd        = PositionToLeafNode(newPosition);

            if (leafNodeToRemoveFrom != leafNodeToAdd)
            {
                RemoveFromSection(objectToMove, spatialObjectType);
                leafNodeToAdd.AddSpatialMemeber(spatialObjectType, objectToMove);
            }
        }
예제 #2
0
        public void AddToSection(ISpatialIndexMember objectToAdd, SpatialObjectKey spatialObjectType)
        {
            SpatialTreeNode leafNodeToAdd = PositionToLeafNode(objectToAdd.SpatialIndexPosition);

            leafNodeToAdd.AddSpatialMemeber(spatialObjectType, objectToAdd);
        }