|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectRay2D
public class Ray2D
This class contains methods to handle Ray2D objects.
Constructor Summary | |
---|---|
Ray2D()
Constructor to create a Ray2D . |
|
Ray2D(Vector2 p,
Vector2 d)
Constructor to create a Ray2D . |
Method Summary | |
---|---|
Vector2 |
getDirection()
Returns the direction of the Ray2D . |
Vector2 |
getPoint()
Returns the starting point of the Ray2D . |
Vector2 |
getPosition(float t)
Returns a position along a Ray2D |
Vector2 |
getXForY(float y)
Returns a position along a Ray2D knowing the y-value |
Vector2 |
getYForX(float x)
Returns a position along a Ray2D knowing the x-value |
void |
setDirection(Vector2 d)
Sets a new direction to the Ray2D . |
void |
setPoint(Vector2 p)
Sets a new starting point to the Ray2D . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Ray2D(Vector2 p, Vector2 d)
Ray2D
.
p
- a Vector2
containing the startposition of the ray.d
- a Vector2
containing the direction of the ray.public Ray2D()
Ray2D
.
Method Detail |
---|
public void setDirection(Vector2 d)
Ray2D
.
d
- a Vector2
containing the new direction.public void setPoint(Vector2 p)
Ray2D
.
p
- a Vector2
containing the new startpoint.public Vector2 getDirection()
Ray2D
.
Vector2
containing the direction.public Vector2 getPoint()
Ray2D
.
Vector2
containing the point.public Vector2 getPosition(float t)
Ray2D
t
- the parameter
Vector2
containing the position.public Vector2 getYForX(float x)
Ray2D
knowing the x-value
x
- the x-value of the position
Vector2
containing the position.public Vector2 getXForY(float y)
Ray2D
knowing the y-value
y
- the y-value of the position
Vector2
containing the position.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |