Class Vec3f

java.lang.Object
net.minecraft.util.math.Vec3f

public final class Vec3f
extends Object
A mutable vector composed of 3 floats.
  • Field Details

    • NEGATIVE_X

      public static Vec3f NEGATIVE_X
    • POSITIVE_X

      public static Vec3f POSITIVE_X
    • NEGATIVE_Y

      public static Vec3f NEGATIVE_Y
    • POSITIVE_Y

      public static Vec3f POSITIVE_Y
    • NEGATIVE_Z

      public static Vec3f NEGATIVE_Z
    • POSITIVE_Z

      public static Vec3f 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

      public Vec3f​(Vec3d other)
  • Method Details

    • equals

      public boolean equals​(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • 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

      @Environment(CLIENT) public void add​(Vec3f vector)
    • subtract

      @Environment(CLIENT) public void subtract​(Vec3f other)
    • dot

      @Environment(CLIENT) public float dot​(Vec3f other)
    • normalize

      @Environment(CLIENT) public boolean normalize()
    • cross

      @Environment(CLIENT) public void cross​(Vec3f vector)
    • transform

      @Environment(CLIENT) public void transform​(Matrix3f matrix3f)
    • rotate

      public void rotate​(Quaternion rotation)
    • lerp

      @Environment(CLIENT) public void lerp​(Vec3f vector, float delta)
    • getRadialQuaternion

      @Environment(CLIENT) public Quaternion getRadialQuaternion​(float angle)
    • getDegreesQuaternion

      @Environment(CLIENT) public Quaternion getDegreesQuaternion​(float angle)
    • copy

      @Environment(CLIENT) public Vec3f copy()
    • modify

      @Environment(CLIENT) public void modify​(Float2FloatFunction function)
    • toString

      public String toString()
      Overrides:
      toString in class Object