Compute the absolute of each of this vector's components.
Compute the absolute of each of this vector's components
and store the result into dest
.
Vector4f.add(float x,
float y,
float z,
float w)
Increment the components of this vector by the given values.
Vector4f.add(float x,
float y,
float z,
float w,
Vector4f dest)
Add the supplied vector to this one.
Vector4fc.add(float x,
float y,
float z,
float w,
Vector4f dest)
Increment the components of this vector by the given values and store the result in dest
.
Add the supplied vector to this one and store the result in dest
.
Set each component of this vector to the smallest (closest to negative
infinity) float
value that is greater than or equal to that
component and is equal to a mathematical integer.
Compute for each component of this vector the smallest (closest to negative
infinity) float
value that is greater than or equal to that
component and is equal to a mathematical integer and store the result in
dest
.
Vector4f.div(float scalar)
Divide all components of this
Vector4f
by the given scalar
value.
Vector4f.div(float x,
float y,
float z,
float w)
Divide the components of this Vector4f by the given scalar values and store the result in this
.
Vector4f.div(float x,
float y,
float z,
float w,
Vector4f dest)
Divide this Vector4f component-wise by another Vector4f.
Vector4fc.div(float x,
float y,
float z,
float w,
Vector4f dest)
Divide the components of this Vector4f by the given scalar values and store the result in dest
.
Divide all components of this
Vector4f
by the given scalar
value and store the result in
dest
.
Divide this Vector4f component-wise by another Vector4f and store the result in dest
.
Set each component of this vector to the largest (closest to positive
infinity) float
value that is less than or equal to that
component and is equal to a mathematical integer.
Compute for each component of this vector the largest (closest to positive
infinity) float
value that is less than or equal to that
component and is equal to a mathematical integer and store the result in
dest
.
Add the component-wise multiplication of a * b
to this vector.
Add the component-wise multiplication of a * b
to this vector.
Add the component-wise multiplication of a * b
to this vector
and store the result in dest
.
Add the component-wise multiplication of a * b
to this vector
and store the result in dest
.
Calculate a frustum plane of this
matrix, which
can be a projection matrix or a combined modelview-projection matrix, and store the result
in the given planeEquation
.
Calculate a frustum plane of this
matrix, which
can be a projection matrix or a combined modelview-projection matrix, and store the result
in the given dest
.
Set the components of the given vector dest
to those of this
vector.
Set the components of the given vector dest
to those of this
vector.
Get the column at the given column
index, starting with 0
.
Get the row at the given row
index, starting with 0
.
Get the row at the given row
index, starting with 0
.
Compute a hermite interpolation between this
vector and its
associated tangent t0
and the given vector v
with its tangent t1
and store the result in
dest
.
Linearly interpolate this
and other
using the given interpolation factor t
and store the result in this
.
Linearly interpolate this
and other
using the given interpolation factor t
and store the result in dest
.
Set the components of this vector to be the component-wise maximum of this and the other vector.
Set the components of dest
to be the component-wise maximum of this and the other vector.
Set the components of this vector to be the component-wise minimum of this and the other vector.
Set the components of dest
to be the component-wise minimum of this and the other vector.
Vector4f.mul(float scalar)
Multiply all components of this
Vector4f
by the given scalar
value.
Vector4f.mul(float x,
float y,
float z,
float w)
Multiply the components of this Vector4f by the given scalar values and store the result in this
.
Vector4f.mul(float x,
float y,
float z,
float w,
Vector4f dest)
Multiply the given matrix mat with this Vector4f and store the result in
this
.
Multiply the given matrix mat with this Vector4f and store the result in
this
.
Multiply this Vector4f component-wise by another Vector4f.
Vector4fc.mul(float x,
float y,
float z,
float w,
Vector4f dest)
Multiply the components of this Vector4f by the given scalar values and store the result in dest
.
Multiply all components of this
Vector4f
by the given scalar
value and store the result in
dest
.
Multiply the given matrix mat with this Vector4f and store the result in
dest
.
Multiply the given matrix mat with this Vector4f and store the result in
dest
.
Multiply this Vector4f component-wise by another Vector4f and store the result in dest
.
Add the component-wise multiplication of this * a
to b
and store the result in this
.
Add the component-wise multiplication of this * a
to b
and store the result in this
.
Add the component-wise multiplication of this * a
to b
and store the result in dest
.
Add the component-wise multiplication of this * a
to b
and store the result in dest
.
Multiply the given affine matrix mat with this Vector4f and store the result in
dest
.
Multiply the transpose of the given affine matrix mat
with this Vector4f and store the result in
dest
.
Multiply the given matrix mat
with this Vector4f, perform perspective division.
Multiply the given matrix mat
with this Vector4f, perform perspective division
and store the result in dest
.
Multiply the transpose of the given matrix mat
with this Vector4f and store the result in
this
.
Multiply the transpose of the given matrix mat
with this Vector4f and store the result in
dest
.
Negate this vector and store the result in dest
.
Scale this vector to have the given length.
Scale this vector to have the given length and store the result in dest
.
Normalizes this vector and store the result in dest
.
Normalize this vector by computing only the norm of (x, y, z)
.
Normalize this vector by computing only the norm of (x, y, z)
and store the result in dest
.
Matrix4f.project(float x,
float y,
float z,
int[] viewport,
Vector4f winCoordsDest)
Matrix4fc.project(float x,
float y,
float z,
int[] viewport,
Vector4f winCoordsDest)
Project the given (x, y, z)
position via this
matrix using the specified viewport
and store the resulting window coordinates in winCoordsDest
.
Project the given position
via this
matrix using the specified viewport
and store the resulting window coordinates in winCoordsDest
.
Rotate this vector by the given quaternion quat
and store the result in this
.
Rotate this vector by the given quaternion quat
and store the result in dest
.
Vector4f.rotateAbout(float angle,
float x,
float y,
float z)
Rotate this vector the specified radians around the given rotation axis.
Rotate this vector the specified radians around the given rotation axis and store the result
into dest
.
Rotate this vector the specified radians around the X axis.
Rotate this vector the specified radians around the X axis and store the result
into dest
.
Rotate this vector the specified radians around the Y axis.
Rotate this vector the specified radians around the Y axis and store the result
into dest
.
Rotate this vector the specified radians around the Z axis.
Rotate this vector the specified radians around the Z axis and store the result
into dest
.
Set each component of this vector to the closest float that is equal to
a mathematical integer, with ties rounding to positive infinity.
Compute for each component of this vector the closest float that is equal to
a mathematical integer, with ties rounding to positive infinity and store
the result in dest
.
Set the x, y, z, and w components to the supplied value.
Vector4f.set(double x,
double y,
double z,
double w)
Set the x, y, z, and w components to the supplied values.
Set the x, y, z, and w components to the supplied value.
Vector4f.set(float[] xyzw)
Set the four components of this vector to the first four elements of the given array.
Vector4f.set(float x,
float y,
float z)
Set the x, y, z components to the supplied values.
Vector4f.set(float x,
float y,
float z,
float w)
Set the x, y, z, and w components to the supplied values.
Read this vector from the supplied
ByteBuffer
starting at the specified
absolute buffer position/index.
Read this vector from the supplied
FloatBuffer
starting at the specified
absolute buffer position/index.
Sets the first two components of this to the components of given v
and last two components to the given z
, and w
.
Sets the first two components of this to the components of given v
and last two components to the given z
, and w
.
Set the first three components of this to the components of
v
and the last component to w
.
Set the first three components of this to the components of
v
and the last component to w
.
Set this
Vector4f
to the values of the given
v
.
Set this
Vector4f
to the values of the given
v
.
Set this
Vector4f
to the values of the given
v
.
Set the value of the specified component of this vector.
Set the values of this vector by reading 4 float values from off-heap memory,
starting at the given address.
Compute a smooth-step (i.e.
Vector4f.sub(float x,
float y,
float z,
float w)
Subtract (x, y, z, w)
from this.
Vector4f.sub(float x,
float y,
float z,
float w,
Vector4f dest)
Subtract the supplied vector from this one.
Vector4fc.sub(float x,
float y,
float z,
float w,
Vector4f dest)
Subtract (x, y, z, w)
from this and store the result in dest
.
Subtract the supplied vector from this one and store the result in dest
.
Transform the given vector by the rotation transformation described by this
AxisAngle4f
.
Transform the given vector by the rotation transformation described by this
AxisAngle4f
and store the result in
dest
.
Transform/multiply the vector (x, y, z, w)
by this matrix and store the result in dest
.
Transform/multiply the given vector by this matrix and store the result in that vector.
Transform/multiply the given vector by this matrix and store the result in dest
.
Transform/multiply the given vector by this matrix and store the result in that vector.
Transform/multiply the given vector by this matrix and store the result in dest
.
Transform the given vector (x, y, z)
by this quaternion and store the result in dest
.
Transform the given vector by this quaternion.
Transform the given vector by this quaternion and store the result in dest
.
Transform the given vector (x, y, z)
by this quaternion and store the result in dest
.
Transform the given vector by this quaternion.
Transform the given vector by this quaternion and store the result in dest
.
Transform/multiply the 4D-vector
(x, y, z, w)
by assuming that
this
matrix represents an
affine
transformation
(i.e.
Transform/multiply the given 4D-vector by assuming that
this
matrix represents an
affine
transformation
(i.e.
Transform/multiply the given 4D-vector by assuming that
this
matrix represents an
affine
transformation
(i.e.
Transform the given vector (x, y, z)
by the inverse of
this quaternion and store the result in dest
.
Transform the given vector by the inverse of this quaternion.
Transform the given vector by the inverse of this quaternion and store the result in dest
.
Transform the given vector (x, y, z)
by the inverse of
this quaternion and store the result in dest
.
Transform the given vector by the inverse of this quaternion.
Transform the given vector by the inverse of this quaternion and store the result in dest
.
Transform the given vector (x, y, z)
by the inverse of
this unit quaternion and store the result in dest
.
Transform the given vector by the inverse of this unit quaternion.
Transform the given vector by the inverse of this unit quaternion and store the result in dest
.
Transform the given vector (x, y, z)
by the inverse of
this unit quaternion and store the result in dest
.
Transform the given vector by the inverse of this unit quaternion.
Transform the given vector by the inverse of this unit quaternion and store the result in dest
.
Transform the vector (1, 0, 0)
by this quaternion.
Transform the vector (1, 0, 0)
by this quaternion.
Transform the vector (0, 1, 0)
by this quaternion.
Transform the vector (0, 1, 0)
by this quaternion.
Transform the vector (0, 0, 1)
by this quaternion.
Transform the vector (0, 0, 1)
by this quaternion.
Transform/multiply the vector (x, y, z, w)
by this matrix, perform perspective divide and store the result in dest
.
Transform/multiply the given vector by this matrix, perform perspective divide and store the result in that vector.
Transform/multiply the given vector by this matrix, perform perspective divide and store the result in dest
.
Transform/multiply the vector (x, y, z, w)
by the transpose of this matrix and store the result in dest
.
Transform/multiply the given vector by the transpose of this matrix and store the result in that vector.
Transform/multiply the given vector by the transpose of this matrix and store the result in dest
.
Transform the given vector (x, y, z)
by this unit quaternion and store the result in dest
.
Transform the given vector by this unit quaternion.
Transform the given vector by this unit quaternion and store the result in dest
.
Transform the given vector (x, y, z)
by this unit quaternion and store the result in dest
.
Transform the given vector by this unit quaternion.
Transform the given vector by this unit quaternion and store the result in dest
.
Transform the vector (1, 0, 0)
by this unit quaternion.
Transform the vector (1, 0, 0)
by this unit quaternion.
Transform the vector (0, 1, 0)
by this unit quaternion.
Transform the vector (0, 1, 0)
by this unit quaternion.
Transform the vector (0, 0, 1)
by this unit quaternion.
Transform the vector (0, 0, 1)
by this unit quaternion.
Matrix4f.unproject(float winX,
float winY,
float winZ,
int[] viewport,
Vector4f dest)
Matrix4fc.unproject(float winX,
float winY,
float winZ,
int[] viewport,
Vector4f dest)
Unproject the given window coordinates (winX, winY, winZ)
by this
matrix using the specified viewport.
Unproject the given window coordinates winCoords
by this
matrix using the specified viewport.
Unproject the given window coordinates (winX, winY, winZ)
by this
matrix using the specified viewport.
Unproject the given window coordinates winCoords
by this
matrix using the specified viewport.
Set all components to zero.
Compute the absolute of each of this vector's components
and store the result into dest
.
Vector4f.add(float x,
float y,
float z,
float w,
Vector4f dest)
Vector4fc.add(float x,
float y,
float z,
float w,
Vector4f dest)
Increment the components of this vector by the given values and store the result in dest
.
Add the supplied vector to this one and store the result in dest
.
Compute for each component of this vector the smallest (closest to negative
infinity) float
value that is greater than or equal to that
component and is equal to a mathematical integer and store the result in
dest
.
Vector4f.div(float x,
float y,
float z,
float w,
Vector4f dest)
Vector4fc.div(float x,
float y,
float z,
float w,
Vector4f dest)
Divide the components of this Vector4f by the given scalar values and store the result in dest
.
Divide all components of this
Vector4f
by the given scalar
value and store the result in
dest
.
Divide this Vector4f component-wise by another Vector4f and store the result in dest
.
Compute for each component of this vector the largest (closest to positive
infinity) float
value that is less than or equal to that
component and is equal to a mathematical integer and store the result in
dest
.
Add the component-wise multiplication of a * b
to this vector
and store the result in dest
.
Add the component-wise multiplication of a * b
to this vector
and store the result in dest
.
Calculate a frustum plane of this
matrix, which
can be a projection matrix or a combined modelview-projection matrix, and store the result
in the given planeEquation
.
Calculate a frustum plane of this
matrix, which
can be a projection matrix or a combined modelview-projection matrix, and store the result
in the given dest
.
Set the components of the given vector dest
to those of this
vector.
Set the components of the given vector dest
to those of this
vector.
Get the column at the given column
index, starting with 0
.
Get the row at the given row
index, starting with 0
.
Get the row at the given row
index, starting with 0
.
Compute a hermite interpolation between this
vector and its
associated tangent t0
and the given vector v
with its tangent t1
and store the result in
dest
.
static boolean
Intersectionf.intersectPlaneSphere(float a,
float b,
float c,
float d,
float centerX,
float centerY,
float centerZ,
float radius,
Vector4f intersectionCenterAndRadius)
Test whether the plane with the general plane equation a*x + b*y + c*z + d = 0 intersects the sphere with center
(centerX, centerY, centerZ)
and radius
, and store the center of the circle of
intersection in the (x, y, z)
components of the supplied vector and the radius of that circle in the w component.
static boolean
Intersectionf.intersectPlaneSweptSphere(float a,
float b,
float c,
float d,
float cX,
float cY,
float cZ,
float radius,
float vX,
float vY,
float vZ,
Vector4f pointAndTime)
Test whether the plane with the general plane equation a*x + b*y + c*z + d = 0 intersects the moving sphere with center
(cX, cY, cZ)
, radius
and velocity (vX, vY, vZ)
, and store the point of intersection
in the (x, y, z)
components of the supplied vector and the time of intersection in the w component.
static boolean
Intersectionf.intersectSphereSphere(float aX,
float aY,
float aZ,
float radiusSquaredA,
float bX,
float bY,
float bZ,
float radiusSquaredB,
Vector4f centerAndRadiusOfIntersectionCircle)
Test whether the one sphere with center (aX, aY, aZ)
and square radius radiusSquaredA
intersects the other
sphere with center (bX, bY, bZ)
and square radius radiusSquaredB
, and store the center of the circle of
intersection in the (x, y, z)
components of the supplied vector and the radius of that circle in the w component.
static boolean
Test whether the one sphere with center centerA
and square radius radiusSquaredA
intersects the other
sphere with center centerB
and square radius radiusSquaredB
, and store the center of the circle of
intersection in the (x, y, z)
components of the supplied vector and the radius of that circle in the w component.
static int
Intersectionf.intersectSweptSphereTriangle(float centerX,
float centerY,
float centerZ,
float radius,
float velX,
float velY,
float velZ,
float v0X,
float v0Y,
float v0Z,
float v1X,
float v1Y,
float v1Z,
float v2X,
float v2Y,
float v2Z,
float epsilon,
float maxT,
Vector4f pointAndTime)
Determine the point of intersection between a sphere with the given center (centerX, centerY, centerZ)
and radius
moving
with the given velocity (velX, velY, velZ)
and the triangle specified via its three vertices (v0X, v0Y, v0Z)
, (v1X, v1Y, v1Z)
, (v2X, v2Y, v2Z)
.
Linearly interpolate this
and other
using the given interpolation factor t
and store the result in dest
.
Set the components of dest
to be the component-wise maximum of this and the other vector.
Set the components of dest
to be the component-wise minimum of this and the other vector.
Vector4f.mul(float x,
float y,
float z,
float w,
Vector4f dest)
Vector4fc.mul(float x,
float y,
float z,
float w,
Vector4f dest)
Multiply the components of this Vector4f by the given scalar values and store the result in dest
.
Multiply all components of this
Vector4f
by the given scalar
value and store the result in
dest
.
Multiply the given matrix mat with this Vector4f and store the result in
dest
.
Multiply the given matrix mat with this Vector4f and store the result in
dest
.
Multiply this Vector4f component-wise by another Vector4f and store the result in dest
.
Add the component-wise multiplication of this * a
to b
and store the result in dest
.
Add the component-wise multiplication of this * a
to b
and store the result in dest
.
Multiply the given affine matrix mat with this Vector4f and store the result in
dest
.
Multiply the transpose of the given affine matrix mat
with this Vector4f and store the result in
dest
.
Multiply the given matrix mat
with this Vector4f, perform perspective division
and store the result in dest
.
Multiply the transpose of the given matrix mat
with this Vector4f and store the result in
dest
.
Negate this vector and store the result in dest
.
Scale this vector to have the given length and store the result in dest
.
Normalizes this vector and store the result in dest
.
Normalize this vector by computing only the norm of (x, y, z)
and store the result in dest
.
Matrix4f.project(float x,
float y,
float z,
int[] viewport,
Vector4f winCoordsDest)
Matrix4fc.project(float x,
float y,
float z,
int[] viewport,
Vector4f winCoordsDest)
Project the given (x, y, z)
position via this
matrix using the specified viewport
and store the resulting window coordinates in winCoordsDest
.
Project the given position
via this
matrix using the specified viewport
and store the resulting window coordinates in winCoordsDest
.
Rotate this vector by the given quaternion quat
and store the result in dest
.
Rotate this vector the specified radians around the given rotation axis and store the result
into dest
.
Rotate this vector the specified radians around the X axis and store the result
into dest
.
Rotate this vector the specified radians around the Y axis and store the result
into dest
.
Rotate this vector the specified radians around the Z axis and store the result
into dest
.
Compute for each component of this vector the closest float that is equal to
a mathematical integer, with ties rounding to positive infinity and store
the result in dest
.
Apply a projection transformation to this matrix that projects onto the plane specified via the general plane equation
x*a + y*b + z*c + d = 0
as if casting a shadow from a given light position/direction light
.
Apply a projection transformation to this matrix that projects onto the plane with the general plane equation
y = 0
as if casting a shadow from a given light position/direction light
.
Apply a projection transformation to this matrix that projects onto the plane specified via the general plane equation
x*a + y*b + z*c + d = 0
as if casting a shadow from a given light position/direction light
and store the result in dest
.
Apply a projection transformation to this matrix that projects onto the plane with the general plane equation
y = 0
as if casting a shadow from a given light position/direction light
and store the result in dest
.
Compute a smooth-step (i.e.
Vector4f.sub(float x,
float y,
float z,
float w,
Vector4f dest)
Vector4fc.sub(float x,
float y,
float z,
float w,
Vector4f dest)
Subtract (x, y, z, w)
from this and store the result in dest
.
Subtract the supplied vector from this one and store the result in dest
.
Transform the given vector by the rotation transformation described by this
AxisAngle4f
.
Transform the given vector by the rotation transformation described by this
AxisAngle4f
and store the result in
dest
.
Transform/multiply the vector (x, y, z, w)
by this matrix and store the result in dest
.
Transform/multiply the given vector by this matrix and store the result in that vector.
Transform/multiply the given vector by this matrix and store the result in dest
.
Transform/multiply the given vector by this matrix and store the result in that vector.
Transform/multiply the given vector by this matrix and store the result in dest
.
Transform the given vector (x, y, z)
by this quaternion and store the result in dest
.
Transform the given vector by this quaternion.
Transform the given vector by this quaternion and store the result in dest
.
Transform the given vector (x, y, z)
by this quaternion and store the result in dest
.
Transform the given vector by this quaternion.
Transform the given vector by this quaternion and store the result in dest
.
Transform/multiply the 4D-vector
(x, y, z, w)
by assuming that
this
matrix represents an
affine
transformation
(i.e.
Transform/multiply the given 4D-vector by assuming that
this
matrix represents an
affine
transformation
(i.e.
Transform/multiply the given 4D-vector by assuming that
this
matrix represents an
affine
transformation
(i.e.
Transform the given vector (x, y, z)
by the inverse of
this quaternion and store the result in dest
.
Transform the given vector by the inverse of this quaternion.
Transform the given vector by the inverse of this quaternion and store the result in dest
.
Transform the given vector (x, y, z)
by the inverse of
this quaternion and store the result in dest
.
Transform the given vector by the inverse of this quaternion.
Transform the given vector by the inverse of this quaternion and store the result in dest
.
Transform the given vector (x, y, z)
by the inverse of
this unit quaternion and store the result in dest
.
Transform the given vector by the inverse of this unit quaternion.
Transform the given vector by the inverse of this unit quaternion and store the result in dest
.
Transform the given vector (x, y, z)
by the inverse of
this unit quaternion and store the result in dest
.
Transform the given vector by the inverse of this unit quaternion.
Transform the given vector by the inverse of this unit quaternion and store the result in dest
.
Transform the vector (1, 0, 0)
by this quaternion.
Transform the vector (1, 0, 0)
by this quaternion.
Transform the vector (0, 1, 0)
by this quaternion.
Transform the vector (0, 1, 0)
by this quaternion.
Transform the vector (0, 0, 1)
by this quaternion.
Transform the vector (0, 0, 1)
by this quaternion.
Transform/multiply the vector (x, y, z, w)
by this matrix, perform perspective divide and store the result in dest
.
Transform/multiply the given vector by this matrix, perform perspective divide and store the result in that vector.
Transform/multiply the given vector by this matrix, perform perspective divide and store the result in dest
.
Transform/multiply the vector (x, y, z, w)
by the transpose of this matrix and store the result in dest
.
Transform/multiply the given vector by the transpose of this matrix and store the result in that vector.
Transform/multiply the given vector by the transpose of this matrix and store the result in dest
.
Transform the given vector (x, y, z)
by this unit quaternion and store the result in dest
.
Transform the given vector by this unit quaternion.
Transform the given vector by this unit quaternion and store the result in dest
.
Transform the given vector (x, y, z)
by this unit quaternion and store the result in dest
.
Transform the given vector by this unit quaternion.
Transform the given vector by this unit quaternion and store the result in dest
.
Transform the vector (1, 0, 0)
by this unit quaternion.
Transform the vector (1, 0, 0)
by this unit quaternion.
Transform the vector (0, 1, 0)
by this unit quaternion.
Transform the vector (0, 1, 0)
by this unit quaternion.
Transform the vector (0, 0, 1)
by this unit quaternion.
Transform the vector (0, 0, 1)
by this unit quaternion.
Matrix4f.unproject(float winX,
float winY,
float winZ,
int[] viewport,
Vector4f dest)
Matrix4fc.unproject(float winX,
float winY,
float winZ,
int[] viewport,
Vector4f dest)
Unproject the given window coordinates (winX, winY, winZ)
by this
matrix using the specified viewport.
Unproject the given window coordinates winCoords
by this
matrix using the specified viewport.
Unproject the given window coordinates (winX, winY, winZ)
by this
matrix using the specified viewport.
Unproject the given window coordinates winCoords
by this
matrix using the specified viewport.