com.threerings.tudey.space
Class SimpleSpace
java.lang.Object
com.threerings.tudey.space.Space
com.threerings.tudey.space.SimpleSpace
public class SimpleSpace
- extends Space
A simple, "flat" space implementation.
SimpleSpace
public SimpleSpace()
getIntersection
public SpaceElement getIntersection(Ray2D ray,
Vector2f location,
Predicate<? super SpaceElement> filter)
- Description copied from class:
Space
- Checks for an intersection between the provided ray and the contents of the space.
- Specified by:
getIntersection in class Space
location - a vector to populate with the location of the intersection, if any.filter - a predicate to use in filtering the results of the test.
- Returns:
- a reference to the first element intersected by the ray, or
null for
none.
getIntersecting
public void getIntersecting(Shape shape,
Collection<SpaceElement> results)
- Description copied from class:
Space
- Retrieves all space elements that intersect the provided shape.
- Specified by:
getIntersecting in class Space
results - a collection to hold the results of the search.
getElements
public void getElements(Rect bounds,
Collection<SpaceElement> results)
- Description copied from class:
Space
- Retrieves all space elements whose bounds intersect the provided region.
- Specified by:
getElements in class Space
results - a list to hold the results of the search.
Copyright © 2011. All Rights Reserved.