spatial
Interface SpatialSearchTreeObject

All Superinterfaces:
SpatialSearchTreeEntry
All Known Subinterfaces:
LayerSpatialSearchTreeObject, MovingSpatialSearchTreeObject, VisualizedSpatialSearchTreeObject
All Known Implementing Classes:
DrawableSpatialSearchTreeObject, ExternalObject

public interface SpatialSearchTreeObject
extends SpatialSearchTreeEntry

Interface describing an object in a spatial search tree.


Method Summary
 double computeDistanceTo(int[] point)
          Computes the distance to a given point.
 boolean contains(MBR rect)
          Tests whether the object contains a given rectangle or not.
 void draw(java.awt.Graphics g, int scale)
          Draws the object.
 long getId()
          Returns the identifier of the object.
 boolean intersects(MBR r)
          Tests whether the object intersects a given rectangle.
 boolean intersects(java.lang.Object obj)
          Tests whether the object intersects another object.
 boolean isContainedBy(MBR rect)
          Tests whether the object is contained by a given rectangle or not.
 boolean isContainedBy(SpatialSearchTreeEntry entry)
          Tests whether the object is contained by a given entry or not.
 boolean isOfSameType(SpatialSearchTreeObject obj)
          Tests whether the object is of the same type as the given object or not.
 
Methods inherited from interface spatial.SpatialSearchTreeEntry
getMBR, getNumOfDimensions
 

Method Detail

computeDistanceTo

public double computeDistanceTo(int[] point)
Computes the distance to a given point.

Parameters:
point - coordinates of the point
Returns:
the distance

contains

public boolean contains(MBR rect)
Tests whether the object contains a given rectangle or not.

Parameters:
rect - the rectangle
Returns:
contains?

draw

public void draw(java.awt.Graphics g,
                 int scale)
Draws the object.

Parameters:
g - graphic context
scale - the current scale

getId

public long getId()
Returns the identifier of the object.

Returns:
the ID

intersects

public boolean intersects(java.lang.Object obj)
Tests whether the object intersects another object.

Parameters:
obj - the object
Returns:
intersects?

intersects

public boolean intersects(MBR r)
Tests whether the object intersects a given rectangle.

Parameters:
r - the rectangle
Returns:
intersects?

isContainedBy

public boolean isContainedBy(MBR rect)
Tests whether the object is contained by a given rectangle or not.

Parameters:
rect - the rectangle
Returns:
is contained?

isContainedBy

public boolean isContainedBy(SpatialSearchTreeEntry entry)
Tests whether the object is contained by a given entry or not.

Parameters:
entry - the entry
Returns:
is contained?

isOfSameType

public boolean isOfSameType(SpatialSearchTreeObject obj)
Tests whether the object is of the same type as the given object or not.

Parameters:
obj - the other object
Returns:
is of same type?