|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jme.math.Ray
Ray defines a line segment which has an origin and a direction.
That is, a point and an infinite ray is cast from this point. The ray is
defined by the following equation: R(t) = origin + t*direction for t >= 0.
| Field Summary | |
Vector3f |
direction
The direction of the ray. |
Vector3f |
origin
The ray's begining point. |
| Constructor Summary | |
Ray()
Constructor instantiates a new Ray object. |
|
Ray(Vector3f origin,
Vector3f direction)
Constructor instantiates a new Ray object. |
|
| Method Summary | |
Vector3f |
getDirection()
getDirection retrieves the direction vector of the ray. |
Vector3f |
getOrigin()
getOrigin retrieves the origin point of the ray. |
boolean |
intersect(Vector3f v0,
Vector3f v1,
Vector3f v2)
|
void |
setDirection(Vector3f direction)
setDirection sets the direction vector of the ray. |
void |
setOrigin(Vector3f origin)
setOrigin sets the origin of the ray. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public Vector3f origin
public Vector3f direction
| Constructor Detail |
public Ray()
Ray object. As default, the
origin is (0,0,0) and the direction is (0,0,0).
public Ray(Vector3f origin,
Vector3f direction)
Ray object. The origin and
direction are given.
origin - the origin of the ray.direction - the direction the ray travels in.| Method Detail |
public boolean intersect(Vector3f v0,
Vector3f v1,
Vector3f v2)
public Vector3f getOrigin()
getOrigin retrieves the origin point of the ray.
public void setOrigin(Vector3f origin)
setOrigin sets the origin of the ray.
origin - the origin of the ray.public Vector3f getDirection()
getDirection retrieves the direction vector of the ray.
public void setDirection(Vector3f direction)
setDirection sets the direction vector of the ray.
direction - the direction of the ray.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||