|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectRay3d
public class Ray3d
A class for manipulating 3-dimensional rays.
A Ray3d
is specified by an origin point and a direction vector.
Constructor Summary | |
---|---|
Ray3d()
Constructs a new Ray3d with an origin of (0, 0, 0) and a direction of (0,
0, 0). |
|
Ray3d(javax.vecmath.Point3d origin,
javax.vecmath.Vector3d direction)
Constructs a new ray initialized to the specified origin and direction. |
Method Summary | |
---|---|
javax.vecmath.Vector3d |
getDirection()
Returns the direction of the ray. |
javax.vecmath.Point3d |
getOrigin()
Returns the origin of the ray. |
javax.vecmath.Point3d |
interpolate(double time)
Returns the point along the ray that is at the specified time from the origin. |
void |
set(javax.vecmath.Point3d origin,
javax.vecmath.Vector3d direction)
Sets the origin and direction of the ray. |
void |
setDirection(javax.vecmath.Vector3d direction)
Sets the direction of the ray. |
void |
setNormalized(javax.vecmath.Point3d origin,
javax.vecmath.Vector3d direction)
Sets the origin and direction of the ray, after normalizing the direction. |
void |
setOrigin(javax.vecmath.Point3d origin)
Sets the origin of the ray. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Ray3d()
Ray3d
with an origin of (0, 0, 0) and a direction of (0,
0, 0).
public Ray3d(javax.vecmath.Point3d origin, javax.vecmath.Vector3d direction)
origin
- The ray's origin.direction
- The ray's direction.Method Detail |
---|
public void set(javax.vecmath.Point3d origin, javax.vecmath.Vector3d direction)
origin
- The ray's origin.direction
- The ray's direction.public void setNormalized(javax.vecmath.Point3d origin, javax.vecmath.Vector3d direction)
origin
- The ray's origin.direction
- The ray's direction.public javax.vecmath.Point3d interpolate(double time)
time
- The time from the ray's origin.
time
.public void setOrigin(javax.vecmath.Point3d origin)
origin
- The ray's origin.public javax.vecmath.Point3d getOrigin()
public void setDirection(javax.vecmath.Vector3d direction)
direction
- The ray's direction.public javax.vecmath.Vector3d getDirection()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |