public class Vector3f extends Object implements Externalizable
| Modifier and Type | Field and Description |
|---|---|
float |
x
The x component of the vector.
|
float |
y
The y component of the vector.
|
float |
z
The z component of the vector.
|
| Constructor and Description |
|---|
Vector3f()
Create a new
Vector3f of (0, 0, 0). |
Vector3f(ByteBuffer buffer)
Create a new
Vector3f and read this vector from the supplied ByteBuffer
at the current buffer position. |
Vector3f(float d)
Create a new
Vector3f and initialize all three components with the given value. |
Vector3f(FloatBuffer buffer)
Create a new
Vector3f and read this vector from the supplied FloatBuffer
at the current buffer position. |
Vector3f(float x,
float y,
float z)
Create a new
Vector3f with the given component values. |
Vector3f(int index,
ByteBuffer buffer)
Create a new
Vector3f and read this vector from the supplied ByteBuffer
starting at the specified absolute buffer position/index. |
Vector3f(int index,
FloatBuffer buffer)
Create a new
Vector3f and read this vector from the supplied FloatBuffer
starting at the specified absolute buffer position/index. |
Vector3f(Vector3f v)
Create a new
Vector3f with the same values as v. |
| Modifier and Type | Method and Description |
|---|---|
Vector3f |
add(float x,
float y,
float z)
Increment the components of this vector by the given values.
|
Vector3f |
add(float x,
float y,
float z,
Vector3f dest)
Increment the components of this vector by the given values and store the result in
dest. |
Vector3f |
add(Vector3f v)
Add the supplied vector to this one.
|
Vector3f |
add(Vector3f v,
Vector3f dest)
Add the supplied vector to this one and store the result in
dest. |
float |
angle(Vector3f v)
Return the angle between this vector and the supplied vector.
|
float |
angleCos(Vector3f v)
Return the cosine of the angle between this vector and the supplied vector.
|
Vector3f |
cross(float x,
float y,
float z)
Set this vector to be the cross product of itself and (x, y, z).
|
Vector3f |
cross(float x,
float y,
float z,
Vector3f dest)
Compute the cross product of this vector and (x, y, z) and store the result in
dest. |
Vector3f |
cross(Vector3f v)
Set this vector to be the cross product of itself and
v. |
Vector3f |
cross(Vector3f v,
Vector3f dest)
Compute the cross product of this vector and
v and store the result in dest. |
float |
distance(float x,
float y,
float z)
Return the distance between
this vector and (x, y, z). |
float |
distance(Vector3f v)
Return the distance between this Vector and
v. |
float |
distanceSquared(float x,
float y,
float z)
Return the square of the distance between
this vector and (x, y, z). |
float |
distanceSquared(Vector3f v)
Return the square of the distance between this vector and
v. |
Vector3f |
div(float scalar)
Divide all components of this
Vector3f by the given scalar
value. |
Vector3f |
div(float x,
float y,
float z)
Divide the components of this Vector3f by the given scalar values and store the result in
this. |
Vector3f |
div(float x,
float y,
float z,
Vector3f dest)
Divide the components of this Vector3f by the given scalar values and store the result in
dest. |
Vector3f |
div(float scalar,
Vector3f dest)
Divide all components of this
Vector3f by the given scalar
value and store the result in dest. |
Vector3f |
div(Vector3f v)
Divide this Vector3f component-wise by another Vector3f.
|
Vector3f |
div(Vector3f v,
Vector3f dest)
Divide this Vector3f component-wise by another Vector3f and store the result in
dest. |
float |
dot(float x,
float y,
float z)
Return the dot product of this vector and the vector (x, y, z).
|
float |
dot(Vector3f v)
Return the dot product of this vector and the supplied vector.
|
boolean |
equals(Object obj) |
Vector3f |
fma(float a,
Vector3f b)
Add the component-wise multiplication of
a * b to this vector. |
Vector3f |
fma(float a,
Vector3f b,
Vector3f dest)
Add the component-wise multiplication of
a * b to this vector
and store the result in dest. |
Vector3f |
fma(Vector3f a,
Vector3f b)
Add the component-wise multiplication of
a * b to this vector. |
Vector3f |
fma(Vector3f a,
Vector3f b,
Vector3f 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. |
FloatBuffer |
get(FloatBuffer buffer)
Store this vector into the supplied
FloatBuffer at the current
buffer position. |
float |
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. |
FloatBuffer |
get(int index,
FloatBuffer buffer)
Store this vector into the supplied
FloatBuffer starting at the specified
absolute buffer position/index. |
Vector3f |
half(float x,
float y,
float z)
Compute the half vector between this and the vector (x, y, z).
|
Vector3f |
half(float x,
float y,
float z,
Vector3f dest)
Compute the half vector between this and the vector (x, y, z)
and store the result in
dest. |
Vector3f |
half(Vector3f other)
Compute the half vector between this and the other vector.
|
Vector3f |
half(Vector3f other,
Vector3f dest)
Compute the half vector between this and the other vector and store the result in
dest. |
int |
hashCode() |
Vector3f |
hermite(Vector3f t0,
Vector3f v1,
Vector3f t1,
float t,
Vector3f dest)
Compute a hermite interpolation between
this vector with its
associated tangent t0 and the given vector v
with its tangent t1 and store the result in
dest. |
float |
length()
Return the length of this vector.
|
float |
lengthSquared()
Return the length squared of this vector.
|
Vector3f |
lerp(Vector3f other,
float t)
Linearly interpolate
this and other using the given interpolation factor t
and store the result in this. |
Vector3f |
lerp(Vector3f other,
float t,
Vector3f dest)
Linearly interpolate
this and other using the given interpolation factor t
and store the result in dest. |
Vector3f |
max(Vector3f v)
Set the components of this vector to be the component-wise maximum of this and the other vector.
|
int |
maxComponent()
Determine the component with the biggest absolute value.
|
Vector3f |
min(Vector3f v)
Set the components of this vector to be the component-wise minimum of this and the other vector.
|
int |
minComponent()
Determine the component with the smallest (towards zero) absolute value.
|
Vector3f |
mul(float scalar)
Multiply all components of this
Vector3f by the given scalar
value. |
Vector3f |
mul(float x,
float y,
float z)
Multiply the components of this Vector3f by the given scalar values and store the result in
this. |
Vector3f |
mul(float x,
float y,
float z,
Vector3f dest)
Multiply the components of this Vector3f by the given scalar values and store the result in
dest. |
Vector3f |
mul(float scalar,
Vector3f dest)
Multiply all components of this
Vector3f by the given scalar
value and store the result in dest. |
Vector3f |
mul(Matrix3f mat)
Multiply this Vector3f by the given matrix and store the result in
this. |
Vector3f |
mul(Matrix3f mat,
Vector3f dest)
Multiply this Vector3f by the given matrix and store the result in
dest. |
Vector3f |
mul(Vector3f v)
Multiply this Vector3f component-wise by another Vector3f.
|
Vector3f |
mul(Vector3f v,
Vector3f dest)
Multiply this Vector3f component-wise by another Vector3f and store the result in
dest. |
Vector3f |
mulDirection(Matrix4f mat)
Multiply
this by the given 4x4 matrix mat. |
Vector3f |
mulDirection(Matrix4f mat,
Vector3f dest)
Multiply
this by the given 4x4 matrix mat and store the
result in dest. |
Vector3f |
mulPosition(Matrix4f mat)
Multiply
this by the given 4x4 matrix mat. |
Vector3f |
mulPosition(Matrix4f mat,
Vector3f dest)
Multiply
this by the given 4x4 matrix mat and store the
result in dest. |
float |
mulPositionW(Matrix4f mat)
Multiply
this by the given 4x4 matrix mat and return the w component
of the resulting 4D vector. |
float |
mulPositionW(Matrix4f mat,
Vector3f dest)
Multiply
this by the given 4x4 matrix mat, store the
result in dest and return the w component of the resulting 4D vector. |
Vector3f |
mulProject(Matrix4f mat)
Multiply this Vector3f by the given matrix
mat, perform perspective division. |
Vector3f |
mulProject(Matrix4f mat,
Vector3f dest)
Multiply this Vector3f by the given matrix
mat, perform perspective division
and store the result in dest. |
Vector3f |
negate()
Negate this vector.
|
Vector3f |
negate(Vector3f dest)
Negate this vector and store the result in
dest. |
Vector3f |
normalize()
Normalize this vector.
|
Vector3f |
normalize(Vector3f dest)
Normalize this vector and store the result in
dest. |
void |
readExternal(ObjectInput in) |
Vector3f |
reflect(float x,
float y,
float z)
Reflect this vector about the given normal vector.
|
Vector3f |
reflect(float x,
float y,
float z,
Vector3f dest)
Reflect this vector about the given normal vector and store the result in
dest. |
Vector3f |
reflect(Vector3f normal)
Reflect this vector about the given
normal vector. |
Vector3f |
reflect(Vector3f normal,
Vector3f dest)
Reflect this vector about the given
normal vector and store the result in dest. |
Vector3f |
rotate(Quaternionf quat)
Rotate this vector by the given quaternion
quat and store the result in this. |
Vector3f |
rotate(Quaternionf quat,
Vector3f dest)
Rotate this vector by the given quaternion
quat and store the result in dest. |
Vector3f |
set(ByteBuffer buffer)
Read this vector from the supplied
ByteBuffer at the current
buffer position. |
Vector3f |
set(float d)
Set the x, y, and z components to the supplied value.
|
Vector3f |
set(FloatBuffer buffer)
Read this vector from the supplied
FloatBuffer at the current
buffer position. |
Vector3f |
set(float x,
float y,
float z)
Set the x, y and z components to the supplied values.
|
Vector3f |
set(int index,
ByteBuffer buffer)
Read this vector from the supplied
ByteBuffer starting at the specified
absolute buffer position/index. |
Vector3f |
set(int component,
float value)
Set the value of the specified component of this vector.
|
Vector3f |
set(int index,
FloatBuffer buffer)
Read this vector from the supplied
FloatBuffer starting at the specified
absolute buffer position/index. |
Vector3f |
set(Vector3f v)
Set the x, y and z components to match the supplied vector.
|
Vector3f |
smoothStep(Vector3f v,
float t,
Vector3f dest)
Compute a smooth-step (i.e. hermite with zero tangents) interpolation
between
this vector and the given vector v and
store the result in dest. |
Vector3f |
sub(float x,
float y,
float z)
Decrement the components of this vector by the given values.
|
Vector3f |
sub(float x,
float y,
float z,
Vector3f dest)
Decrement the components of this vector by the given values and store the result in
dest. |
Vector3f |
sub(Vector3f v)
Subtract the supplied vector from this one and store the result in
this. |
Vector3f |
sub(Vector3f v,
Vector3f dest)
Subtract the supplied vector from this one and store the result in
dest. |
String |
toString()
Return a string representation of this vector.
|
String |
toString(NumberFormat formatter)
Return a string representation of this vector by formatting the vector components with the given
NumberFormat. |
void |
writeExternal(ObjectOutput out) |
Vector3f |
zero()
Set all components to zero.
|
public float x
public float y
public float z
public Vector3f()
Vector3f of (0, 0, 0).public Vector3f(float d)
Vector3f and initialize all three components with the given value.d - the value of all three componentspublic Vector3f(float x,
float y,
float z)
Vector3f with the given component values.x - the value of xy - the value of yz - the value of zpublic Vector3f(Vector3f v)
Vector3f with the same values as v.v - the Vector3f to copy the values frompublic Vector3f(ByteBuffer buffer)
Vector3f and read this vector from the supplied 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 read, use Vector3f(int, ByteBuffer), taking
the absolute position as parameter.
buffer - values will be read in x, y, z orderVector3f(int, ByteBuffer)public Vector3f(int index,
ByteBuffer buffer)
Vector3f and read this vector from the supplied 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 - values will be read in x, y, z orderpublic Vector3f(FloatBuffer buffer)
Vector3f and read this vector from the supplied FloatBuffer
at the current buffer position.
This method will not increment the position of the given FloatBuffer.
In order to specify the offset into the FloatBuffer at which
the vector is read, use Vector3f(int, FloatBuffer), taking
the absolute position as parameter.
buffer - values will be read in x, y, z orderVector3f(int, FloatBuffer)public Vector3f(int index,
FloatBuffer buffer)
Vector3f and read this vector from the supplied FloatBuffer
starting at the specified absolute buffer position/index.
This method will not increment the position of the given FloatBuffer.
index - the absolute position into the FloatBufferbuffer - values will be read in x, y, z orderpublic Vector3f set(Vector3f v)
v - contains the values of x, y and z to setpublic Vector3f set(float d)
d - the value of all three componentspublic Vector3f set(float x, float y, float z)
x - the x componenty - the y componentz - the z componentpublic Vector3f set(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 read, use set(int, ByteBuffer), taking
the absolute position as parameter.
buffer - values will be read in x, y, z orderset(int, ByteBuffer)public Vector3f set(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 - values will be read in x, y, z orderpublic Vector3f set(FloatBuffer buffer)
FloatBuffer at the current
buffer position.
This method will not increment the position of the given FloatBuffer.
In order to specify the offset into the FloatBuffer at which
the vector is read, use set(int, FloatBuffer), taking
the absolute position as parameter.
buffer - values will be read in x, y, z orderset(int, FloatBuffer)public Vector3f set(int index, FloatBuffer buffer)
FloatBuffer starting at the specified
absolute buffer position/index.
This method will not increment the position of the given FloatBuffer.
index - the absolute position into the FloatBufferbuffer - values will be read in x, y, z orderpublic FloatBuffer get(FloatBuffer buffer)
FloatBuffer at the current
buffer position.
This method will not increment the position of the given FloatBuffer.
In order to specify the offset into the FloatBuffer at which
the vector is stored, use get(int, FloatBuffer), taking
the absolute position as parameter.
buffer - will receive the values of this vector in x, y, z orderget(int, FloatBuffer),
get(int, FloatBuffer)public FloatBuffer get(int index, FloatBuffer buffer)
FloatBuffer starting at the specified
absolute buffer position/index.
This method will not increment the position of the given FloatBuffer.
index - the absolute position into the FloatBufferbuffer - will receive the values of this vector in x, y, z orderpublic 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 orderget(int, ByteBuffer),
get(int, ByteBuffer)public 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 orderpublic Vector3f sub(Vector3f v)
this.v - the vector to subtractpublic Vector3f sub(Vector3f v, Vector3f dest)
dest.v - the vector to subtractdest - will hold the resultpublic Vector3f sub(float x, float y, float z)
x - the x component to subtracty - the y component to subtractz - the z component to subtractpublic Vector3f sub(float x, float y, float z, Vector3f dest)
dest.x - the x component to subtracty - the y component to subtractz - the z component to subtractdest - will hold the resultpublic Vector3f add(Vector3f v)
v - the vector to addpublic Vector3f add(Vector3f v, Vector3f dest)
dest.v - the vector to adddest - will hold the resultpublic Vector3f add(float x, float y, float z)
x - the x component to addy - the y component to addz - the z component to addpublic Vector3f add(float x, float y, float z, Vector3f dest)
dest.x - the x component to addy - the y component to addz - the z component to adddest - will hold the resultpublic Vector3f fma(Vector3f a, Vector3f b)
a * b to this vector.a - the first multiplicandb - the second multiplicandpublic Vector3f fma(float a, Vector3f b)
a * b to this vector.a - the first multiplicandb - the second multiplicandpublic Vector3f fma(Vector3f a, Vector3f b, Vector3f dest)
a * b to this vector
and store the result in dest.a - the first multiplicandb - the second multiplicanddest - will hold the resultpublic Vector3f fma(float a, Vector3f b, Vector3f dest)
a * b to this vector
and store the result in dest.a - the first multiplicandb - the second multiplicanddest - will hold the resultpublic Vector3f mul(Vector3f v)
v - the vector to multiply bypublic Vector3f mul(Vector3f v, Vector3f dest)
dest.v - the vector to multiply bydest - will hold the resultpublic Vector3f div(Vector3f v)
v - the vector to divide bypublic Vector3f div(Vector3f v, Vector3f dest)
dest.v - the vector to divide bydest - will hold the resultpublic Vector3f mulProject(Matrix4f mat, Vector3f dest)
mat, perform perspective division
and store the result in dest.
This method uses w=1.0 as the fourth vector component.
mat - the matrix to multiply this vector bydest - will hold the resultpublic Vector3f mulProject(Matrix4f mat)
mat, perform perspective division.
This method uses w=1.0 as the fourth vector component.
mat - the matrix to multiply this vector bypublic Vector3f mul(Matrix3f mat)
this.mat - the matrixpublic Vector3f mul(Matrix3f mat, Vector3f dest)
dest.mat - the matrixdest - will hold the resultpublic Vector3f mulPosition(Matrix4f mat)
this by the given 4x4 matrix mat.
This method assumes the w component of this to be 1.0.
mat - the matrix to multiply this vector bypublic Vector3f mulPosition(Matrix4f mat, Vector3f dest)
this by the given 4x4 matrix mat and store the
result in dest.
This method assumes the w component of this to be 1.0.
mat - the matrix to multiply this vector bydest - will hold the resultpublic float mulPositionW(Matrix4f mat)
this by the given 4x4 matrix mat and return the w component
of the resulting 4D vector.
This method assumes the w component of this to be 1.0.
mat - the matrix to multiply this vector bypublic float mulPositionW(Matrix4f mat, Vector3f dest)
this by the given 4x4 matrix mat, store the
result in dest and return the w component of the resulting 4D vector.
This method assumes the w component of this to be 1.0.
mat - the matrix to multiply this vector bydest - will hold the (x, y, z) components of the resulting vectorpublic Vector3f mulDirection(Matrix4f mat)
this by the given 4x4 matrix mat.
This method assumes the w component of this to be 0.0.
mat - the matrix to multiply this vector bypublic Vector3f mulDirection(Matrix4f mat, Vector3f dest)
this by the given 4x4 matrix mat and store the
result in dest.
This method assumes the w component of this to be 0.0.
mat - the matrix to multiply this vector bydest - will hold the resultpublic Vector3f mul(float scalar)
Vector3f by the given scalar
value.scalar - the scalar to multiply this vector bypublic Vector3f mul(float scalar, Vector3f dest)
Vector3f by the given scalar
value and store the result in dest.scalar - the scalar to multiply this vector bydest - will hold the resultpublic Vector3f mul(float x, float y, float z)
this.x - the x component to multiply this vector byy - the y component to multiply this vector byz - the z component to multiply this vector bypublic Vector3f mul(float x, float y, float z, Vector3f dest)
dest.x - the x component to multiply this vector byy - the y component to multiply this vector byz - the z component to multiply this vector bydest - will hold the resultpublic Vector3f div(float scalar)
Vector3f by the given scalar
value.scalar - the scalar to divide bypublic Vector3f div(float scalar, Vector3f dest)
Vector3f by the given scalar
value and store the result in dest.scalar - the scalar to divide bydest - will hold the resultpublic Vector3f div(float x, float y, float z)
this.x - the x component to divide this vector byy - the y component to divide this vector byz - the z component to divide this vector bypublic Vector3f div(float x, float y, float z, Vector3f dest)
dest.x - the x component to divide this vector byy - the y component to divide this vector byz - the z component to divide this vector bydest - will hold the resultpublic Vector3f rotate(Quaternionf quat)
quat and store the result in this.quat - the quaternion to rotate this vectorQuaternionf.transform(Vector3f)public Vector3f rotate(Quaternionf quat, Vector3f dest)
quat and store the result in dest.quat - the quaternion to rotate this vectordest - will hold the resultQuaternionf.transform(Vector3f)public float lengthSquared()
public float length()
public Vector3f normalize()
public Vector3f normalize(Vector3f dest)
dest.dest - will hold the resultpublic Vector3f cross(Vector3f v)
v.v - the other vectorpublic Vector3f cross(float x, float y, float z)
x - the x component of the other vectory - the y component of the other vectorz - the z component of the other vectorpublic Vector3f cross(Vector3f v, Vector3f dest)
v and store the result in dest.v - the other vectordest - will hold the resultpublic Vector3f cross(float x, float y, float z, Vector3f dest)
dest.x - the x component of the other vectory - the y component of the other vectorz - the z component of the other vectordest - will hold the resultpublic float distance(Vector3f v)
v.v - the other vectorpublic float distance(float x,
float y,
float z)
this vector and (x, y, z).x - the x component of the other vectory - the y component of the other vectorz - the z component of the other vectorpublic float distanceSquared(Vector3f v)
v.v - the other vectorpublic float distanceSquared(float x,
float y,
float z)
this vector and (x, y, z).x - the x component of the other vectory - the y component of the other vectorz - the z component of the other vectorpublic float dot(Vector3f v)
v - the other vectorpublic float dot(float x,
float y,
float z)
x - the x component of the other vectory - the y component of the other vectorz - the z component of the other vectorpublic float angleCos(Vector3f v)
v - the other vectorangle(Vector3f)public float angle(Vector3f v)
v - the other vectorangleCos(Vector3f)public Vector3f min(Vector3f v)
v - the other vectorpublic Vector3f max(Vector3f v)
v - the other vectorpublic Vector3f zero()
public String toString()
This method creates a new DecimalFormat on every invocation with the format string " 0.000E0;-".
public String toString(NumberFormat formatter)
NumberFormat.formatter - the NumberFormat used to format the vector components withpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic Vector3f negate()
public Vector3f negate(Vector3f dest)
dest.dest - will hold the resultpublic Vector3f reflect(Vector3f normal)
normal vector.normal - the vector to reflect aboutpublic Vector3f reflect(float x, float y, float z)
x - the x component of the normaly - the y component of the normalz - the z component of the normalpublic Vector3f reflect(Vector3f normal, Vector3f dest)
normal vector and store the result in dest.normal - the vector to reflect aboutdest - will hold the resultpublic Vector3f reflect(float x, float y, float z, Vector3f dest)
dest.x - the x component of the normaly - the y component of the normalz - the z component of the normaldest - will hold the resultpublic Vector3f half(Vector3f other)
other - the other vectorpublic Vector3f half(float x, float y, float z)
x - the x component of the other vectory - the y component of the other vectorz - the z component of the other vectorpublic Vector3f half(Vector3f other, Vector3f dest)
dest.other - the other vectordest - will hold the resultpublic Vector3f half(float x, float y, float z, Vector3f dest)
dest.x - the x component of the other vectory - the y component of the other vectorz - the z component of the other vectordest - will hold the resultpublic Vector3f smoothStep(Vector3f v, float t, Vector3f 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 resultpublic Vector3f hermite(Vector3f t0, Vector3f v1, Vector3f t1, float t, Vector3f dest)
this vector with 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 resultpublic Vector3f lerp(Vector3f other, float t)
this and other using the given interpolation factor t
and store the result in this.
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.0public Vector3f lerp(Vector3f other, float t, Vector3f 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 resultpublic float get(int component)
throws IllegalArgumentException
component - the component, within [0..2]IllegalArgumentException - if component is not within [0..2]public Vector3f set(int component, float value) throws IllegalArgumentException
component - the component whose value to set, within [0..2]value - the value to setIllegalArgumentException - if component is not within [0..2]public int maxComponent()
public int minComponent()
Copyright © 2015–2016 JOML. All rights reserved.