Point3DBasics
, Point3DReadOnly
, Tuple3DBasics
, Vector3DBasics
, Vector3DReadOnly
Point3D
, Point3D32
, Vector3D
, Vector3D32
public interface Tuple3DReadOnly
A tuple is an abstract geometry object holding onto the common math between a 3D point and vector.
Although a point and vector hold onto the same type of information, the distinction is made between them as they represent different geometry objects and are typically not handled the same way:
Modifier and Type | Method | Description |
---|---|---|
default boolean |
containsNaN() |
Tests if this tuple contains a
Double.NaN . |
default boolean |
epsilonEquals(Tuple3DReadOnly other,
double epsilon) |
Tests on a per component basis if this tuple is equal to the given
other to an
epsilon . |
default boolean |
equals(Tuple3DReadOnly other) |
Tests on a per component basis, if this tuple is exactly equal to
other . |
default void |
get(double[] tupleArrayToPack) |
Packs the components
x , y , z in order in an array starting from its
first index. |
default void |
get(float[] tupleArrayToPack) |
Packs the components
x , y , z in order in an array starting from its
first index. |
default void |
get(int startIndex,
double[] tupleArrayToPack) |
Packs the components
x , y , z in order in an array starting from
startIndex . |
default void |
get(int startIndex,
float[] tupleArrayToPack) |
Packs the components
x , y , z in order in an array starting from
startIndex . |
default void |
get(int startRow,
int column,
org.ejml.data.DenseMatrix64F tupleMatrixToPack) |
Packs the components
x , y , z in order in a column vector starting from
startRow at the column index column . |
default void |
get(int startRow,
org.ejml.data.DenseMatrix64F tupleMatrixToPack) |
Packs the components
x , y , z in order in a column vector starting from
startRow . |
default void |
get(org.ejml.data.DenseMatrix64F tupleMatrixToPack) |
Packs the components
x , y , z in order in a column vector starting from
its first row index. |
default double |
getElement(int index) |
Selects a component of this tuple based on
index and returns its value. |
default double |
getElement32(int index) |
Selects a component of this tuple based on
index and returns its value. |
double |
getX() |
Returns the x-component of this tuple.
|
default float |
getX32() |
Returns the x-component of this tuple.
|
double |
getY() |
Returns the y-component of this tuple.
|
default float |
getY32() |
Returns the y-component of this tuple.
|
double |
getZ() |
Returns the z-component of this tuple.
|
default float |
getZ32() |
Returns the z-component of this tuple.
|
double getX()
double getY()
double getZ()
default float getX32()
default float getY32()
default float getZ32()
default boolean containsNaN()
Double.NaN
.true
if this tuple contains a Double.NaN
, false
otherwise.default double getElement(int index)
index
and returns its value.
For an index
of 0, the corresponding component is x
, 1 it is y
, 2 it
is z
.
index
- the index of the component to get.java.lang.IndexOutOfBoundsException
- if index
∉ [0, 2].default double getElement32(int index)
index
and returns its value.
For an index
of 0, the corresponding component is x
, 1 it is y
, 2 it
is z
.
index
- the index of the component to get.java.lang.IndexOutOfBoundsException
- if index
∉ [0, 2].default void get(double[] tupleArrayToPack)
x
, y
, z
in order in an array starting from its
first index.tupleArrayToPack
- the array in which this tuple is stored. Modified.default void get(int startIndex, double[] tupleArrayToPack)
x
, y
, z
in order in an array starting from
startIndex
.startIndex
- the index in the array where the first component is stored.tupleArrayToPack
- the array in which this tuple is stored. Modified.default void get(float[] tupleArrayToPack)
x
, y
, z
in order in an array starting from its
first index.tupleArrayToPack
- the array in which this tuple is stored. Modified.default void get(int startIndex, float[] tupleArrayToPack)
x
, y
, z
in order in an array starting from
startIndex
.startIndex
- the index in the array where the first component is stored.tupleArrayToPack
- the array in which this tuple is stored. Modified.default void get(org.ejml.data.DenseMatrix64F tupleMatrixToPack)
x
, y
, z
in order in a column vector starting from
its first row index.tupleMatrixToPack
- the array in which this tuple is stored. Modified.default void get(int startRow, org.ejml.data.DenseMatrix64F tupleMatrixToPack)
x
, y
, z
in order in a column vector starting from
startRow
.startRow
- the first row index to start writing in the dense-matrix.tupleMatrixToPack
- the column vector in which this tuple is stored. Modified.default void get(int startRow, int column, org.ejml.data.DenseMatrix64F tupleMatrixToPack)
x
, y
, z
in order in a column vector starting from
startRow
at the column index column
.startRow
- the first row index to start writing in the dense-matrix.column
- the column index to write in the dense-matrix.tupleMatrixToPack
- the matrix in which this tuple is stored. Modified.default boolean epsilonEquals(Tuple3DReadOnly other, double epsilon)
other
to an
epsilon
.other
- the other tuple to compare against this. Not modified.epsilon
- the tolerance to use when comparing each component.true
if the two tuples are equal, false
otherwise.default boolean equals(Tuple3DReadOnly other)
other
.other
- the other tuple to compare against this. Not modified.true
if the two tuples are exactly equal component-wise, false
otherwise.