Package | Description |
---|---|
net.risingworld.api.utils |
Modifier and Type | Field and Description |
---|---|
static Vector4f |
Vector4f.UNIT_W
A unit vector along the W axis
|
static Vector4f |
Vector4f.UNIT_X
A unit vector along the X axis
|
static Vector4f |
Vector4f.UNIT_Y
A unit vector along the Y axis
|
static Vector4f |
Vector4f.UNIT_Z
A unit vector along the Z axis
|
static Vector4f |
Vector4f.ZERO
A vector with values 0, 0, 0
|
Modifier and Type | Method and Description |
---|---|
Vector4f |
Vector4f.add(float addX,
float addY,
float addZ,
float addW)
Creates a new vector with the same values of this vector and adds the
provided values.
|
Vector4f |
Vector4f.add(Vector4f other)
Creates a new vector with the same values of this vector and adds the values
of the provided vector.
|
Vector4f |
Vector4f.addLocal(float addX,
float addY,
float addZ,
float addW)
Adds the provided values to the values of this vector.
|
Vector4f |
Vector4f.addLocal(Vector4f other)
Adds the values of the provided vector to the values of this vector.
|
Vector4f |
Vector4f.divide(Vector4f other)
Creates a new vector with the same values of this vector and divides the values
of the provided vector.
|
Vector4f |
Vector4f.divideLocal(float scalar) |
Vector4f |
Vector4f.divideLocal(Vector4f other) |
Vector4f |
Vector4f.interpolateLocal(Vector4f finalVector,
float mu)
Interpolates this vector to the provided final vector, e.g. if this vector
is (0, 5, 10, 0), and the final vector is (-10, 0, 10, 0), the result (by using
a mu-value of 0.5f) would be (-5, 2.5f, 10, 0)
|
Vector4f |
Vector4f.mult(float scalar)
Creates a new vector with the same values of this vector and multiplies
them with the provided scalar.
|
Vector4f |
Vector4f.mult(float multX,
float multY,
float multZ,
float multW)
Creates a new vector with the same values of this vector and multiplies the
provided values.
|
Vector4f |
Vector4f.mult(Vector4f other)
Creates a new vector with the same values of this vector and multiplies the values
of the provided vector.
|
Vector4f |
Vector4f.multLocal(float scalar)
Multiplies the values of this vector with the provided scalar.
|
Vector4f |
Vector4f.multLocal(float multX,
float multY,
float multZ,
float multW)
Multiplies the values of this vector with the provided values.
|
Vector4f |
Vector4f.multLocal(Vector4f other)
Multiplies the values of this vector with the values of the provided vector.
|
Vector4f |
Vector4f.negate()
Creates a new vector which contains negated values of this vector.
|
Vector4f |
Vector4f.negateLocal()
Negates all values of this vector.
|
Vector4f |
Vector4f.normalizeLocal()
Normalizes this vector (i.e. turn it into a unit vector).
|
Vector4f |
Vector4f.set(float x,
float y,
float z,
float w)
Sets the x, y, z and w values of this vector to the provided values.
|
Vector4f |
Vector4f.set(Vector4f vector)
Sets the x, y, z and w values of this vector to the values of the
provided vector.
|
Vector4f |
Vector4f.setW(float w)
Sets the w value of this vector.
|
Vector4f |
Vector4f.setX(float x)
Sets the x value of this vector.
|
Vector4f |
Vector4f.setY(float y)
Sets the y value of this vector.
|
Vector4f |
Vector4f.setZ(float z)
Sets the z value of this vector.
|
Vector4f |
Vector4f.subtract(float subtractX,
float subtractY,
float subtractZ,
float subtractW)
Creates a new vector with the same values of this vector and subtracts the
provided values.
|
Vector4f |
Vector4f.subtract(Vector4f other)
Creates a new vector with the same values of this vector and subtracts the values
of the provided vector.
|
Vector4f |
Vector4f.subtractLocal(float subtractX,
float subtractY,
float subtractZ,
float subtractW)
Subtracts the provided values from the values of this vector.
|
Vector4f |
Vector4f.subtractLocal(Vector4f other)
Subtracts the values of the provided vector from the values of this vector.
|
Vector4f |
Vector4f.zero()
Sets all values to 0 (same set
set(0, 0, 0, 0); ). |
Modifier and Type | Method and Description |
---|---|
Vector4f |
Vector4f.add(Vector4f other)
Creates a new vector with the same values of this vector and adds the values
of the provided vector.
|
Vector4f |
Vector4f.addLocal(Vector4f other)
Adds the values of the provided vector to the values of this vector.
|
float |
Vector4f.angleBetween(Vector4f other)
Gets the angle between this vector and another vector.
|
float |
Vector4f.distance(Vector4f other)
Gets the distance between this vector and another vector.
|
float |
Vector4f.distanceSquared(Vector4f other)
Gets the squared distance between this vector and another Vector4f.
|
Vector4f |
Vector4f.divide(Vector4f other)
Creates a new vector with the same values of this vector and divides the values
of the provided vector.
|
Vector4f |
Vector4f.divideLocal(Vector4f other) |
float |
Vector4f.dot(Vector4f other)
Gets the dot product of this vector with the provided vector.
|
Vector4f |
Vector4f.interpolateLocal(Vector4f finalVector,
float mu)
Interpolates this vector to the provided final vector, e.g. if this vector
is (0, 5, 10, 0), and the final vector is (-10, 0, 10, 0), the result (by using
a mu-value of 0.5f) would be (-5, 2.5f, 10, 0)
|
Vector4f |
Vector4f.mult(Vector4f other)
Creates a new vector with the same values of this vector and multiplies the values
of the provided vector.
|
Vector4f |
Vector4f.multLocal(Vector4f other)
Multiplies the values of this vector with the values of the provided vector.
|
Vector4f |
Vector4f.set(Vector4f vector)
Sets the x, y, z and w values of this vector to the values of the
provided vector.
|
Vector4f |
Vector4f.subtract(Vector4f other)
Creates a new vector with the same values of this vector and subtracts the values
of the provided vector.
|
Vector4f |
Vector4f.subtractLocal(Vector4f other)
Subtracts the values of the provided vector from the values of this vector.
|
Constructor and Description |
---|
Vector4f(Vector4f copy)
Creates a new Vector4f and copies the X, Y, Z and W values from the
provided vector.
|