|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmali.vecmath2.TexCoordf
public abstract class TexCoordf
A simple abstract Texture-Coordinate.
The order is (s, t, p, q).
| Field Summary | |
|---|---|
protected boolean |
isDirty
|
protected int |
N
|
protected int |
roTrick
|
protected float[] |
values
|
| Constructor Summary | |
|---|---|
TexCoordf(boolean readOnly,
float[] values)
Creates a new TexCoord1f instance. |
|
TexCoordf(float[] values)
Creates a new TexCoord1f instance. |
|
| Method Summary | |
|---|---|
TexCoordf |
add(TexCoordf texCoord2)
Sets the value of this tuple to the vector sum of itself and tuple t1. |
TexCoordf |
add(TexCoordf texCoord1,
TexCoordf texCoord2)
Sets the value of this texCoord to the vector sum of colors texCoord1 and texCoord2. |
TexCoordf |
clamp(float min,
float max)
Clamps this tuple to the range [min, max]. |
TexCoordf |
clamp(float min,
float max,
TexCoordf vec)
Clamps the tuple parameter to the range [min, max] and places the values into this tuple. |
TexCoordf |
clampMax(float max)
Clamps the maximum value of this tuple to the max parameter. |
TexCoordf |
clampMax(float max,
TexCoordf vec)
Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple. |
TexCoordf |
clampMin(float min)
Clamps the minimum value of this tuple to the min parameter. |
TexCoordf |
clampMin(float min,
TexCoordf vec)
Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple. |
int |
deserialize(int pos,
byte[] buffer)
Deserializes this instanc'es data from the byte array. |
boolean |
epsilonEquals(TexCoordf texCoord2,
float epsilon)
Returns true if the L-infinite distance between this tuple and tuple t1 is less than or equal to the epsilon parameter, otherwise returns false. |
boolean |
equals(java.lang.Object o)
Returns true if the Object t1 is of type Tuple3f and all of the data members of t1 are equal to the corresponding data members in this Tuple3f. |
boolean |
equals(TexCoordf texCoord2)
Returns true if all of the data members of Tuple3f t1 are equal to the corresponding data members in this |
void |
get(float[] buffer)
Writes all values of this Tuple to the specified buffer. |
void |
get(TexCoordf buffer)
Writes all values of this vector to the specified buffer vector. |
protected int |
getSerializationBufferSize()
|
int |
getSize()
|
int |
hashCode()
Returns a hash number based on the data values in this object. |
void |
interpolate(TexCoordf texCoord2,
float alpha)
Linearly interpolates between this tuple and tuple t2 and places the result into this tuple: this = (1 - alpha) * this + alpha * t1. |
void |
interpolate(TexCoordf texCoord1,
TexCoordf texCoord2,
float alpha)
Linearly interpolates between tuples t1 and t2 and places the result into this tuple: this = (1 - alpha) * t1 + alpha * t2. |
boolean |
isDirty()
|
boolean |
isReadOnly()
|
protected static float[] |
newArray(float[] template,
int length)
|
void |
readExternal(java.io.ObjectInput in)
|
TexCoordf |
scaleAdd(float factor,
TexCoordf texCoord2)
Sets the value of this tuple to the scalar multiplication of itself and then adds tuple t1 (this = s*this + t1). |
TexCoordf |
scaleAdd(float factor,
TexCoordf texCoord1,
TexCoordf texCoord2)
Sets the value of this tuple to the scalar multiplication of tuple t1 and then adds tuple t2 (this = s*t1 + t2). |
int |
serialize(int pos,
byte[] buffer)
Serializes this instanc'es data into the byte array. |
TexCoordf |
set(float[] values)
Sets all values of this TexCoord to the specified ones. |
TexCoordf |
set(TexCoordf texCoord)
Sets all values of this Tuple to the specified ones. |
boolean |
setClean()
Marks this tuple non-dirty. |
TexCoordf |
setZero()
Sets all components to zero. |
TexCoordf |
sub(TexCoordf texCoord2)
Sets the value of this texCoord to the vector difference of itself and texCoord2 (this = this - texCoord2). |
TexCoordf |
sub(TexCoordf texCoord1,
TexCoordf texCoord2)
Sets the value of this texCoord to the vector difference of texCoord texCoord1 and texCoord2 (this = texCoord1 - texCoord2). |
java.lang.String |
toString()
Returns a string that contains the values of this TexCoordf. |
void |
writeExternal(java.io.ObjectOutput out)
|
java.nio.FloatBuffer |
writeToBuffer(java.nio.FloatBuffer buffer)
Writes the contents of this TexCoords to a FloatBuffer. |
static java.nio.FloatBuffer |
writeToBuffer(TexCoordf[] texCoords,
java.nio.FloatBuffer buffer)
Writes the contents of this TexCoords to a FloatBuffer. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final int N
protected final float[] values
protected final int roTrick
protected boolean isDirty
| Constructor Detail |
|---|
public TexCoordf(boolean readOnly,
float[] values)
values - the values array (must be at least size 1)public TexCoordf(float[] values)
values - the values array (must be at least size 1)| Method Detail |
|---|
public final boolean isReadOnly()
public final boolean setClean()
public final boolean isDirty()
public final int getSize()
public final TexCoordf set(float[] values)
values - the values array (must be at least size 1)
public final TexCoordf set(TexCoordf texCoord)
texCoord - the texCoord to be copied
public final void get(float[] buffer)
buffer - the buffer array to write the values topublic final void get(TexCoordf buffer)
buffer - the buffer vector to write the values topublic final java.nio.FloatBuffer writeToBuffer(java.nio.FloatBuffer buffer)
buffer -
public static final java.nio.FloatBuffer writeToBuffer(TexCoordf[] texCoords,
java.nio.FloatBuffer buffer)
buffer - public final TexCoordf setZero()
public final TexCoordf add(TexCoordf texCoord1,
TexCoordf texCoord2)
texCoord1 - the first texCoordtexCoord2 - the second texCoord
public final TexCoordf add(TexCoordf texCoord2)
texCoord2 - the other tuple
public final TexCoordf sub(TexCoordf texCoord1,
TexCoordf texCoord2)
texCoord1 - the first texCoordtexCoord2 - the second texCoord
public final TexCoordf sub(TexCoordf texCoord2)
texCoord2 - the other texCoord
public final TexCoordf scaleAdd(float factor,
TexCoordf texCoord1,
TexCoordf texCoord2)
factor - the scalar valuetexCoord1 - the tuple to be multipledtexCoord2 - the tuple to be added
public final TexCoordf scaleAdd(float factor,
TexCoordf texCoord2)
factor - the scalar valuetexCoord2 - the tuple to be added
public final TexCoordf clampMin(float min)
min - the lowest value in this tuple after clamping
public final TexCoordf clampMax(float max)
max - the highest value in the tuple after clamping
public final TexCoordf clamp(float min,
float max)
min - the lowest value in this tuple after clampingmax - the highest value in this tuple after clamping
public final TexCoordf clamp(float min,
float max,
TexCoordf vec)
min - the lowest value in the tuple after clampingmax - the highest value in the tuple after clampingvec - the source tuple, which will not be modified
public final TexCoordf clampMin(float min,
TexCoordf vec)
min - the lowest value in the tuple after clampingvec - the source tuple, which will not be modified
public final TexCoordf clampMax(float max,
TexCoordf vec)
max - the highest value in the tuple after clampingvec - the source tuple, which will not be modified
public final void interpolate(TexCoordf texCoord2,
float alpha)
texCoord2 - the first tuplealpha - the alpha interpolation parameter
public final void interpolate(TexCoordf texCoord1,
TexCoordf texCoord2,
float alpha)
texCoord1 - the first tupletexCoord2 - the second tuplealpha - the interpolation parameterpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(TexCoordf texCoord2)
texCoord2 - the texCoord with which the comparison is made.public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the Object with which the comparison is made
public boolean epsilonEquals(TexCoordf texCoord2,
float epsilon)
texCoord2 - the texCoord to be compared to this texCoordepsilon - the threshold valuepublic java.lang.String toString()
toString in class java.lang.Object
protected static final float[] newArray(float[] template,
int length)
public int serialize(int pos,
byte[] buffer)
pos - buffer -
public int deserialize(int pos,
byte[] buffer)
pos - buffer -
protected int getSerializationBufferSize()
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
java.io.IOException
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||