public class Ray
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
Vector |
direction
Direction of this
Ray. |
Point |
origin
|
| Constructor and Description |
|---|
Ray(Point p,
Vector v)
Instantiates a new
Ray. |
Ray(Ray r)
Instantiates a new
Ray from a specified one. |
Ray(net.minecraft.util.math.Vec3d src,
net.minecraft.util.math.Vec3d dest)
Instantiates a new
Ray from two Vec3d. |
| Modifier and Type | Method and Description |
|---|---|
Point |
getPointAt(double t)
Gets the
Point at the specified distance. |
java.util.List<org.apache.commons.lang3.tuple.Pair<net.minecraft.util.EnumFacing,Point>> |
intersect(net.minecraft.util.math.AxisAlignedBB aabb)
Finds the points intersecting the
AxisAlignedBB |
double |
intersectX(double x)
Gets the distance to the plane at x.
|
double |
intersectY(double y)
Gets the distance to the plane at y.
|
double |
intersectZ(double z)
Gets the distance to the plane at z.
|
java.lang.String |
toString() |
public Ray(net.minecraft.util.math.Vec3d src,
net.minecraft.util.math.Vec3d dest)
Ray from two Vec3d.src - the srcdest - the destpublic Point getPointAt(double t)
Point at the specified distance.t - the distancepublic double intersectX(double x)
x - the x planepublic double intersectY(double y)
y - the y planepublic double intersectZ(double z)
z - the z planepublic java.util.List<org.apache.commons.lang3.tuple.Pair<net.minecraft.util.EnumFacing,Point>> intersect(net.minecraft.util.math.AxisAlignedBB aabb)
AxisAlignedBBaabb - the aabbpublic java.lang.String toString()
toString in class java.lang.Object