org.openmali.vecmath2
Class TexCoord3f

java.lang.Object
  extended by org.openmali.vecmath2.TexCoordf<TexCoord3f>
      extended by org.openmali.vecmath2.TexCoord3f
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class TexCoord3f
extends TexCoordf<TexCoord3f>
implements java.io.Externalizable

A simple Texture-Coordinate implementation for 3 values.
The order is (s, t, r).

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.openmali.vecmath2.TexCoordf
isDirty, N, roTrick, values
 
Constructor Summary
  TexCoord3f()
          Creates a new TexCoord3f instance.
protected TexCoord3f(boolean readOnly)
          Creates a new TexCoord3f instance.
protected TexCoord3f(boolean readOnly, float[] values)
          Creates a new TexCoord3f instance.
protected TexCoord3f(boolean readOnly, float s, float t, float p)
          Creates a new TexCoord3f instance.
protected TexCoord3f(boolean readOnly, TexCoordf<?> texCoord)
          Creates a new TexCoord3f instance.
  TexCoord3f(float[] values)
          Creates a new TexCoord3f instance.
  TexCoord3f(float s, float t, float p)
          Creates a new TexCoord3f instance.
  TexCoord3f(TexCoordf<?> texCoord)
          Creates a new TexCoord3f instance.
 
Method Summary
 TexCoord3f add(float s, float t, float p)
          Adds the given parameters to this tuple's values.
 TexCoord3f addP(float v)
          Adds v to this texCoord's P value.
 TexCoord3f addS(float v)
          Adds v to this texCoord's S value.
 TexCoord3f addT(float v)
          Adds v to this texCoord's T value.
 TexCoord3f clone()
          Creates and returns a copy of this object.
 TexCoord3f div(float vs, float vt, float vp)
          Divides this texCoord's values by vs, vt, vr.
 TexCoord3f divP(float v)
          Divides this texCoord's P value by v.
 TexCoord3f divS(float v)
          Divides this texCoord's S value by v.
 TexCoord3f divT(float v)
          Divides this texCoord's T value by v.
 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.
static TexCoord3f fromPool()
          Allocates an TexCoord3f instance from the pool.
static TexCoord3f fromPool(float s, float t, float p)
          Allocates an TexCoord3f instance from the pool.
 float getP()
           
 float getS()
           
 float getT()
           
 TexCoord3f mul(float factor)
          Sets the value of this tuple to the scalar multiplication of itself.
 TexCoord3f mul(float vs, float vt, float vp)
          Multiplies this texCoord's values with vs, vt, vr.
 TexCoord3f mulP(float v)
          Multiplies this texCoord's P value with v.
 TexCoord3f mulS(float v)
          Multiplies this texCoord's S value with v.
 TexCoord3f mulT(float v)
          Multiplies this texCoord's T value with v.
static TexCoord3f newReadOnly(float[] values)
          Creates a new TexCoord3f instance.
static TexCoord3f newReadOnly(float s, float t, float p)
          Creates a new TexCoord3f instance.
static TexCoord3f newReadOnly(TexCoordf<?> texCoord)
          Creates a new TexCoord3f instance.
 float p()
           
 TexCoord3f p(float p)
          Sets the P (3rd) texCoord component.
 float s()
           
 TexCoord3f s(float s)
          Sets the S (1st) texCoord component.
 TexCoord3f set(float s, float t, float r)
          Sets all values of this texCoord to the specified ones.
 TexCoord3f setP(float p)
          Sets the P (3rd) texCoord component.
 TexCoord3f setS(float s)
          Sets the S (1st) texCoord component.
 TexCoord3f setT(float t)
          Sets the T (2nd) texCoord component.
 TexCoord3f sub(float s, float t, float p)
          Subtracts the given parameters from this tuple's values.
 TexCoord3f subP(float v)
          Subtracts v from this texCoord's P value.
 TexCoord3f subS(float v)
          Subtracts v from this texCoord's S value.
 TexCoord3f subT(float v)
          Subtracts v from this texCoord's T value.
 float t()
           
 TexCoord3f t(float t)
          Sets the T (2nd) texCoord component.
static void toPool(TexCoord3f o)
          Stores the given TexCoord3f instance in the pool.
 
Methods inherited from class org.openmali.vecmath2.TexCoordf
add, add, clamp, clamp, clampMax, clampMax, clampMin, clampMin, deserialize, epsilonEquals, equals, get, get, get, getSerializationBufferSize, getSize, hashCode, interpolate, interpolate, isDirty, isReadOnly, newArray, readExternal, readFromBuffer, readFromBuffer, readFromBuffer, readFromBuffer, scaleAdd, scaleAdd, serialize, set, set, set, setClean, setZero, sub, sub, toString, writeExternal, writeToBuffer, writeToBuffer, writeToBuffer, writeToBuffer
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
 

Constructor Detail

TexCoord3f

protected TexCoord3f(boolean readOnly,
                     float s,
                     float t,
                     float p)
Creates a new TexCoord3f instance.

Parameters:
readOnly -
s - the S element to use
t - the T element to use
p - the P element to use

TexCoord3f

protected TexCoord3f(boolean readOnly,
                     float[] values)
Creates a new TexCoord3f instance.

Parameters:
readOnly -
values - the values array (must be at least size 3)

TexCoord3f

protected TexCoord3f(boolean readOnly,
                     TexCoordf<?> texCoord)
Creates a new TexCoord3f instance.

Parameters:
readOnly -
texCoord - the TexCoordf to copy the values from

TexCoord3f

protected TexCoord3f(boolean readOnly)
Creates a new TexCoord3f instance.

Parameters:
readOnly -

TexCoord3f

public TexCoord3f(float s,
                  float t,
                  float p)
Creates a new TexCoord3f instance.

