| Modifier and Type | Field and Description |
|---|---|
| public static final Vector3 | |
| private static final long | |
| private static final Matrix4 | |
| public float | x
the x-component of this vector |
| public static final Vector3 | |
| public float | y
the y-component of this vector |
| public static final Vector3 | |
| public float | z
the z-component of this vector |
| public static final Vector3 | |
| public static final Vector3 |
| Access | Constructor and Description |
|---|---|
| public | |
| public | Vector3(float
The x-component x, float The y-component y, float The z-component z)Creates a vector with the given components |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Vector3 | add(final Vector3 vector)
Implements com. Adds the given vector to this vector |
| public Vector3 | Returns: This vector for chaining.The x-component of the other vector x, float The y-component of the other vector y, float The z-component of the other vector z)Adds the given vector to this component |
| public Vector3 | Returns: This vector for chainingThe value values)Implements com. Adds the given value to all three components of the vector. |
| public Vector3 | clamp(float min, float max)
Implements com. Clamps this vector's length to given min and max values |
| public Vector3 | |
| public Vector3 | |
| public Vector3 | Returns: This vector for chainingThe x-component of the other vector x, float The y-component of the other vector y, float The z-component of the other vector z)Sets this vector to the cross product between it and the other vector. |
| public static float | dot(float x1, float y1, float z1, float x2, float y2, float z2)
Returns: The dot product between the two vectors |
| public float | |
| public float | Returns: The dot productThe x-component of the other vector x, float The y-component of the other vector y, float The z-component of the other vector z)Returns the dot product between this and the given vector. |
| public static float | dst(final float x1, final float y1, final float z1, final float x2, final float y2, final float z2)
Returns: The Euclidean distance between the two specified vectors |
| public float | |
| public float | |
| public static float | dst2(final float x1, final float y1, final float z1, final float x2, final float y2, final float z2)
Returns: the squared distance between the given points |
| public float | dst2(Vector3 point)
Implements com. This method is faster than |
| public float | Returns: The squared distanceThe x-component of the other point x, float The y-component of the other point y, float The z-component of the other point z)Returns the squared distance between this point and the given point |
| public boolean | epsilonEquals(final Vector3 other, float epsilon)
Implements com. Compares this vector with the other vector, using the supplied epsilon for fuzzy equality testing. |
| public boolean | Returns: whether the vectors are the same.Compares this vector with the other vector, using the supplied epsilon for fuzzy equality testing. |
| public boolean | Returns: true if vector are equal, otherwise falseother vector to compare other)Compares this vector with the other vector using MathUtils.FLOAT_ROUNDING_ERROR for fuzzy equality testing |
| public boolean | Returns: true if vector are equal, otherwise falsex component of the other vector to compare x, float y component of the other vector to compare y, float z component of the other vector to compare z)Compares this vector with the other vector using MathUtils.FLOAT_ROUNDING_ERROR for fuzzy equality testing |
| public boolean | equals(Object obj)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public Vector3 | Returns: this vector for chainingthe string. v)Sets this |
| public int | |
| public boolean | |
| public boolean | |
| public boolean | |
| public Vector3 | interpolate(Vector3 target, float alpha, Interpolation interpolator)
Implements com. Interpolates between this vector and the given target vector by alpha (within range [0,1]) using the given Interpolation method. |
| public boolean | |
| public boolean | |
| public boolean | isCollinearOpposite(Vector3 other, float epsilon)
Implements com.
|
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | isPerpendicular(Vector3 vector, float epsilon)
Implements com.
|
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public static float | |
| public float | |
| public static float | |
| public float | len2()
Implements com. This method is faster than |
| public Vector3 | lerp(final Vector3 target, float alpha)
Implements com. Linearly interpolates between this vector and the target vector by alpha which is in the range [0,1]. |
| public Vector3 | limit(float limit)
Implements com. Limits the length of this vector, based on the desired maximum length. |
| public Vector3 | limit2(float limit2)
Implements com. Limits the length of this vector, based on the desired maximum length squared. |
| public Vector3 | |
| public Vector3 | |
| public Vector3 | Returns: This vector for chainingMultiplies the vector by the given |
| public Vector3 | Returns: This vector for chainingThe matrix matrix)Left-multiplies the vector by the given 4x3 column major matrix. |
| public Vector3 | mulAdd(Vector3 vec, float scalar)
Implements com. First scale a supplied vector, then add it to this vector. |
| public Vector3 | mulAdd(Vector3 vec, Vector3 mulVec)
Implements com. First scale a supplied vector, then add it to this vector. |
| public Vector3 | |
| public Vector3 | |
| public Vector3 | |
| public Vector3 | Returns: This vector for chainingthe angle in degrees degrees, float the x-component of the axis axisX, float the y-component of the axis axisY, float the z-component of the axis axisZ)Rotates this vector by the given angle in degrees around the given axis. |
| public Vector3 | |
| public Vector3 | Returns: This vector for chainingthe angle in radians radians, float the x-component of the axis axisX, float the y-component of the axis axisY, float the z-component of the axis axisZ)Rotates this vector by the given angle in radians around the given axis. |
| public Vector3 | |
| public Vector3 | scl(float scalar)
Implements com. Scales this vector by a scalar |
| public Vector3 | scl(final Vector3 other)
Implements com. Scales this vector by another vector |
| public Vector3 | Returns: This vector for chainingX value vx, float Y value vy, float Z value vz)Scales this vector by the given values |
| public Vector3 | Returns: this vector for chainingThe x-component x, float The y-component y, float The z-component z)Sets the vector to the given components |
| public Vector3 | set(final Vector3 vector)
Implements com. Sets this vector from the given vector |
| public Vector3 | Returns: this vector for chainingThe array values)Implements com. Sets the components from the array. |
| public Vector3 | |
| public Vector3 | Returns: This vector for chainingThe angle between x-axis in radians [0, 2pi] azimuthalAngle, float The angle between z-axis in radians [0, pi] polarAngle)Sets the components from the given spherical coordinate |
| public Vector3 | setLength(float len)
Implements com. Sets the length of this vector. |
| public Vector3 | setLength2(float len2)
Implements com. Sets the length of this vector, based on the square of the desired length. |
| public Vector3 | setToRandomDirection()
Implements com. Sets this vector to the unit vector with a random direction |
| public Vector3 | |
| public Vector3 | |
| public Vector3 | sub(final Vector3 a_vec)
Implements com. Subtracts the given vector from this vector. |
| public Vector3 | Returns: This vector for chainingThe x-component of the other vector x, float The y-component of the other vector y, float The z-component of the other vector z)Subtracts the other vector from this vector. |
| public Vector3 | Returns: This vector for chainingThe value value)Implements com. Subtracts the given value from all components of this vector |
| public String | Returns: a string representation of this object.Overrides java. Converts this |
| public Vector3 | |
| public Vector3 | |
| public Vector3 | |
| public Vector3 | Returns: The vector for chainingThe transformation matrix matrix)Translates this vector in the direction opposite to the translation of the matrix and the multiplies this vector by the transpose of the first three columns of the matrix. |