Class Vector3i

java.lang.Object
org.spongepowered.math.vector.Vector3i
All Implemented Interfaces:
Serializable, Comparable<Vector3i>, Vectori

@Immutable public final class Vector3i extends Object implements Vectori, Comparable<Vector3i>, Serializable
See Also:
  • Field Details

    • ZERO

      public static final Vector3i ZERO
    • UNIT_X

      public static final Vector3i UNIT_X
    • UNIT_Y

      public static final Vector3i UNIT_Y
    • UNIT_Z

      public static final Vector3i UNIT_Z
    • ONE

      public static final Vector3i ONE
    • UP

      public static final Vector3i UP
    • FORWARD

      public static final Vector3i FORWARD
  • Constructor Details

    • Vector3i

      public Vector3i(Vector2i v)
    • Vector3i

      public Vector3i(Vector2i v, double z)
    • Vector3i

      public Vector3i(Vector2i v, int z)
    • Vector3i

      public Vector3i(Vector4i v)
    • Vector3i

      public Vector3i(VectorNi v)
    • Vector3i

      public Vector3i(double x, double y, double z)
    • Vector3i

      public Vector3i(int x, int y, int z)
  • Method Details

    • x

      public int x()
    • withX

      public Vector3i withX(int x)
    • withX

      public Vector3i withX(double x)
    • y

      public int y()
    • withY

      public Vector3i withY(int y)
    • withY

      public Vector3i withY(double y)
    • z

      public int z()
    • withZ

      public Vector3i withZ(int z)
    • withZ

      public Vector3i withZ(double z)
    • add

      public Vector3i add(Vector3i v)
    • add

      public Vector3i add(double x, double y, double z)
    • add

      public Vector3i add(int x, int y, int z)
    • sub

      public Vector3i sub(Vector3i v)
    • sub

      public Vector3i sub(double x, double y, double z)
    • sub

      public Vector3i sub(int x, int y, int z)
    • mul

      public Vector3i mul(double a)
    • mul

      public Vector3i mul(int a)
      Specified by:
      mul in interface Vectori
    • mul

      public Vector3i mul(Vector3i v)
    • mul

      public Vector3i mul(double x, double y, double z)
    • mul

      public Vector3i mul(int x, int y, int z)
    • div

      public Vector3i div(double a)
    • div

      public Vector3i div(int a)
      Specified by:
      div in interface Vectori
    • div

      public Vector3i div(Vector3i v)
    • div

      public Vector3i div(double x, double y, double z)
    • div

      public Vector3i div(int x, int y, int z)
    • dot

      public int dot(Vector3i v)
    • dot

      public int dot(double x, double y, double z)
    • dot

      public int dot(int x, int y, int z)
    • project

      public Vector3i project(Vector3i v)
    • project

      public Vector3i project(double x, double y, double z)
    • project

      public Vector3i project(int x, int y, int z)
    • cross

      public Vector3i cross(Vector3i v)
    • cross

      public Vector3i cross(double x, double y, double z)
    • cross

      public Vector3i cross(int x, int y, int z)
    • pow

      public Vector3i pow(double pow)
    • pow

      public Vector3i pow(int power)
      Specified by:
      pow in interface Vectori
    • abs

      public Vector3i abs()
      Specified by:
      abs in interface Vectori
    • negate

      public Vector3i negate()
      Specified by:
      negate in interface Vectori
    • min

      public Vector3i min(Vector3i v)
    • min

      public Vector3i min(double x, double y, double z)
    • min

      public Vector3i min(int x, int y, int z)
    • max

      public Vector3i max(Vector3i v)
    • max

      public Vector3i max(double x, double y, double z)
    • max

      public Vector3i max(int x, int y, int z)
    • distanceSquared

      public int distanceSquared(Vector3i v)
    • distanceSquared

      public int distanceSquared(double x, double y, double z)
    • distanceSquared

      public int distanceSquared(int x, int y, int z)
    • distance

      public float distance(Vector3i v)
    • distance

      public float distance(double x, double y, double z)
    • distance

      public float distance(int x, int y, int z)
    • lengthSquared

      public int lengthSquared()
      Specified by:
      lengthSquared in interface Vectori
    • length

      public float length()
      Specified by:
      length in interface Vectori
    • minAxis

      public int minAxis()
      Returns the axis with the minimal value.
      Specified by:
      minAxis in interface Vectori
      Returns:
      int axis with minimal value
    • maxAxis

      public int maxAxis()
      Returns the axis with the maximum value.
      Specified by:
      maxAxis in interface Vectori
      Returns:
      int axis with maximum value
    • toVector2

      public Vector2i toVector2()
    • toVector2

      public Vector2i toVector2(boolean useZ)
    • toVector4

      public Vector4i toVector4()
    • toVector4

      public Vector4i toVector4(double w)
    • toVector4

      public Vector4i toVector4(int w)
    • toVectorN

      public VectorNi toVectorN()
    • toArray

      public int[] toArray()
      Specified by:
      toArray in interface Vectori
    • toInt

      public Vector3i toInt()
      Specified by:
      toInt in interface Vectori
    • toLong

      public Vector3l toLong()
      Specified by:
      toLong in interface Vectori
    • toFloat

      public Vector3f toFloat()
      Specified by:
      toFloat in interface Vectori
    • toDouble

      public Vector3d toDouble()
      Specified by:
      toDouble in interface Vectori
    • compareTo

      public int compareTo(Vector3i v)
      Specified by:
      compareTo in interface Comparable<Vector3i>
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

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

      public static Vector3i from(int n)
    • from

      public static Vector3i from(int x, int y, int z)