public final class Vector3i extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
int |
x
The vector's X coordinate.
|
int |
y
The vector's Y coordinate.
|
int |
z
The vector's Z coordinate.
|
static Vector3i |
ZERO
The zero vector.
|
Constructor and Description |
---|
Vector3i(int x,
int y,
int z)
Constructs a new vector with the given coordinates.
|
Vector3i(Vector3f v)
Constructs a new vector by converting a floating point vector.
|
Modifier and Type | Method and Description |
---|---|
static Vector3i |
add(Vector3i a,
Vector3i b)
Adds two vectors.
|
static Vector3i |
componentwiseDiv(Vector3i a,
Vector3i b)
Performs a component-wise division of two vectors.
|
static Vector3i |
componentwiseMul(Vector3i a,
Vector3i b)
Performs a component-wise multiplication of two vectors.
|
static Vector3i |
div(Vector3i a,
int s)
Performs an integer division on each component of the vector by a scalar.
|
boolean |
equals(Object o) |
int |
hashCode() |
static Vector3i |
mul(Vector3i a,
int s)
Multiplies a vector by a scalar.
|
static Vector3i |
neg(Vector3i v)
Computes the negation of a vector.
|
static Vector3i |
sub(Vector3i a,
Vector3i b)
Subtracts two vectors.
|
String |
toString() |
public static final Vector3i ZERO
public final int x
public final int y
public final int z
public Vector3i(int x, int y, int z)
x
- the X coordinate.y
- the Y coordinate.z
- the Z coordinate.public Vector3i(Vector3f v)
v
- the vector to convert.public static Vector3i add(Vector3i a, Vector3i b)
a
- the first vector.b
- the second vector.public static Vector3i sub(Vector3i a, Vector3i b)
a
- the first vector.b
- the second vector.public static Vector3i componentwiseMul(Vector3i a, Vector3i b)
a
- the first vector.b
- the second vector.public static Vector3i componentwiseDiv(Vector3i a, Vector3i b)
a
- the first vector.b
- the second vector.public static Vector3i mul(Vector3i a, int s)
a
- the vector.s
- the scalar to multiply by.public static Vector3i div(Vector3i a, int s)
a
- the vector.s
- the scalar.public static Vector3i neg(Vector3i v)
v
- the vector.