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 Vec3fNEGATIVE_Xstatic Vec3fNEGATIVE_Ystatic Vec3fNEGATIVE_Zstatic Vec3fPOSITIVE_Xstatic Vec3fPOSITIVE_Ystatic Vec3fPOSITIVE_Zprivate floatxprivate floatyprivate floatz -
Constructor Summary
-
Method Summary
Modifier and Type Method Description voidadd(float x, float y, float z)voidadd(Vec3f vector)voidclamp(float min, float max)Vec3fcopy()voidcross(Vec3f vector)floatdot(Vec3f other)booleanequals(Object o)QuaterniongetDegreesQuaternion(float angle)QuaterniongetRadialQuaternion(float angle)floatgetX()floatgetY()floatgetZ()inthashCode()voidlerp(Vec3f vector, float delta)voidmodify(Float2FloatFunction function)voidmultiplyComponentwise(float x, float y, float z)booleannormalize()voidrotate(Quaternion rotation)voidscale(float scale)voidset(float x, float y, float z)voidsubtract(Vec3f other)StringtoString()voidtransform(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
-