|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.math.Ray2D
public final class Ray2D
A ray consisting of an origin point and a unit direction vector.
| Constructor Summary | |
|---|---|
Ray2D()
Creates an empty (invalid) ray. |
|
Ray2D(Ray2D other)
Copy constructor. |
|
Ray2D(Vector2f origin,
Vector2f direction)
Creates a ray with the values contained in the supplied origin point and unit direction vector. |
|
| Method Summary | |
|---|---|
Vector2f |
getDirection()
Returns a reference to the ray's unit direction vector. |
boolean |
getIntersection(Vector2f center,
float radius,
Vector2f result)
Finds the intersection between the ray and a circle with the given center and radius. |
boolean |
getIntersection(Vector2f start,
Vector2f end,
float radius,
Vector2f result)
Finds the intersection between the ray and a capsule with the given start point, end point, and radius. |
boolean |
getIntersection(Vector2f start,
Vector2f end,
Vector2f result)
Finds the intersection between the ray and a line segment with the given start and end points. |
Vector2f |
getNearestPoint(Vector2f point,
Vector2f result)
Resturns the nearest point on the Ray to the supplied point. |
Vector2f |
getOrigin()
Returns a reference to the ray's point of origin. |
boolean |
intersects(Vector2f pt)
Determines whether the ray intersects the specified point. |
Ray2D |
set(Ray2D other)
Copies the parameters of another ray. |
Ray2D |
set(Vector2f origin,
Vector2f direction)
Sets the ray parameters to the values contained in the supplied vectors. |
String |
toString()
|
Ray2D |
transform(Transform2D transform)
Transforms this ray. |
Ray2D |
transform(Transform2D transform,
Ray2D result)
Transforms this ray, placing the result in the object provided. |
Ray2D |
transformLocal(Transform2D transform)
Transforms this ray in-place. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Ray2D(Vector2f origin,
Vector2f direction)
public Ray2D(Ray2D other)
public Ray2D()
| Method Detail |
|---|
public Vector2f getOrigin()
public Vector2f getDirection()
public Ray2D transformLocal(Transform2D transform)
public Ray2D transform(Transform2D transform)
public Ray2D transform(Transform2D transform,
Ray2D result)
public Ray2D set(Ray2D other)
public Ray2D set(Vector2f origin,
Vector2f direction)
public boolean intersects(Vector2f pt)
public boolean getIntersection(Vector2f start,
Vector2f end,
Vector2f result)
public boolean getIntersection(Vector2f start,
Vector2f end,
float radius,
Vector2f result)
public boolean getIntersection(Vector2f center,
float radius,
Vector2f result)
public Vector2f getNearestPoint(Vector2f point,
Vector2f result)
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||