|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.tudey.space.Space
public abstract class Space
Base class for spaces.
| Constructor Summary | |
|---|---|
Space()
|
|
| Method Summary | |
|---|---|
void |
add(SpaceElement element)
Adds an element to this space. |
void |
boundsDidChange(SpaceElement element)
Notes that the specified space element's bounds have changed. |
void |
boundsWillChange(SpaceElement element)
Notes that the specified space element's bounds are about to change. |
void |
dispose()
Flags this space as having been disposed. |
abstract void |
getElements(Rect bounds,
Collection<SpaceElement> results)
Retrieves all space elements whose bounds intersect the provided region. |
abstract void |
getIntersecting(Shape shape,
Collection<SpaceElement> results)
Retrieves all space elements that intersect the provided shape. |
SpaceElement |
getIntersection(Ray2D ray,
Vector2f location)
Checks for an intersection between the provided ray and the contents of the space. |
abstract SpaceElement |
getIntersection(Ray2D ray,
Vector2f location,
Predicate<? super SpaceElement> filter)
Checks for an intersection between the provided ray and the contents of the space. |
void |
remove(SpaceElement element)
Removes an element from the space. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Space()
| Method Detail |
|---|
public void add(SpaceElement element)
public void remove(SpaceElement element)
public SpaceElement getIntersection(Ray2D ray,
Vector2f location)
location - a vector to populate with the location of the intersection, if any.
null for
none.
public abstract SpaceElement getIntersection(Ray2D ray,
Vector2f location,
Predicate<? super SpaceElement> filter)
filter - a predicate to use in filtering the results of the test.location - a vector to populate with the location of the intersection, if any.
null for
none.
public abstract void getIntersecting(Shape shape,
Collection<SpaceElement> results)
results - a collection to hold the results of the search.
public abstract void getElements(Rect bounds,
Collection<SpaceElement> results)
results - a list to hold the results of the search.public void boundsWillChange(SpaceElement element)
boundsDidChange(SpaceElement) when the change has been effected.
public void boundsDidChange(SpaceElement element)
public void dispose()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||