|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmali.vecmath2.TexCoordf<T>
public abstract class TexCoordf<T extends TexCoordf<T>>
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 | |
|---|---|
T |
add(T texCoord2)
Sets the value of this tuple to the vector sum of itself and tuple t1. |
T |
add(T texCoord1,
T texCoord2)
Sets the value of this texCoord to the vector sum of colors texCoord1 and texCoord2. |
T |
clamp(float min,
float max)
Clamps this tuple to the range [min, max]. |
T |
clamp(float min,
float max,
T vec)
Clamps the tuple parameter to the range [min, max] and places the values into this tuple. |
T |
clampMax(float max)
Clamps the maximum value of this tuple to the max parameter. |
T |
clampMax(float max,
T vec)
Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple. |
T |
clampMin(float min)
Clamps the minimum value of this tuple to the min parameter. |
T |
clampMin(float min,
T 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(T 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(float[] buffer,
int offset)
Writes all values of this Tuple to the specified buffer. |
void |
get(T 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(T 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(T texCoord1,
T 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)
|
java.nio.FloatBuffer |
readFromBuffer(java.nio.FloatBuffer buffer)
Reads the contents of this TexCoords from a FloatBuffer. |
java.nio.FloatBuffer |
readFromBuffer(java.nio.FloatBuffer buffer,
int position)
Reads the contents of this TexCoords from a FloatBuffer. |
static java.nio.FloatBuffer |
readFromBuffer(TexCoordf<?>[] texCoords,
java.nio.FloatBuffer buffer)
Reads the contents of this TexCoords from a FloatBuffer. |
static java.nio.FloatBuffer |
readFromBuffer(TexCoordf<?>[] texCoords,
java.nio.FloatBuffer buffer,
int position)
Reads the contents of this TexCoords from a FloatBuffer. |
T |
scaleAdd(float factor,
T texCoord2)
Sets the value of this tuple to the scalar multiplication of itself and then adds tuple t1 (this = s*this + t1). |
T |
scaleAdd(float factor,
T texCoord1,
T 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. |
T |
set(float[] values)
Sets all values of this TexCoord to the specified ones. |
T |
set(float[] values,
int offset)
Sets all values of this TexCoord to the specified ones. |
T |
set(T texCoord)
Sets all values of this Tuple to the specified ones. |
boolean |
setClean()
Marks this tuple non-dirty. |
T |
setZero()
Sets all components to zero. |
T |
sub(T texCoord2)
Sets the value of this texCoord to the vector difference of itself and texCoord2 (this = this - texCoord2). |
T |
sub(T texCoord1,
T 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,
boolean clear,
boolean flip)
Writes the contents of this TexCoords to a FloatBuffer. |
java.nio.FloatBuffer |
writeToBuffer(java.nio.FloatBuffer buffer,
int position,
boolean clear,
boolean flip)
Writes the contents of this TexCoords to a FloatBuffer. |
static java.nio.FloatBuffer |
writeToBuffer(TexCoordf<?>[] texCoords,
java.nio.FloatBuffer buffer,
boolean clear,
boolean flip)
Writes the contents of this TexCoords to a FloatBuffer. |
static java.nio.FloatBuffer |
writeToBuffer(TexCoordf<?>[] texCoords,
java.nio.FloatBuffer buffer,
int position,
boolean clear,
boolean flip)
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 T set(float[] values,
int offset)
values - the values array (must be at least size n)offset - the offset in the (source) values array
public final T set(float[] values)
values - the values array (must be at least size 1)
public final T set(T texCoord)
texCoord - the texCoord to be copied
public final void get(float[] buffer,
int offset)
buffer - the buffer array to write the values tooffset - the offset in the (target) buffer arraypublic final void get(float[] buffer)
buffer - the buffer array to write the values topublic final void get(T buffer)
buffer - the buffer vector to write the values to
public final java.nio.FloatBuffer writeToBuffer(java.nio.FloatBuffer buffer,
boolean clear,
boolean flip)
buffer - clear - clear the buffer before writing data?flip - flip the buffer after writing data?
public final java.nio.FloatBuffer writeToBuffer(java.nio.FloatBuffer buffer,
int position,
boolean clear,
boolean flip)
buffer - position - position in the bufferclear - clear the buffer before writing data?flip - flip the buffer after writing data?
public static final java.nio.FloatBuffer writeToBuffer(TexCoordf<?>[] texCoords,
java.nio.FloatBuffer buffer,
boolean clear,
boolean flip)
buffer - clear - clear the buffer before writing data?flip - flip the buffer after writing data?
public static final java.nio.FloatBuffer writeToBuffer(TexCoordf<?>[] texCoords,
java.nio.FloatBuffer buffer,
int position,
boolean clear,
boolean flip)
buffer - position - position in the bufferclear - clear the buffer before writing data?flip - flip the buffer after writing data?public final java.nio.FloatBuffer readFromBuffer(java.nio.FloatBuffer buffer)
buffer -
public final java.nio.FloatBuffer readFromBuffer(java.nio.FloatBuffer buffer,
int position)
buffer - position - position in the buffer
public static final java.nio.FloatBuffer readFromBuffer(TexCoordf<?>[] texCoords,
java.nio.FloatBuffer buffer)
buffer -
public static final java.nio.FloatBuffer readFromBuffer(TexCoordf<?>[] texCoords,
java.nio.FloatBuffer buffer,
int position)
buffer - position - position in the bufferpublic final T setZero()
public final T add(T texCoord1,
T texCoord2)
texCoord1 - the first texCoordtexCoord2 - the second texCoord
public final T add(T texCoord2)
texCoord2 - the other tuple
public final T sub(T texCoord1,
T texCoord2)
texCoord1 - the first texCoordtexCoord2 - the second texCoord
public final T sub(T texCoord2)
texCoord2 - the other texCoord
public final T scaleAdd(float factor,
T texCoord1,
T texCoord2)
factor - the scalar valuetexCoord1 - the tuple to be multipledtexCoord2 - the tuple to be added
public final T scaleAdd(float factor,
T texCoord2)
factor - the scalar valuetexCoord2 - the tuple to be added
public final T clampMin(float min)
min - the lowest value in this tuple after clamping
public final T clampMax(float max)
max - the highest value in the tuple after clamping
public final T clamp(float min,
float max)
min - the lowest value in this tuple after clampingmax - the highest value in this tuple after clamping
public final T clamp(float min,
float max,
T 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 T clampMin(float min,
T vec)
min - the lowest value in the tuple after clampingvec - the source tuple, which will not be modified
public final T clampMax(float max,
T vec)
max - the highest value in the tuple after clampingvec - the source tuple, which will not be modified
public final void interpolate(T texCoord2,
float alpha)
texCoord2 - the first tuplealpha - the alpha interpolation parameter
public final void interpolate(T texCoord1,
T 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(T 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 | |||||||||