Class Vector4i
java.lang.Object
dev.prozilla.pine.common.math.vector.Vector<Vector4i>
dev.prozilla.pine.common.math.vector.VectorInt<Vector4i>
dev.prozilla.pine.common.math.vector.Vector4i
4-dimensional vector with integer precision. GLSL equivalent to
ivec4
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd
(int x, int y, int z, int w) Adds another vector to this vector.clone()
Returns a new object that is equal to this object.int
Calculates the dot product of this vector with another vector.boolean
Checks if the given object is equal to this object.static Vector4i
getTemp
(int x, int y, int z, int w) Returns a temporary vector with given values.int
Calculates the squared length of this vector.static Vector4i
scale
(float scalar) Scales this vector by a scalar.void
Stores the vector in a given buffer.toString()
Converts this vector to a string representation in the format "(x,y,z,w)".Methods inherited from class dev.prozilla.pine.common.math.vector.Vector
divide, equals, hashCode, lerp, negate, normalize, parseToFloats, parseToFloats, parseToIntegers, parseToIntegers, parseToNumbers, subtract
-
Field Details
-
Constructor Details
-
Method Details
-
add
-
add
Description copied from class:Vector
Adds another vector to this vector. -
scale
Description copied from class:Vector
Scales this vector by a scalar. -
lengthSquared
public int lengthSquared()Description copied from class:VectorInt
Calculates the squared length of this vector.- Specified by:
lengthSquared
in classVectorInt<Vector4i>
-
dot
Description copied from class:VectorInt
Calculates the dot product of this vector with another vector. -
toBuffer
Description copied from class:VectorInt
Stores the vector in a given buffer. -
equals
Description copied from interface:Cloneable
Checks if the given object is equal to this object. -
clone
Description copied from interface:Cloneable
Returns a new object that is equal to this object. -
toString
Converts this vector to a string representation in the format "(x,y,z,w)". -
parse
- Throws:
InvalidStringException
-
getTemp
Returns a temporary vector with given values. Note that this temporary vector is a global instance, so avoid concurrent usage.
-