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
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description Vec3d
add(double x, double y, double z)
Vec3d
add(Vec3d vec)
Vec3d
crossProduct(Vec3d vec)
double
distanceTo(Vec3d vec)
double
dotProduct(Vec3d vec)
boolean
equals(Object o)
Vec3d
floorAlongAxes(EnumSet<Direction.Axis> axes)
static Vec3d
fromPolar(float pitch, float yaw)
static Vec3d
fromPolar(Vec2f polar)
double
getComponentAlongAxis(Direction.Axis axis)
double
getX()
double
getY()
double
getZ()
int
hashCode()
boolean
isInRange(Position pos, double radius)
double
length()
double
lengthSquared()
Vec3d
multiply(double mult)
Vec3d
multiply(double multX, double multY, double multZ)
Vec3d
multiply(Vec3d mult)
Vec3d
negate()
Vec3d
normalize()
static Vec3d
of(Vec3i vec)
static Vec3d
ofBottomCenter(Vec3i vec)
static Vec3d
ofCenter(Vec3i vec)
static Vec3d
ofCenter(Vec3i vec, double deltaY)
Vec3d
reverseSubtract(Vec3d vec)
Vec3d
rotateX(float angle)
Vec3d
rotateY(float angle)
Vec3d
rotateZ(float angle)
double
squaredDistanceTo(double x, double y, double z)
double
squaredDistanceTo(Vec3d vec)
Vec3d
subtract(double x, double y, double z)
Vec3d
subtract(Vec3d vec)
String
toString()
static Vec3d
unpackRgb(int rgb)
-
Field Details
-
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
-
rotateX
-
rotateY
-
rotateZ
-
fromPolar
-
fromPolar
-
floorAlongAxes
-
getComponentAlongAxis
-
getX
public final double getX() -
getY
public final double getY() -
getZ
public final double getZ()
-