public interface Vector4ic
| Modifier and Type | Method and Description |
|---|---|
Vector4i |
add(int x,
int y,
int z,
int w,
Vector4i dest)
Increment the components of this vector by the given values and store the
result in
dest. |
Vector4i |
add(Vector4ic v,
Vector4i dest)
Add the supplied vector to this one and store the result in
dest. |
double |
distance(int x,
int y,
int z,
int w)
Return the distance between
this vector and (x, y, z, w). |
double |
distance(Vector4ic v)
Return the distance between this Vector and
v. |
int |
distanceSquared(int x,
int y,
int z,
int w)
Return the square of the distance between
this vector and
(x, y, z, w). |
int |
distanceSquared(Vector4ic v)
Return the square of the distance between this vector and
v. |
Vector4i |
div(float scalar,
Vector4i dest)
Divide all components of this
Vector4i by the given scalar value
and store the result in dest. |
Vector4i |
div(Vector4ic v,
Vector4i dest)
Divide this Vector4i component-wise by another Vector4ic and store the
result in
dest. |
int |
dot(Vector4ic v)
Compute the dot product (inner product) of this vector and
v. |
boolean |
equals(int x,
int y,
int z,
int w)
Compare the vector components of
this vector with the given (x, y, z, w)
and return whether all of them are equal. |
ByteBuffer |
get(ByteBuffer buffer)
Store this vector into the supplied
ByteBuffer at the current
buffer position. |
int |
get(int component)
Get the value of the specified component of this vector.
|
IntBuffer |
get(IntBuffer buffer)
|
ByteBuffer |
get(int index,
ByteBuffer buffer)
Store this vector into the supplied
ByteBuffer starting at the
specified absolute buffer position/index. |
IntBuffer |
get(int index,
IntBuffer buffer)
Store this vector into the supplied
IntBuffer starting at the
specified absolute buffer position/index. |
long |
gridDistance(int x,
int y,
int z,
int w)
Return the grid distance in between (aka 1-Norm, Minkowski or Manhattan distance)
(x, y). |
long |
gridDistance(Vector4ic v)
Return the grid distance in between (aka 1-Norm, Minkowski or Manhattan distance)
(x, y). |
double |
length()
Return the length of this vector.
|
long |
lengthSquared()
Return the length squared of this vector.
|
Vector4i |
max(Vector4ic v,
Vector4i 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.
|
Vector4i |
min(Vector4ic v,
Vector4i 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.
|
Vector4i |
mul(int scalar,
Vector4i dest)
Multiply all components of this
Vector4i by the given scalar
value and store the result in dest. |
Vector4i |
mul(Vector4ic v,
Vector4i dest)
Multiply this Vector4i component-wise by another Vector4ic and store the
result in
dest. |
Vector4i |
negate(Vector4i dest)
Negate this vector and store the result in
dest. |
Vector4i |
sub(int x,
int y,
int z,
int w,
Vector4i dest)
Subtract
(x, y, z, w) from this and store the result in
dest. |
Vector4i |
sub(Vector4ic v,
Vector4i dest)
Subtract the supplied vector from this one and store the result in
dest. |
int |
w() |
int |
x() |
int |
y() |
int |
z() |
int x()
int y()
int z()
int w()
IntBuffer get(IntBuffer buffer)
IntBuffer at the current
buffer position.
This method will not increment the position of the given IntBuffer.
In order to specify the offset into the IntBuffer at which the vector is
stored, use get(int, IntBuffer), taking the absolute position as
parameter.
buffer - will receive the values of this vector in x, y, z, w orderget(int, IntBuffer)IntBuffer get(int index, IntBuffer buffer)
IntBuffer starting at the
specified absolute buffer position/index.
This method will not increment the position of the given IntBuffer.
index - the absolute position into the IntBufferbuffer - will receive the values of this vector in x, y, z, w orderByteBuffer 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 orderVector4i sub(Vector4ic v, Vector4i dest)
dest.v - the vector to subtract from thisdest - will hold the resultVector4i sub(int x, int y, int z, int w, Vector4i 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 resultVector4i add(Vector4ic v, Vector4i dest)
dest.v - the vector to adddest - will hold the resultVector4i add(int x, int y, int z, int w, Vector4i dest)
dest.x - the x component to addy - the y component to addz - the z component to addw - the w component to adddest - will hold the resultVector4i mul(Vector4ic v, Vector4i dest)
dest.v - the other vectordest - will hold the resultVector4i div(Vector4ic v, Vector4i dest)
dest.v - the vector to divide bydest - will hold the resultVector4i mul(int scalar, Vector4i dest)
Vector4i by the given scalar
value and store the result in dest.scalar - the scalar to multiply bydest - will hold the resultVector4i div(float scalar, Vector4i dest)
Vector4i by the given scalar value
and store the result in dest.scalar - the scalar to divide bydest - will hold the resultlong lengthSquared()
double length()
double distance(Vector4ic v)
v.v - the other vectordouble distance(int x,
int y,
int z,
int 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 vectorlong gridDistance(Vector4ic v)
(x, y).v - the other vectorlong gridDistance(int x,
int y,
int z,
int w)
(x, y).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 vectorint distanceSquared(Vector4ic v)
v.v - the other vectorint distanceSquared(int x,
int y,
int z,
int 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 vectorint dot(Vector4ic v)
v.v - the other vectorVector4i negate(Vector4i dest)
dest.dest - will hold the resultVector4i min(Vector4ic v, Vector4i dest)
dest to be the component-wise minimum of this and the other vector.v - the other vectordest - will hold the resultVector4i max(Vector4ic v, Vector4i dest)
dest to be the component-wise maximum of this and the other vector.v - the other vectordest - will hold the resultint 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]boolean equals(int x,
int y,
int z,
int 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.