Package net.minecraft.util.math
Class Vec3f
java.lang.Object
net.minecraft.util.math.Vec3f
public final class Vec3f extends Object
A mutable vector composed of 3 floats.
-
Field Summary
Fields Modifier and Type Field Description static Vec3f
NEGATIVE_X
static Vec3f
NEGATIVE_Y
static Vec3f
NEGATIVE_Z
static Vec3f
POSITIVE_X
static Vec3f
POSITIVE_Y
static Vec3f
POSITIVE_Z
private float
x
private float
y
private float
z
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description void
add(float x, float y, float z)
void
add(Vec3f vector)
void
clamp(float min, float max)
Vec3f
copy()
void
cross(Vec3f vector)
float
dot(Vec3f other)
boolean
equals(Object o)
Quaternion
getDegreesQuaternion(float angle)
Quaternion
getRadialQuaternion(float angle)
float
getX()
float
getY()
float
getZ()
int
hashCode()
void
lerp(Vec3f vector, float delta)
void
modify(Float2FloatFunction function)
void
multiplyComponentwise(float x, float y, float z)
boolean
normalize()
void
rotate(Quaternion rotation)
void
scale(float scale)
void
set(float x, float y, float z)
void
subtract(Vec3f other)
String
toString()
void
transform(Matrix3f matrix3f)
-
Field Details
-
NEGATIVE_X
-
POSITIVE_X
-
NEGATIVE_Y
-
POSITIVE_Y
-
NEGATIVE_Z
-
POSITIVE_Z
-
x
private float x -
y
private float y -
z
private float z
-
-
Constructor Details
-
Vec3f
public Vec3f() -
Vec3f
public Vec3f(float x, float y, float z) -
Vec3f
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
getX
public float getX() -
getY
public float getY() -
getZ
public float getZ() -
scale
@Environment(CLIENT) public void scale(float scale) -
multiplyComponentwise
@Environment(CLIENT) public void multiplyComponentwise(float x, float y, float z) -
clamp
@Environment(CLIENT) public void clamp(float min, float max) -
set
public void set(float x, float y, float z) -
add
@Environment(CLIENT) public void add(float x, float y, float z) -
add
-
subtract
-
dot
-
normalize
@Environment(CLIENT) public boolean normalize() -
cross
-
transform
-
rotate
-
lerp
-
getRadialQuaternion
-
getDegreesQuaternion
-
copy
-
modify
-
toString
-