Class Vector3

java.lang.Object
zombie.iso.Vector3
All Implemented Interfaces:
Cloneable

public final class Vector3 extends Object implements Cloneable
  • Field Details

    • x

      public float x
    • y

      public float y
    • z

      public float z
  • Constructor Details

    • Vector3

      public Vector3()
    • Vector3

      public Vector3(Vector3 other)
    • Vector3

      public Vector3(float x, float y, float z)
  • Method Details

    • fromLengthDirection

      public static Vector2 fromLengthDirection(float length, float direction)
    • dot

      public static float dot(float x, float y, float tx, float ty)
    • rotate

      public void rotate(float rad)
    • rotatey

      public void rotatey(float rad)
    • add

      public Vector2 add(Vector2 other)
    • addToThis

      public Vector3 addToThis(Vector2 other)
    • addToThis

      public Vector3 addToThis(Vector3 other)
    • div

      public Vector3 div(float scalar)
    • aimAt

      public Vector3 aimAt(Vector2 other)
    • angleTo

      public float angleTo(Vector2 other)
    • clone

      public Vector3 clone()
    • distanceTo

      public float distanceTo(Vector2 other)
    • distanceTo

      public float distanceTo(Vector3 other)
    • distanceTo

      public float distanceTo(float x, float y, float z)
    • dot

      public float dot(Vector2 other)
    • dot3d

      public float dot3d(Vector3 other)
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • getDirection

      public float getDirection()
    • setDirection

      public Vector3 setDirection(float direction)
    • getLength

      public float getLength()
    • getLengthSq

      public float getLengthSq()
    • setLength

      public Vector3 setLength(float length)
    • normalize

      public void normalize()
    • set

      public Vector3 set(Vector3 other)
    • set

      public Vector3 set(float x, float y, float z)
    • setLengthAndDirection

      public Vector3 setLengthAndDirection(float direction, float length)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • sub

      public Vector3 sub(Vector3 val, Vector3 out)
    • sub

      public static Vector3 sub(Vector3 a, Vector3 b, Vector3 out)