Parameters:
s - the S element to use
t - the T element to use
p - the P element to use

TexCoord3f

public TexCoord3f(float[] values)
Creates a new TexCoord3f instance.

Parameters:
values - the values array (must be at least size 3)

TexCoord3f

public TexCoord3f(TexCoordf<?> texCoord)
Creates a new TexCoord3f instance.

Parameters:
texCoord - the TexCoordf to copy the values from

TexCoord3f

public TexCoord3f()
Creates a new TexCoord3f instance.

Method Detail

set

public final TexCoord3f set(float s,
                            float t,
                            float r)
Sets all values of this texCoord to the specified ones.

Parameters:
s - the s element to use
t - the t element to use
r - the p element to use
Returns:
itself

setS

public final TexCoord3f setS(float s)
Sets the S (1st) texCoord component.

Parameters:
s -
Returns:
itself

getS

public final float getS()
Returns:
the S (1st) texCoord component.

s

public final TexCoord3f s(float s)
Sets the S (1st) texCoord component.

Parameters:
s -
Returns:
itself

s

public final float s()
Returns:
the S (1st) texCoord component.

setT

public final TexCoord3f setT(float t)
Sets the T (2nd) texCoord component.

Parameters:
t -
Returns:
itself

getT

public final float getT()
Returns:
the T (2nd) texCoord component.

t

public final TexCoord3f t(float t)
Sets the T (2nd) texCoord component.

Parameters:
t -
Returns:
itself

t

public final float t()
Returns:
the T (2nd) texCoord component.

setP

public final TexCoord3f setP(float p)
Sets the P (3rd) texCoord component.

Parameters:
p -
Returns:
itself

getP

public final float getP()
Returns:
the P (3rd) texCoord component.

p

public final TexCoord3f p(float p)
Sets the P (3rd) texCoord component.

Parameters:
p -
Returns:
itself

p

public final float p()
Returns:
the P (3rd) texCoord component.

addS

public final TexCoord3f addS(float v)
Adds v to this texCoord's S value.

Parameters:
v -
Returns:
itself

addT

public final TexCoord3f addT(float v)
Adds v to this texCoord's T value.

Parameters:
v -
Returns:
itself

addP

public final TexCoord3f addP(float v)
Adds v to this texCoord's P value.

Parameters:
v -
Returns:
itself

subS

public final TexCoord3f subS(float v)
Subtracts v from this texCoord's S value.

Parameters:
v -
Returns:
itself

subT

public final TexCoord3f subT(float v)
Subtracts v from this texCoord's T value.

Parameters:
v -
Returns:
itself

subP

public final TexCoord3f subP(float v)
Subtracts v from this texCoord's P value.

Parameters:
v -
Returns:
itself

mulS

public final TexCoord3f mulS(float v)
Multiplies this texCoord's S value with v.

Parameters:
v -
Returns:
itself

mulT

public final TexCoord3f mulT(float v)
Multiplies this texCoord's T value with v.

Parameters:
v -
Returns:
itself

mulP

public final TexCoord3f mulP(float v)
Multiplies this texCoord's P value with v.

Parameters:
v -
Returns:
itself

mul

public final TexCoord3f mul(float vs,
                            float vt,
                            float vp)
Multiplies this texCoord's values with vs, vt, vr.

Parameters:
vs -
vt -
vp -
Returns:
itself

mul

public final TexCoord3f mul(float factor)
Sets the value of this tuple to the scalar multiplication of itself.

Parameters:
factor - the scalar value
Returns:
itself

divS

public final TexCoord3f divS(float v)
Divides this texCoord's S value by v.

Parameters:
v -
Returns:
itself

divT

public final TexCoord3f divT(float v)
Divides this texCoord's T value by v.

Parameters:
v -
Returns:
itself

divP

public final TexCoord3f divP(float v)
Divides this texCoord's P value by v.

Parameters:
v -
Returns:
itself

div

public final TexCoord3f div(float vs,
                            float vt,
                            float vp)
Divides this texCoord's values by vs, vt, vr.

Parameters:
vs -
vt -
vp -
Returns:
itself

add

public final TexCoord3f add(float s,
                            float t,
                            float p)
Adds the given parameters to this tuple's values.

Parameters:
s -
t -
p -
Returns:
itself

sub

public final TexCoord3f sub(float s,
                            float t,
                            float p)
Subtracts the given parameters from this tuple's values.

Parameters:
s -
t -
p -
Returns:
itself

equals

public 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.

Overrides:
equals in class TexCoordf<TexCoord3f>
Parameters:
o - the Object with which the comparison is made
Returns:
true or false

clone

public TexCoord3f clone()
Creates and returns a copy of this object.

Overrides:
clone in class java.lang.Object
Returns:
a clone of this instance.
Throws:
java.lang.OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable

newReadOnly

public static final TexCoord3f newReadOnly(float s,
                                           float t,
                                           float p)
Creates a new TexCoord3f instance.

Parameters:
s - the S element to use
t - the T element to use
p - the P element to use

newReadOnly

public static final TexCoord3f newReadOnly(float[] values)
Creates a new TexCoord3f instance.

Parameters:
values - the values array (must be at least size 3)

newReadOnly

public static final TexCoord3f newReadOnly(TexCoordf<?> texCoord)
Creates a new TexCoord3f instance.

Parameters:
texCoord - the TexCoordf to copy the values from

fromPool

public static TexCoord3f fromPool()
Allocates an TexCoord3f instance from the pool.


fromPool

public static TexCoord3f fromPool(float s,
                                  float t,
                                  float p)
Allocates an TexCoord3f instance from the pool.

Parameters:
s -
t -
p -

toPool

public static void toPool(TexCoord3f o)
Stores the given TexCoord3f instance in the pool.

Parameters:
o -