public class Ray extends Object implements Serializable
Constructor and Description |
---|
Ray(Vector3 origin,
Vector3 direction)
Constructor, sets the starting position of the ray and the direction.
|
Modifier and Type | Method and Description |
---|---|
Ray |
cpy() |
boolean |
equals(Object o) |
Vector3 |
getEndPoint(Vector3 out,
float distance)
Returns the endpoint given the distance.
|
int |
hashCode() |
Ray |
mul(Matrix4 matrix)
Multiplies the ray by the given matrix.
|
Ray |
set(float x,
float y,
float z,
float dx,
float dy,
float dz)
Sets this ray from the given starting position and direction.
|
Ray |
set(Ray ray)
Sets the starting position and direction from the given ray
|
Ray |
set(Vector3 origin,
Vector3 direction)
Sets the starting position and the direction of this ray.
|
String |
toString() |
public Ray cpy()
public Vector3 getEndPoint(Vector3 out, float distance)
out
- The vector to set to the resultdistance
- The distance from the end point to the start point.public Ray mul(Matrix4 matrix)
matrix
- The matrixpublic Ray set(Vector3 origin, Vector3 direction)
origin
- The starting positiondirection
- The directionpublic Ray set(float x, float y, float z, float dx, float dy, float dz)
x
- The x-component of the starting positiony
- The y-component of the starting positionz
- The z-component of the starting positiondx
- The x-component of the directiondy
- The y-component of the directiondz
- The z-component of the directionpublic Ray set(Ray ray)
ray
- The rayCopyright © 2015. All rights reserved.