com.threerings.tudey.space
Interface SpaceElement

All Superinterfaces:
SpaceObject
All Known Implementing Classes:
ShapeElement, SimpleSpaceElement

public interface SpaceElement
extends SpaceObject

Interface for elements that can be embedded into spaces.


Method Summary
 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.
 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 none)
          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 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 interface com.threerings.tudey.space.SpaceObject
getBounds, updateLastVisit
 

Method Detail

getUserObject

Object getUserObject()
Returns this element's user object reference.


wasAdded

void wasAdded(Space space)
Notes that the element was added to the specified space.


willBeRemoved

void willBeRemoved()
Notes that the element will be removed from the space.


getIntersection

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).

Returns:
true if the ray intersected the element (in which case the result will contain the point of intersection), false otherwise.

getNearestPoint

void getNearestPoint(Vector2f point,
                     Vector2f result)
Finds the nearest point of this element to the supplied point and places it in the supplied vector.


intersects

boolean intersects(Point point)
Determines whether this element intersects the supplied point.


intersects

boolean intersects(Segment segment)
Determines whether this element intersects the supplied segment.


intersects

boolean intersects(Circle circle)
Determines whether this element intersects the supplied circle.


intersects

boolean intersects(Capsule capsule)
Determines whether this element intersects the supplied capsule.


intersects

boolean intersects(Polygon polygon)
Determines whether this element intersects the supplied polygon.


intersects

boolean intersects(Compound compound)
Determines whether this element intersects the supplied compound.


intersects

boolean intersects(None none)
Determines whether this element intersects the supplied none.



Copyright © 2011. All Rights Reserved.