public class Rayd
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
| Modifier | Constructor and Description |
|---|---|
protected |
Rayd()
Provided only for certain types of serialization that require
no-arg constructors.
|
|
Rayd(com.jme3.math.Ray ray)
Creates a double-precision ray with the same double versions of
origin and direction from the supplied single precision Ray.
|
|
Rayd(Vec3d origin,
Vec3d direction)
Creates a double-precision ray with the specified origin and direction.
|
| Modifier and Type | Method and Description |
|---|---|
Rayd |
clone()
Creates a deep clone of this Ray that has its own origin and direction.
|
double |
distanceSq(Vec3d point,
double limit)
Returns the squared-distance from the specified point to this
ray, where the ray length is limited to the specified limit.
|
boolean |
equals(java.lang.Object o) |
Vec3d |
getClosestPoint(Vec3d point,
double limit,
Vec3d target)
Returns the point on this ray that is closest to the specified
point, clamped to the origin and the specified limit value.
|
Vec3d |
getDirection() |
Vec3d |
getOrigin() |
int |
hashCode() |
double |
intersectSphere(double limit,
Vec3d center,
double radius,
boolean outsideOnly)
Returns the distance along this ray of the nearest intersection to
the specified sphere or -1 if the ray and sphere do not intersect.
|
boolean |
isSimilar(Rayd other,
double epsilon)
Returns true if this Quatd is similar to the specified Quatd within
some value of epsilon.
|
Vec3d |
project(double distance,
Vec3d target)
Returns the point along the ray at the specified distance.
|
Rayd |
set(com.jme3.math.Ray r) |
Rayd |
set(Rayd r) |
Rayd |
set(Vec3d origin,
Vec3d direction) |
void |
setDirection(Vec3d direction) |
void |
setOrigin(Vec3d origin) |
com.jme3.math.Ray |
toRay()
Returns a single-precision version of this ray.
|
java.lang.String |
toString() |
protected Rayd()
public Rayd(Vec3d origin, Vec3d direction)
java.lang.IllegalArgumentException - if origin or direction are null or
direction is non-unit in length.public Rayd(com.jme3.math.Ray ray)
public final void setOrigin(Vec3d origin)
public final Vec3d getOrigin()
public final void setDirection(Vec3d direction)
public final Vec3d getDirection()
public final Rayd set(com.jme3.math.Ray r)
public final Rayd clone()
clone in class java.lang.Objectpublic com.jme3.math.Ray toRay()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic boolean isSimilar(Rayd other, double epsilon)
public Vec3d project(double distance, Vec3d target)
public Vec3d getClosestPoint(Vec3d point, double limit, Vec3d target)
public double distanceSq(Vec3d point, double limit)
public double intersectSphere(double limit,
Vec3d center,
double radius,
boolean outsideOnly)
public java.lang.String toString()
toString in class java.lang.Object