- 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:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector3i
abs()
Vector3i
add(double x, double y, double z)
Vector3i
add(int x, int y, int z)
Vector3i
add(Vector3i v)
int
compareTo(Vector3i v)
Vector3i
cross(double x, double y, double z)
Vector3i
cross(int x, int y, int z)
Vector3i
cross(Vector3i v)
float
distance(double x, double y, double z)
float
distance(int x, int y, int z)
float
distance(Vector3i v)
int
distanceSquared(double x, double y, double z)
int
distanceSquared(int x, int y, int z)
int
distanceSquared(Vector3i v)
Vector3i
div(double a)
Vector3i
div(double x, double y, double z)
Vector3i
div(int a)
Vector3i
div(int x, int y, int z)
Vector3i
div(Vector3i v)
int
dot(double x, double y, double z)
int
dot(int x, int y, int z)
int
dot(Vector3i v)
boolean
equals(Object other)
static Vector3i
from(int n)
static Vector3i
from(int x, int y, int z)
int
hashCode()
float
length()
int
lengthSquared()
Vector3i
max(double x, double y, double z)
Vector3i
max(int x, int y, int z)
Vector3i
max(Vector3i v)
int
maxAxis()
Returns the axis with the maximum value.Vector3i
min(double x, double y, double z)
Vector3i
min(int x, int y, int z)
Vector3i
min(Vector3i v)
int
minAxis()
Returns the axis with the minimal value.Vector3i
mul(double a)
Vector3i
mul(double x, double y, double z)
Vector3i
mul(int a)
Vector3i
mul(int x, int y, int z)
Vector3i
mul(Vector3i v)
Vector3i
negate()
Vector3i
pow(double pow)
Vector3i
pow(int power)
Vector3i
project(double x, double y, double z)
Vector3i
project(int x, int y, int z)
Vector3i
project(Vector3i v)
Vector3i
sub(double x, double y, double z)
Vector3i
sub(int x, int y, int z)
Vector3i
sub(Vector3i v)
int[]
toArray()
Vector3d
toDouble()
Vector3f
toFloat()
Vector3i
toInt()
Vector3l
toLong()
String
toString()
Vector2i
toVector2()
Vector2i
toVector2(boolean useZ)
Vector4i
toVector4()
Vector4i
toVector4(double w)
Vector4i
toVector4(int w)
VectorNi
toVectorN()
int
x()
int
y()
int
z()
-
-
-
Field Detail
-
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
-
RIGHT
public static final Vector3i RIGHT
-
UP
public static final Vector3i UP
-
FORWARD
public static final Vector3i FORWARD
-
-
Constructor Detail
-
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 Detail
-
x
public int x()
-
y
public int y()
-
z
public int z()
-
add
public Vector3i add(double x, double y, double z)
-
add
public Vector3i add(int x, int y, int z)
-
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(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(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(double x, double y, double z)
-
project
public Vector3i project(int x, int y, int z)
-
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)
-
min
public Vector3i min(double x, double y, double z)
-
min
public Vector3i min(int x, int y, int z)
-
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 interfaceVectori
-
minAxis
public int minAxis()
Returns the axis with the minimal value.
-
maxAxis
public int maxAxis()
Returns the axis with the 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()
-
compareTo
public int compareTo(Vector3i v)
- Specified by:
compareTo
in interfaceComparable<Vector3i>
-
from
public static Vector3i from(int n)
-
from
public static Vector3i from(int x, int y, int z)
-
-