|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.tudey.space.SimpleSpaceElement
public abstract class SimpleSpaceElement
A simple implementation of the SpaceElement interface.
| Constructor Summary | |
|---|---|
SimpleSpaceElement()
|
|
| Method Summary | |
|---|---|
Rect |
getBounds()
Returns a reference to the bounds of the object. |
boolean |
getIntersection(Ray2D ray,
Vector2f result)
Finds the intersection of a ray with this element and places it in the supplied vector (if it exists). |
void |
getNearestPoint(Vector2f point,
Vector2f result)
Finds the nearest point of this element to the supplied point and places it in the supplied vector. |
Space |
getSpace()
Returns a reference to the space to which this element has been added, if any. |
Transform2D |
getTransform()
Returns a reference to the transform of the element. |
Object |
getUserObject()
Returns this element's user object reference. |
boolean |
intersects(Capsule capsule)
Determines whether this element intersects the supplied capsule. |
boolean |
intersects(Circle circle)
Determines whether this element intersects the supplied circle. |
boolean |
intersects(Compound compound)
Determines whether this element intersects the supplied compound. |
boolean |
intersects(None compound)
Determines whether this element intersects the supplied none. |
boolean |
intersects(Point point)
Determines whether this element intersects the supplied point. |
boolean |
intersects(Polygon polygon)
Determines whether this element intersects the supplied polygon. |
boolean |
intersects(Segment segment)
Determines whether this element intersects the supplied segment. |
void |
setTransform(Transform2D transform)
Sets the transform to the specified value and promotes it to Transform2D.UNIFORM,
then updates the bounds of the element. |
void |
setUserObject(Object object)
Sets the element's user object reference. |
abstract void |
updateBounds()
Updates the bounds of the element. |
boolean |
updateLastVisit(int visit)
Checks and updates the last visit value. |
void |
wasAdded(Space space)
Notes that the element was added to the specified space. |
void |
willBeRemoved()
Notes that the element will be removed from the space. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleSpaceElement()
| Method Detail |
|---|
public void setUserObject(Object object)
public void setTransform(Transform2D transform)
Transform2D.UNIFORM,
then updates the bounds of the element.
public Transform2D getTransform()
public Space getSpace()
public abstract void updateBounds()
public Object getUserObject()
SpaceElement
getUserObject in interface SpaceElementpublic void wasAdded(Space space)
SpaceElement
wasAdded in interface SpaceElementpublic void willBeRemoved()
SpaceElement
willBeRemoved in interface SpaceElement
public boolean getIntersection(Ray2D ray,
Vector2f result)
SpaceElement
getIntersection in interface SpaceElement
public void getNearestPoint(Vector2f point,
Vector2f result)
SpaceElement
getNearestPoint in interface SpaceElementpublic boolean intersects(Point point)
SpaceElement
intersects in interface SpaceElementpublic boolean intersects(Segment segment)
SpaceElement
intersects in interface SpaceElementpublic boolean intersects(Circle circle)
SpaceElement
intersects in interface SpaceElementpublic boolean intersects(Capsule capsule)
SpaceElement
intersects in interface SpaceElementpublic boolean intersects(Polygon polygon)
SpaceElement
intersects in interface SpaceElementpublic boolean intersects(Compound compound)
SpaceElement
intersects in interface SpaceElementpublic boolean intersects(None compound)
SpaceElement
intersects in interface SpaceElementpublic Rect getBounds()
SpaceObject
getBounds in interface SpaceObjectpublic boolean updateLastVisit(int visit)
SpaceObject
updateLastVisit in interface SpaceObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||