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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabs()add(double x, double y, double z) add(int x, int y, int z) intcross(double x, double y, double z) cross(int x, int y, int z) floatdistance(double x, double y, double z) floatdistance(int x, int y, int z) floatintdistanceSquared(double x, double y, double z) intdistanceSquared(int x, int y, int z) intdiv(double a) div(double x, double y, double z) div(int a) div(int x, int y, int z) intdot(double x, double y, double z) intdot(int x, int y, int z) intbooleanstatic Vector3ifrom(int n) static Vector3ifrom(int x, int y, int z) inthashCode()floatlength()intmax(double x, double y, double z) max(int x, int y, int z) intmaxAxis()Returns the axis with the maximum value.min(double x, double y, double z) min(int x, int y, int z) intminAxis()Returns the axis with the minimal value.mul(double a) mul(double x, double y, double z) mul(int a) mul(int x, int y, int z) negate()pow(double pow) pow(int power) project(double x, double y, double z) project(int x, int y, int z) sub(double x, double y, double z) sub(int x, int y, int z) int[]toArray()toDouble()toFloat()toInt()toLong()toString()toVector2(boolean useZ) toVector4(double w) toVector4(int w) withX(double x) withX(int x) withY(double y) withY(int y) withZ(double z) withZ(int z) intx()inty()intz()
-
Field Details
-
ZERO
-
UNIT_X
-
UNIT_Y
-
UNIT_Z
-
ONE
-
RIGHT
-
UP
-
FORWARD
-
-
Constructor Details
-
Vector3i
-
Vector3i
-
Vector3i
-
Vector3i
-
Vector3i
-
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
-
withX
-
y
public int y() -
withY
-
withY
-
z
public int z() -
withZ
-
withZ
-
add
-
add
-
add
-
sub
-
sub
-
sub
-
mul
-
mul
-
mul
-
mul
-
mul
-
div
-
div
-
div
-
div
-
div
-
dot
-
dot
public int dot(double x, double y, double z) -
dot
public int dot(int x, int y, int z) -
project
-
project
-
project
-
cross
-
cross
-
cross
-
pow
-
pow
-
abs
-
negate
-
min
-
min
-
min
-
max
-
max
-
max
-
distanceSquared
-
distanceSquared
public int distanceSquared(double x, double y, double z) -
distanceSquared
public int distanceSquared(int x, int y, int z) -
distance
-
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:
lengthSquaredin interfaceVectori
-
length
public float length() -
minAxis
public int minAxis()Returns the axis with the minimal value. -
maxAxis
public int maxAxis()Returns the axis with the maximum value. -
toVector2
-
toVector2
-
toVector4
-
toVector4
-
toVector4
-
toVectorN
-
toArray
public int[] toArray() -
toInt
-
toLong
-
toFloat
-
toDouble
-
compareTo
- Specified by:
compareToin interfaceComparable<Vector3i>
-
equals
-
hashCode
public int hashCode() -
toString
-
from
-
from
-