public final class TextureCoordinate4DF extends Object implements IEquatable<TextureCoordinate4DF>, ImmutableValueType
Constructor and Description |
---|
TextureCoordinate4DF()
Initializes a new instance.
|
TextureCoordinate4DF(float[] elements)
Initializes a set of
TextureCoordinate4DF coordinates from the first four consecutive elements in the provided array. |
TextureCoordinate4DF(float[] elements,
int startIndex)
Initializes a set of
TextureCoordinate4DF coordinates from four consecutive elements in the provided array. |
TextureCoordinate4DF(float s,
float t,
float p,
float q)
Initializes a
TextureCoordinate4DF from four parameters. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Indicates whether another object is exactly equal to this instance.
|
static boolean |
equals(TextureCoordinate4DF left,
TextureCoordinate4DF right)
Returns
true if the two instances are exactly equal. |
boolean |
equalsEpsilon(TextureCoordinate4DF other,
double epsilon)
Indicates whether each coordinate parameter of another instance of this type
is within the required tolerance of the corresponding coordinate parameter.
|
boolean |
equalsType(TextureCoordinate4DF other)
Indicates whether another instance of this type is exactly equal to this instance.
|
float |
get(int index)
Gets the value of the specified element with
index of 0, 1, 2, and 3 corresponding to the coordinates
S, T, P, and Q. |
int |
getLength()
Gets the number of elements in this set of coordinates.
|
float |
getP()
Gets the p coordinate.
|
float |
getQ()
Gets the q coordinate.
|
float |
getS()
Gets the s coordinate.
|
float |
getT()
Gets the t coordinate.
|
static TextureCoordinate4DF |
getZero()
Gets a set of
TextureCoordinate4DF parameters with values of zero. |
int |
hashCode()
Returns a hash code for this instance, which is suitable for use in hashing algorithms and data structures like a hash table.
|
static boolean |
notEquals(TextureCoordinate4DF left,
TextureCoordinate4DF right)
Returns
true if the two instances are not exactly equal. |
String |
toString()
Returns the string representation of the value of this instance.
|
public TextureCoordinate4DF()
public TextureCoordinate4DF(float s, float t, float p, float q)
TextureCoordinate4DF
from four parameters.s
- The s (x) coordinate.t
- The t (y) coordinate.p
- The p (z) coordinate.q
- The q (w) coordinate.public TextureCoordinate4DF(@Nonnull float[] elements)
TextureCoordinate4DF
coordinates from the first four consecutive elements in the provided array.elements
- The array of coordinate values.ArgumentNullException
- The array of elements
cannot be null
.ArgumentOutOfRangeException
- An object of this type must be constructed from an array with at least four elements
.public TextureCoordinate4DF(@Nonnull float[] elements, int startIndex)
TextureCoordinate4DF
coordinates from four consecutive elements in the provided array.elements
- The array of coordinate values.startIndex
- The index of the first element in the array to use.ArgumentNullException
- Thrown when the array of elements
is null
.ArgumentOutOfRangeException
- Thrown when an object of this type is constructed from an array with less than four elements
.@Nonnull public static TextureCoordinate4DF getZero()
TextureCoordinate4DF
parameters with values of zero.public final float getS()
public final float getT()
public final float getP()
public final float getQ()
public final int getLength()
public final float get(int index)
index
of 0, 1, 2, and 3 corresponding to the coordinates
S, T, P, and Q.index
- The index to retrieve.index
.ArgumentOutOfRangeException
- Thrown when the index
is less than 0 or is equal to or greater than Length
(get
).public boolean equals(Object obj)
equals
in class Object
obj
- The object to compare to this instance.true
if obj
is an instance of this type and represents the same value as this instance; otherwise false
.Object.hashCode()
,
HashMap
public final boolean equalsType(@Nonnull TextureCoordinate4DF other)
equalsType
in interface IEquatable<TextureCoordinate4DF>
other
- The instance to compare to this instance.true
if other
represents the same value as this instance; otherwise false
.public final boolean equalsEpsilon(@Nonnull TextureCoordinate4DF other, double epsilon)
other
- The set of TextureCoordinate4DF
parameters to compare to this instance.epsilon
- The limit at which the absolute differences between the values will not be considered equal.true
if the absolute differences are less than or equal to epsilon
; otherwise, false
.public int hashCode()
hashCode
in class Object
Object.equals(java.lang.Object)
,
System.identityHashCode(java.lang.Object)
public String toString()
public static boolean equals(@Nonnull TextureCoordinate4DF left, @Nonnull TextureCoordinate4DF right)
true
if the two instances are exactly equal.left
- The instance to compare to right
.right
- The instance to compare to left
.true
if left
represents the same value as right
; otherwise false
.public static boolean notEquals(@Nonnull TextureCoordinate4DF left, @Nonnull TextureCoordinate4DF right)
true
if the two instances are not exactly equal.left
- The instance to compare to right
.right
- The instance to compare to left
.true
if left
does not represent the same value as right
; otherwise false
.