org.openmali.spatial
Interface SpatialHandle<T>


public interface SpatialHandle<T>

A spatial handle is a reference returned when a spatial object is inserted into a spatial container. This is used to quickly remove the item from the container. For an octree implementation it would be assumed that the handle would be a reference to the octant(s) which hold the item, so it can be quickly removed. If the spatial container at any point moves the location of the object it must guarentee that it updates any internal data contained in their appropriate.


Method Summary
 T getObject()
           
 void recompute()
          Recompute the bounds for the object and place it in the spatial container in the correct place.
 void remove()
          Removes the node from its spatial container.
 

Method Detail

getObject

T getObject()

remove

void remove()
Removes the node from its spatial container.


recompute

void recompute()
Recompute the bounds for the object and place it in the spatial container in the correct place. This generally causes a removal and reintegration.