Package net.minecraft.util.math
Class Vec3d
java.lang.Object
net.minecraft.util.math.Vec3d
- All Implemented Interfaces:
Position
public class Vec3d extends Object implements Position
An immutable vector composed of 3 doubles.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description Vec3dadd(double x, double y, double z)Vec3dadd(Vec3d vec)Vec3dcrossProduct(Vec3d vec)doubledistanceTo(Vec3d vec)doubledotProduct(Vec3d vec)booleanequals(Object o)Vec3dfloorAlongAxes(EnumSet<Direction.Axis> axes)static Vec3dfromPolar(float pitch, float yaw)static Vec3dfromPolar(Vec2f polar)doublegetComponentAlongAxis(Direction.Axis axis)doublegetX()doublegetY()doublegetZ()inthashCode()booleanisInRange(Position pos, double radius)doublelength()doublelengthSquared()Vec3dmethod_33068(Vec3d vec3d, double double2)Vec3dmultiply(double mult)Vec3dmultiply(double multX, double multY, double multZ)Vec3dmultiply(Vec3d mult)Vec3dnegate()Vec3dnormalize()static Vec3dof(Vec3i vec)static Vec3dofBottomCenter(Vec3i vec)static Vec3dofCenter(Vec3i vec)static Vec3dofCenter(Vec3i vec, double deltaY)Vec3dreverseSubtract(Vec3d vec)Vec3drotateX(float angle)Vec3drotateY(float angle)Vec3drotateZ(float angle)doublesquaredDistanceTo(double x, double y, double z)doublesquaredDistanceTo(Vec3d vec)Vec3dsubtract(double x, double y, double z)Vec3dsubtract(Vec3d vec)StringtoString()static Vec3dunpackRgb(int rgb)
-
Field Details
-
field_28243
-
ZERO
-
x
public final double x -
y
public final double y -
z
public final double z
-
-
Constructor Details
-
Vec3d
public Vec3d(double x, double y, double z) -
Vec3d
-
-
Method Details
-
unpackRgb
-
ofCenter
-
of
-
ofBottomCenter
-
ofCenter
-
reverseSubtract
-
normalize
-
dotProduct
-
crossProduct
-
subtract
-
subtract
-
add
-
add
-
isInRange
-
distanceTo
-
squaredDistanceTo
-
squaredDistanceTo
public double squaredDistanceTo(double x, double y, double z) -
multiply
-
negate
-
multiply
-
multiply
-
length
public double length() -
lengthSquared
public double lengthSquared() -
equals
-
hashCode
public int hashCode() -
toString
-
method_33068
-
rotateX
-
rotateY
-
rotateZ
-
fromPolar
-
fromPolar
-
floorAlongAxes
-
getComponentAlongAxis
-
getX
public final double getX() -
getY
public final double getY() -
getZ
public final double getZ()
-