|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.tudey.shape.Shape
public abstract class Shape
A Tudey shape.
| Nested Class Summary | |
|---|---|
static class |
Shape.IntersectionType
Intersection types indicating that the shape does not intersect, intersects, or fully contains, respectively, the parameter. |
| Constructor Summary | |
|---|---|
Shape()
|
|
| Method Summary | |
|---|---|
abstract ShapeConfig |
createConfig()
Creates a config corresponding to this shape. |
abstract void |
draw(boolean outline)
Draws this shape in immediate mode. |
Shape |
expand(float amount)
Expands this shape by the specified amount. |
abstract Shape |
expand(float amount,
Shape result)
Expands this shape, placing the result in the provided object if possible. |
Shape |
expandLocal(float amount)
Expands this shape in-place by the specified amount. |
Rect |
getBounds()
Returns a reference to the bounds of the shape. |
Vector2f |
getCenter()
Retrieves the center of the shape. |
abstract Vector2f |
getCenter(Vector2f result)
Retrieves the center of the shape and places it in the supplied vector. |
abstract boolean |
getIntersection(Ray2D ray,
Vector2f result)
Finds the intersection of a ray with this shape and places it in the supplied vector (if it exists). |
abstract Shape.IntersectionType |
getIntersectionType(Rect rect)
Checks whether the intersector intersects the specified rect. |
abstract void |
getNearestPoint(Vector2f point,
Vector2f result)
Fins the nearest point of this element to the supplied point and places it in the supplied vector. |
abstract Vector2f |
getPenetration(Capsule capsule,
Vector2f result)
Finds the penetration of the specified capsule into this shape. |
abstract Vector2f |
getPenetration(Circle circle,
Vector2f result)
Finds the penetration of the specified circle into this shape. |
abstract Vector2f |
getPenetration(Compound compound,
Vector2f result)
Finds the penetration of the specified compound into this shape. |
Vector2f |
getPenetration(None none,
Vector2f result)
Shapes never penetrate none. |
abstract Vector2f |
getPenetration(Point point,
Vector2f result)
Finds the penetration of the specified point into this shape. |
abstract Vector2f |
getPenetration(Polygon polygon,
Vector2f result)
Finds the penetration of the specified polygon into this shape. |
abstract Vector2f |
getPenetration(Segment segment,
Vector2f result)
Finds the penetration of the specified segment into this shape. |
abstract Vector2f |
getPenetration(Shape shape,
Vector2f result)
Finds the penetration of the specified shape into this one, assuming that they intersect. |
Vector2f[] |
getPerimeterPath()
Returns a perimeter path for this shape. |
abstract boolean |
intersects(Capsule capsule)
Checks for an intersection with this shape and the specified capsule. |
abstract boolean |
intersects(Circle circle)
Checks for an intersection with this shape and the specified circle. |
abstract boolean |
intersects(Compound compound)
Checks for an intersection with this shape and the specified compound. |
boolean |
intersects(None none)
Shapes can never intserct none. |
abstract boolean |
intersects(Point point)
Checks for an intersection with this shape and the specified point. |
abstract boolean |
intersects(Polygon polygon)
Checks for an intersection with this shape and the specified polygon. |
abstract boolean |
intersects(Segment segment)
Checks for an intersection with this shape and the specified segment. |
abstract boolean |
intersects(Shape shape)
Determines whether this shape intersects the specified shape. |
abstract boolean |
intersects(SpaceElement element)
Determines whether this shape intersects the specified element. |
Shape |
sweep(Vector2f translation)
Computes the shape created by sweeping this shape along the specified translation vector. |
abstract Shape |
sweep(Vector2f translation,
Shape result)
Computes the shape created by sweeping this shape along the specified translation vector, placing the result in the provided object if possible. |
Shape |
transform(Transform2D transform)
Transforms this shape. |
abstract Shape |
transform(Transform2D transform,
Shape result)
Transforms this shape, placing the result in the provided object if possible. |
Shape |
transformLocal(Transform2D transform)
Transforms this shape in-place. |
abstract void |
updateBounds()
Updates the bounds of the shape. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Shape()
| Method Detail |
|---|
public Rect getBounds()
public abstract void updateBounds()
public Vector2f getCenter()
public abstract Vector2f getCenter(Vector2f result)
public Shape transformLocal(Transform2D transform)
public Shape transform(Transform2D transform)
public abstract Shape transform(Transform2D transform,
Shape result)
public Shape expandLocal(float amount)
public Shape expand(float amount)
public abstract Shape expand(float amount,
Shape result)
public Shape sweep(Vector2f translation)
public abstract Shape sweep(Vector2f translation,
Shape result)
public Vector2f[] getPerimeterPath()
public abstract boolean getIntersection(Ray2D ray,
Vector2f result)
public abstract void getNearestPoint(Vector2f point,
Vector2f result)
public abstract Shape.IntersectionType getIntersectionType(Rect rect)
public abstract boolean intersects(SpaceElement element)
SpaceElement.intersects(com.threerings.tudey.shape.Point).
public abstract boolean intersects(Shape shape)
public abstract boolean intersects(Point point)
public abstract boolean intersects(Segment segment)
public abstract boolean intersects(Circle circle)
public abstract boolean intersects(Capsule capsule)
public abstract boolean intersects(Polygon polygon)
public abstract boolean intersects(Compound compound)
public boolean intersects(None none)
public abstract Vector2f getPenetration(Shape shape,
Vector2f result)
public abstract Vector2f getPenetration(Point point,
Vector2f result)
public abstract Vector2f getPenetration(Segment segment,
Vector2f result)
public abstract Vector2f getPenetration(Circle circle,
Vector2f result)
public abstract Vector2f getPenetration(Capsule capsule,
Vector2f result)
public abstract Vector2f getPenetration(Polygon polygon,
Vector2f result)
public abstract Vector2f getPenetration(Compound compound,
Vector2f result)
public Vector2f getPenetration(None none,
Vector2f result)
public abstract void draw(boolean outline)
outline - if true, draw the outline of the shape; otherwise, the solid form.public abstract ShapeConfig createConfig()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||