public class Raytrace
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected Point |
dest
Destination of the ray trace.
|
protected Ray |
ray
Ray describing the ray trace.
|
protected Point |
src
Source of the ray trace.
|
| Constructor and Description |
|---|
Raytrace(Point src,
Point dest)
Instanciate a new
Raytrace. |
Raytrace(Ray ray)
Instanciate a new
Raytrace. |
Raytrace(net.minecraft.util.math.Vec3d src,
net.minecraft.util.math.Vec3d dest)
Instanciate a new
Raytrace. |
| Modifier and Type | Method and Description |
|---|---|
Vector |
direction()
Gets the direction vector of the ray.
|
double |
distance()
Gets the length of the ray.
|
static net.minecraft.util.math.RayTraceResult |
getClosestHit(net.minecraft.util.math.RayTraceResult.Type hitType,
Point src,
net.minecraft.util.math.RayTraceResult result1,
net.minecraft.util.math.RayTraceResult result2)
Gets the closest
RayTraceResult to the source. |
Point |
getDestination()
Gets the destination of this
Raytrace. |
Point |
getSource()
Gets the source of this
Raytrace |
void |
setLength(double length)
Sets the length of this
Raytrace. |
org.apache.commons.lang3.tuple.Pair<net.minecraft.util.EnumFacing,Point> |
trace(net.minecraft.util.math.AxisAlignedBB... aabbs) |
protected Point src
protected Point dest
protected Ray ray
public Raytrace(Point src, Point dest)
Raytrace.src - the srcdest - the destpublic Raytrace(net.minecraft.util.math.Vec3d src,
net.minecraft.util.math.Vec3d dest)
Raytrace.src - the srcdest - the destpublic Point getDestination()
Raytrace.public Vector direction()
public double distance()
public void setLength(double length)
Raytrace.length - the new lengthpublic org.apache.commons.lang3.tuple.Pair<net.minecraft.util.EnumFacing,Point> trace(net.minecraft.util.math.AxisAlignedBB... aabbs)
public static net.minecraft.util.math.RayTraceResult getClosestHit(net.minecraft.util.math.RayTraceResult.Type hitType,
Point src,
net.minecraft.util.math.RayTraceResult result1,
net.minecraft.util.math.RayTraceResult result2)
RayTraceResult to the source.src - the srcresult1 - the mop1result2 - the mop2