Class Vec3

java.lang.Object
dev.zwazel.internal.game.transform.Vec3

public class Vec3 extends Object
Vec3 represents a 3D vector in game–space. Game–space convention: forward = +z, up = +y, right = -x.
  • Field Details

    • ZERO

      public static final Vec3 ZERO
    • X

      public static final Vec3 X
    • Y

      public static final Vec3 Y
    • Z

      public static final Vec3 Z
  • Constructor Details

    • Vec3

      public Vec3(double[] values)
  • Method Details

    • subtract

      public Vec3 subtract(Vec3 other)
    • add

      public Vec3 add(Vec3 other)
    • multiply

      public Vec3 multiply(Vec3 other)
    • multiply

      public Vec3 multiply(double scalar)
    • magnitude

      public double magnitude()
    • normalize

      public Vec3 normalize()
    • normalize_or_zero

      public Vec3 normalize_or_zero()
    • getAngle

      public double getAngle()
    • distance

      public double distance(Vec3 other)
    • cross

      public Vec3 cross(Vec3 other)
    • dot

      public double dot(Vec3 other)
    • scale

      public Vec3 scale(double scalar)
    • length

      public double length()