public interface Vector3ic
| Modifier and Type | Method and Description |
|---|---|
Vector3i |
add(int x,
int y,
int z,
Vector3i dest)
Increment the components of this vector by the given values and store the
result in
dest. |
Vector3i |
add(Vector3ic v,
Vector3i dest)
Add the supplied vector to this one and store the result in
dest. |
double |
distance(int x,
int y,
int z)
Return the distance between
this vector and (x, y, z). |
double |
distance(Vector3ic v)
Return the distance between this Vector and
v. |
long |
distanceSquared(int x,
int y,
int z)
Return the square of the distance between
this vector and (x, y, z). |
long |
distanceSquared(Vector3ic v)
Return the square of the distance between this vector and
v. |
boolean |
equals(int x,
int y,
int z)
Compare the vector components of
this vector with the given (x, y, z)
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)
Return the grid distance in between (aka 1-Norm, Minkowski or Manhattan distance)
(x, y). |
long |
gridDistance(Vector3ic 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.
|
Vector3i |
max(Vector3ic v,
Vector3i 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.
|
Vector3i |
min(Vector3ic v,
Vector3i 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.
|
Vector3i |
mul(int x,
int y,
int z,
Vector3i dest)
Multiply the components of this vector by the given values and store the
result in
dest. |
Vector3i |
mul(int scalar,
Vector3i dest)
Multiply the components of this vector by the given scalar and store the result in
dest. |
Vector3i |
mul(Vector3ic v,
Vector3i dest)
Multiply the supplied vector by this one and store the result in
dest. |
Vector3i |
negate(Vector3i dest)
Negate this vector and store the result in
dest. |
Vector3i |
sub(int x,
int y,
int z,
Vector3i dest)
Decrement the components of this vector by the given values and store the
result in
dest. |
Vector3i |
sub(Vector3ic v,
Vector3i dest)
Subtract the supplied vector from this one and store the result in
dest. |
int |
x() |
int |
y() |
int |
z() |
int x()
int y()
int z()
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 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 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 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 orderVector3i sub(Vector3ic v, Vector3i dest)
dest.v - the vector to subtractdest - will hold the resultVector3i sub(int x, int y, int z, Vector3i dest)
dest.x - the x component to subtracty - the y component to subtractz - the z component to subtractdest - will hold the resultVector3i add(Vector3ic v, Vector3i dest)
dest.v - the vector to adddest - will hold the resultVector3i add(int x, int y, int z, Vector3i dest)
dest.x - the x component to addy - the y component to addz - the z component to adddest - will hold the resultVector3i mul(int scalar, Vector3i dest)
dest.scalar - the value to multiply this vector's components bydest - will hold the resultVector3i mul(Vector3ic v, Vector3i dest)
dest.v - the vector to multiplydest - will hold the resultVector3i mul(int x, int y, int z, Vector3i dest)
dest.x - the x component to multiplyy - the y component to multiplyz - the z component to multiplydest - will hold the resultlong lengthSquared()
double length()
double distance(Vector3ic v)
v.v - the other vectordouble distance(int x,
int y,
int 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 vectorlong gridDistance(Vector3ic v)
(x, y).v - the other vectorlong gridDistance(int x,
int y,
int z)
(x, y).x - the x component of the other vectory - the y component of the other vectorz - the y component of the other vectorlong distanceSquared(Vector3ic v)
v.v - the other vectorlong distanceSquared(int x,
int y,
int 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 vectorVector3i negate(Vector3i dest)
dest.dest - will hold the resultVector3i min(Vector3ic v, Vector3i dest)
dest to be the component-wise minimum of this and the other vector.v - the other vectordest - will hold the resultVector3i max(Vector3ic v, Vector3i 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..2]IllegalArgumentException - if component is not within [0..2]int maxComponent()
[0..2]int minComponent()
[0..2]boolean equals(int x,
int y,
int z)
this vector with the given (x, y, z)
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 totrue if all the vector components are equalCopyright © 2015–2019 JOML. All rights reserved.