public interface Vector4dc
| Modifier and Type | Method and Description |
|---|---|
Vector4d |
add(double x,
double y,
double z,
double w,
Vector4d dest)
Add
(x, y, z, w) to this and store the result in dest. |
Vector4d |
add(Vector4dc v,
Vector4d dest)
Add the supplied vector to this one and store the result in
dest. |
Vector4d |
add(Vector4fc v,
Vector4d dest)
Add the supplied vector to this one and store the result in
dest. |
double |
angle(Vector4dc v)
Return the angle between this vector and the supplied vector.
|
double |
angleCos(Vector4dc v)
Return the cosine of the angle between this vector and the supplied vector.
|
Vector4d |
ceil(Vector4d dest)
Compute for each component of this vector the smallest (closest to negative
infinity)
double value that is greater than or equal to that
component and is equal to a mathematical integer and store the result in
dest. |
double |
distance(double x,
double y,
double z,
double w)
Return the distance between
this vector and (x, y, z, w). |
double |
distance(Vector4dc v)
Return the distance between this Vector and
v. |
double |
distanceSquared(double x,
double y,
double z,
double w)
Return the square of the distance between
this vector and
(x, y, z, w). |
double |
distanceSquared(Vector4dc v)
Return the square of the distance between this vector and
v. |
Vector4d |
div(double scalar,
Vector4d dest)
Divide this Vector4d by the given scalar value and store the result in
dest. |
Vector4d |
div(Vector4dc v,
Vector4d dest)
|
double |
dot(double x,
double y,
double z,
double w)
Compute the dot product (inner product) of this vector and
(x, y, z, w). |
double |
dot(Vector4dc v)
Compute the dot product (inner product) of this vector and
v. |
boolean |
equals(double x,
double y,
double z,
double w)
Compare the vector components of
this vector with the given (x, y, z, w)
and return whether all of them are equal. |
boolean |
equals(Vector4dc v,
double delta)
Compare the vector components of
this vector with the given vector using the given delta
and return whether all of them are equal within a maximum difference of delta. |
Vector4d |
floor(Vector4d dest)
Compute for each component of this vector the largest (closest to positive
infinity)
double value that is less than or equal to that
component and is equal to a mathematical integer and store the result in
dest. |
Vector4d |
fma(double a,
Vector4dc b,
Vector4d dest)
Add the component-wise multiplication of
a * b to this vector
and store the result in dest. |
Vector4d |
fma(Vector4dc a,
Vector4dc b,
Vector4d dest)
Add the component-wise multiplication of
a * b to this vector
and store the result in dest. |
ByteBuffer |
get(ByteBuffer buffer)
Store this vector into the supplied
ByteBuffer at the current
buffer position. |
DoubleBuffer |
get(DoubleBuffer buffer)
Store this vector into the supplied
DoubleBuffer at the current
buffer position. |
double |
get(int component)
Get the value of the specified component of this vector.
|
ByteBuffer |
get(int index,
ByteBuffer buffer)
Store this vector into the supplied
ByteBuffer starting at the specified
absolute buffer position/index. |
DoubleBuffer |
get(int index,
DoubleBuffer buffer)
Store this vector into the supplied
DoubleBuffer starting at the specified
absolute buffer position/index. |
Vector4d |
hermite(Vector4dc t0,
Vector4dc v1,
Vector4dc t1,
double t,
Vector4d dest)
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. |
boolean |
isFinite()
|
double |
length()
Return the length of this vector.
|
double |
lengthSquared()
Return the length squared of this vector.
|
Vector4d |
lerp(Vector4dc other,
double t,
Vector4d dest)
Linearly interpolate
this and other using the given interpolation factor t
and store the result in dest. |
Vector4d |
max(Vector4dc v,
Vector4d dest)
Set the components of
dest to be the component-wise maximum of this and the other vector. |
int |
maxComponent()
Determine the component with the biggest absolute value.
|
Vector4d |
min(Vector4dc v,
Vector4d dest)
Set the components of
dest to be the component-wise minimum of this and the other vector. |
int |
minComponent()
Determine the component with the smallest (towards zero) absolute value.
|
Vector4d |
mul(double scalar,
Vector4d dest)
Multiply this Vector4d by the given scalar value and store the result in
dest. |
Vector4d |
mul(Matrix4dc mat,
Vector4d dest)
Multiply the given matrix mat with this
Vector4d and store the result in dest. |
Vector4d |
mul(Matrix4fc mat,
Vector4d dest)
Multiply the given matrix mat with this Vector4d and store the result in
dest. |
Vector4d |
mul(Matrix4x3dc mat,
Vector4d dest)
Multiply the given matrix mat with this Vector4d and store the result in
dest. |
Vector4d |
mul(Matrix4x3fc mat,
Vector4d dest)
Multiply the given matrix mat with this Vector4d and store the result in
dest. |
Vector4d |
mul(Vector4dc v,
Vector4d dest)
|
Vector4d |
mul(Vector4fc v,
Vector4d dest)
|
Vector4d |
mulProject(Matrix4dc mat,
Vector4d dest)
Multiply the given matrix
mat with this Vector4d, perform perspective division
and store the result in dest. |
Vector4d |
negate(Vector4d dest)
Negate this vector and store the result in
dest. |
Vector4d |
normalize(double length,
Vector4d dest)
Scale this vector to have the given length and store the result in
dest. |
Vector4d |
normalize(Vector4d dest)
Normalizes this vector and store the result in
dest. |
Vector4d |
normalize3(Vector4d dest)
Normalize this vector by computing only the norm of
(x, y, z) and store the result in dest. |
Vector4d |
rotate(Quaterniondc quat,
Vector4d dest)
Transform this vector by the given quaternion
quat and store the result in dest. |
Vector4d |
rotateAxis(double angle,
double aX,
double aY,
double aZ,
Vector4d dest)
Rotate this vector the specified radians around the given rotation axis and store the result
into
dest. |
Vector4d |
rotateX(double angle,
Vector4d dest)
Rotate this vector the specified radians around the X axis and store the result
into
dest. |
Vector4d |
rotateY(double angle,
Vector4d dest)
Rotate this vector the specified radians around the Y axis and store the result
into
dest. |
Vector4d |
rotateZ(double angle,
Vector4d dest)
Rotate this vector the specified radians around the Z axis and store the result
into
dest. |
Vector4d |
round(Vector4d dest)
Compute for each component of this vector the closest double that is equal to
a mathematical integer, with ties rounding to positive infinity and store
the result in
dest. |
Vector4d |
smoothStep(Vector4dc v,
double t,
Vector4d dest)
Compute a smooth-step (i.e.
|
Vector4d |
sub(double x,
double y,
double z,
double w,
Vector4d dest)
Subtract
(x, y, z, w) from this and store the result in dest. |
Vector4d |
sub(Vector4dc v,
Vector4d dest)
Subtract the supplied vector from this one and store the result in
dest. |
Vector4d |
sub(Vector4fc v,
Vector4d dest)
Subtract the supplied vector from this one and store the result in
dest. |
double |
w() |
double |
x() |
double |
y() |
double |
z() |
double x()
double y()
double z()
double w()
ByteBuffer get(ByteBuffer buffer)
ByteBuffer at the current
buffer position.
This method will not increment the position of the given ByteBuffer.
In order to specify the offset into the ByteBuffer at which
the vector is stored, use get(int, ByteBuffer), taking
the absolute position as parameter.
buffer - will receive the values of this vector in x, y, z, w orderget(int, ByteBuffer)ByteBuffer get(int index, ByteBuffer buffer)
ByteBuffer starting at the specified
absolute buffer position/index.
This method will not increment the position of the given ByteBuffer.
index - the absolute position into the ByteBufferbuffer - will receive the values of this vector in x, y, z, w orderDoubleBuffer get(DoubleBuffer buffer)
DoubleBuffer at the current
buffer position.
This method will not increment the position of the given DoubleBuffer.
In order to specify the offset into the DoubleBuffer at which
the vector is stored, use get(int, DoubleBuffer), taking
the absolute position as parameter.
buffer - will receive the values of this vector in x, y, z, w orderget(int, DoubleBuffer)DoubleBuffer get(int index, DoubleBuffer buffer)
DoubleBuffer starting at the specified
absolute buffer position/index.
This method will not increment the position of the given DoubleBuffer.
index - the absolute position into the DoubleBufferbuffer - will receive the values of this vector in x, y, z, w orderVector4d sub(Vector4dc v, Vector4d dest)
dest.v - the vector to subtractdest - will hold the resultVector4d sub(Vector4fc v, Vector4d dest)
dest.v - the vector to subtractdest - will hold the resultVector4d sub(double x, double y, double z, double w, Vector4d dest)
(x, y, z, w) from this and store the result in dest.x - the x component to subtracty - the y component to subtractz - the z component to subtractw - the w component to subtractdest - will hold the resultVector4d add(Vector4dc v, Vector4d dest)
dest.v - the vector to adddest - will hold the resultVector4d add(Vector4fc v, Vector4d dest)
dest.v - the vector to adddest - will hold the resultVector4d add(double x, double y, double z, double w, Vector4d dest)
(x, y, z, w) to this and store the result in dest.x - the x component to subtracty - the y component to subtractz - the z component to subtractw - the w component to subtractdest - will hold the resultVector4d fma(Vector4dc a, Vector4dc b, Vector4d dest)
a * b to this vector
and store the result in dest.a - the first multiplicandb - the second multiplicanddest - will hold the resultVector4d fma(double a, Vector4dc b, Vector4d dest)
a * b to this vector
and store the result in dest.a - the first multiplicandb - the second multiplicanddest - will hold the resultVector4d mul(Vector4dc v, Vector4d dest)
v - the vector to multiply this bydest - will hold the resultVector4d mul(Vector4fc v, Vector4d dest)
v - the vector to multiply this bydest - will hold the resultVector4d div(Vector4dc v, Vector4d dest)
v - the vector to divide this bydest - will hold the resultVector4d mul(Matrix4dc mat, Vector4d dest)
Vector4d and store the result in dest.mat - the matrix to multiply this bydest - will hold the resultVector4d mul(Matrix4x3dc mat, Vector4d dest)
dest.mat - the matrix to multiply the vector withdest - the destination vector to hold the resultVector4d mul(Matrix4x3fc mat, Vector4d dest)
dest.mat - the matrix to multiply the vector withdest - the destination vector to hold the resultVector4d mul(Matrix4fc mat, Vector4d dest)
dest.mat - the matrix to multiply this bydest - will hold the resultVector4d mulProject(Matrix4dc mat, Vector4d dest)
mat with this Vector4d, perform perspective division
and store the result in dest.mat - the matrix to multiply this vector bydest - will hold the resultVector4d mul(double scalar, Vector4d dest)
dest.scalar - the factor to multiply bydest - will hold the resultVector4d div(double scalar, Vector4d dest)
dest.scalar - the factor to divide bydest - will hold the resultVector4d rotate(Quaterniondc quat, Vector4d dest)
quat and store the result in dest.quat - the quaternion to transform this vectordest - will hold the resultQuaterniond.transform(Vector4d)Vector4d rotateAxis(double angle, double aX, double aY, double aZ, Vector4d dest)
dest.angle - the angle in radiansaX - the x component of the rotation axisaY - the y component of the rotation axisaZ - the z component of the rotation axisdest - will hold the resultVector4d rotateX(double angle, Vector4d dest)
dest.angle - the angle in radiansdest - will hold the resultVector4d rotateY(double angle, Vector4d dest)
dest.angle - the angle in radiansdest - will hold the resultVector4d rotateZ(double angle, Vector4d dest)
dest.angle - the angle in radiansdest - will hold the resultdouble lengthSquared()
double length()
Vector4d normalize(Vector4d dest)
dest.dest - will hold the resultVector4d normalize(double length, Vector4d dest)
dest.length - the desired lengthdest - will hold the resultVector4d normalize3(Vector4d dest)
(x, y, z) and store the result in dest.dest - will hold the resultdouble distance(Vector4dc v)
v.v - the other vectordouble distance(double x,
double y,
double z,
double w)
this vector and (x, y, z, w).x - the x component of the other vectory - the y component of the other vectorz - the z component of the other vectorw - the w component of the other vectordouble distanceSquared(Vector4dc v)
v.v - the other vectordouble distanceSquared(double x,
double y,
double z,
double w)
this vector and
(x, y, z, w).x - the x component of the other vectory - the y component of the other vectorz - the z component of the other vectorw - the w component of the other vectordouble dot(Vector4dc v)
v.v - the other vectordouble dot(double x,
double y,
double z,
double w)
(x, y, z, w).x - the x component of the other vectory - the y component of the other vectorz - the z component of the other vectorw - the w component of the other vectordouble angleCos(Vector4dc v)
Use this instead of Math.cos(angle(v)).
v - the other vectorangle(Vector4dc)double angle(Vector4dc v)
v - the other vectorangleCos(Vector4dc)Vector4d negate(Vector4d dest)
dest.dest - will hold the resultVector4d min(Vector4dc v, Vector4d dest)
dest to be the component-wise minimum of this and the other vector.v - the other vectordest - will hold the resultVector4d max(Vector4dc v, Vector4d dest)
dest to be the component-wise maximum of this and the other vector.v - the other vectordest - will hold the resultVector4d smoothStep(Vector4dc v, double t, Vector4d dest)
this vector and the given vector v and
store the result in dest.v - the other vectort - the interpolation factor, within [0..1]dest - will hold the resultVector4d hermite(Vector4dc t0, Vector4dc v1, Vector4dc t1, double t, Vector4d dest)
this vector and its
associated tangent t0 and the given vector v
with its tangent t1 and store the result in
dest.t0 - the tangent of this vectorv1 - the other vectort1 - the tangent of the other vectort - the interpolation factor, within [0..1]dest - will hold the resultVector4d lerp(Vector4dc other, double t, Vector4d dest)
this and other using the given interpolation factor t
and store the result in dest.
If t is 0.0 then the result is this. If the interpolation factor is 1.0
then the result is other.
other - the other vectort - the interpolation factor between 0.0 and 1.0dest - will hold the resultdouble get(int component)
throws IllegalArgumentException
component - the component, within [0..3]IllegalArgumentException - if component is not within [0..3]int maxComponent()
[0..3]int minComponent()
[0..3]Vector4d floor(Vector4d dest)
double value that is less than or equal to that
component and is equal to a mathematical integer and store the result in
dest.dest - will hold the resultVector4d ceil(Vector4d dest)
double value that is greater than or equal to that
component and is equal to a mathematical integer and store the result in
dest.dest - will hold the resultVector4d round(Vector4d dest)
dest.dest - will hold the resultboolean isFinite()
NaN and not
infinity.true if all components are finite floating-point values;
false otherwiseboolean equals(Vector4dc v, double delta)
this vector with the given vector using the given delta
and return whether all of them are equal within a maximum difference of delta.
Please note that this method is not used by any data structure such as ArrayList HashSet or HashMap
and their operations, such as ArrayList.contains(Object) or HashSet.remove(Object), since those
data structures only use the Object.equals(Object) and Object.hashCode() methods.
v - the other vectordelta - the allowed maximum differencetrue whether all of the vector components are equal; false otherwiseboolean equals(double x,
double y,
double z,
double w)
this vector with the given (x, y, z, w)
and return whether all of them are equal.x - the x component to compare toy - the y component to compare toz - the z component to compare tow - the w component to compare totrue if all the vector components are equalCopyright © 2015–2019 JOML. All rights reserved.