|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TupleInterface<T extends TupleNf<T>>
This is the base interface for all tuple types. Using it may slow down execution time because of prevented inlining.
| Method Summary | |
|---|---|
TupleInterface<T> |
absolute()
Sets each component of the tuple parameter to its absolute value and places the modified values into this tuple. |
TupleInterface<T> |
absolute(T tuple)
Sets each component of the tuple parameter to its absolute value and places the modified values into this tuple. |
TupleInterface<T> |
add(T tuple2)
Sets the value of this tuple to the vector sum of itself and tuple t1. |
TupleInterface<T> |
add(T tuple1,
T tuple2)
Sets the value of this tuple to the vector sum of tuples t1 and t2. |
TupleInterface<T> |
addValue(int i,
float v)
Adds v to this tuple's i'th value. |
TupleInterface<T> |
clamp(float min,
float max)
Clamps this tuple to the range [min, max]. |
TupleInterface<T> |
clamp(float min,
float max,
T tuple)
Clamps the tuple parameter to the range [min, max] and places the values into this tuple. |
TupleInterface<T> |
clampMax(float max)
Clamps the maximum value of this tuple to the max parameter. |
TupleInterface<T> |
clampMax(float max,
T tuple)
Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple. |
TupleInterface<T> |
clampMin(float min)
Clamps the minimum value of this tuple to the min parameter. |
TupleInterface<T> |
clampMin(float min,
T tuple)
Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple. |
TupleInterface<T> |
div(float v)
Divides all components of this tuple by v. |
TupleInterface<T> |
divValue(int i,
float v)
Divides this tuple's i'th value by v. |
boolean |
epsilonEquals(T v2,
float epsilon)
Returns true if the L-infinite distance between this vector and vector v1 is less than or equal to the epsilon parameter, otherwise returns false. |
TupleInterface<T> |
fill(float f)
Sets all values of this TupleNf to f. |
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(TupleNf<?> buffer)
Writes all values of this Tuple to the specified buffer Tuple. |
int |
getSize()
|
float |
getValue(int i)
Sets the i-th value of this tuple. |
void |
interpolate(T t2,
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 t1,
T t2,
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()
|
TupleInterface<T> |
mul(float v)
Multiplies all components of this tuple with v. |
TupleInterface<T> |
mulValue(int i,
float v)
Multiplies v to this tuple's i'th value. |
TupleInterface<T> |
negate()
Negates the value of this vector in place. |
TupleInterface<T> |
negate(T tuple)
Sets the value of this tuple to the negation of tuple that. |
TupleInterface<T> |
round(int decPlaces)
Rounds this tuple to the given number of decimal places. |
TupleInterface<T> |
round(T tuple,
int decPlaces)
Rounds this tuple to the given number of decimal places. |
TupleInterface<T> |
scale(float factor)
Sets the value of this tuple to the scalar multiplication of itself. |
TupleInterface<T> |
scale(float factor,
T tuple)
Sets the value of this tuple to the scalar multiplication of tuple t1. |
TupleInterface<T> |
scaleAdd(float factor,
T tuple2)
Sets the value of this tuple to the scalar multiplication of itself and then adds tuple t1 (this = s*this + t1). |
TupleInterface<T> |
scaleAdd(float factor,
T tuple1,
T tuple2)
Sets the value of this tuple to the scalar multiplication of tuple t1 and then adds tuple t2 (this = s*t1 + t2). |
TupleInterface<T> |
set(float[] values)
Sets all values of this Tuple to the specified ones. |
TupleInterface<T> |
set(float[] values,
int offset)
Sets all values of this Tuple to the specified ones. |
TupleInterface<T> |
set(TupleNf<?> tuple)
Sets all three values of this Tuple to the specified ones. |
boolean |
setClean()
Marks this tuple non-dirty. |
TupleInterface<T> |
setValue(int i,
float v)
Sets the i-th value of this tuple. |
TupleInterface<T> |
setZero()
Sets all components to zero. |
TupleInterface<T> |
sub(T tuple2)
Sets the value of this tuple to the vector difference of itself and tuple t1 (this = this - t1). |
TupleInterface<T> |
sub(T tuple1,
T tuple2)
Sets the value of this tuple to the vector difference of tuple t1 and t2 (this = t1 - t2). |
TupleInterface<T> |
subValue(int i,
float v)
Subtracts v of this tuple's i'th value. |
| Method Detail |
|---|
boolean isReadOnly()
boolean setClean()
boolean isDirty()
int getSize()
TupleInterface<T> setValue(int i,
float v)
float getValue(int i)
TupleInterface<T> fill(float f)
f -
TupleInterface<T> addValue(int i,
float v)
i - the index of the value to modifyv - modification amount
TupleInterface<T> subValue(int i,
float v)
i - the index of the value to modifyv - modification amount
TupleInterface<T> mulValue(int i,
float v)
i - the index of the value to modifyv - modification amount
TupleInterface<T> mul(float v)
v - modification amount
TupleInterface<T> divValue(int i,
float v)
i - the index of the value to modifyv - modification amount
TupleInterface<T> div(float v)
v - modification amount
TupleInterface<T> set(float[] values,
int offset)
values - the values array (must be at least size getSize())offset - the offset in the (source) values array
TupleInterface<T> set(float[] values)
values - the values array (must be at least size getSize())
TupleInterface<T> set(TupleNf<?> tuple)
tuple - the tuple to be copied
void get(float[] buffer,
int offset)
buffer - the buffer array to write the values tooffset - the offset in the (target) buffer arrayvoid get(float[] buffer)
buffer - the buffer array to write the values tovoid get(TupleNf<?> buffer)
buffer - the buffer Tuple to write the values toTupleInterface<T> setZero()
TupleInterface<T> negate()
TupleInterface<T> negate(T tuple)
tuple - the source vector
TupleInterface<T> absolute()
TupleInterface<T> absolute(T tuple)
tuple - the source tuple, which will not be modified
TupleInterface<T> add(T tuple1,
T tuple2)
tuple1 - the first tupletuple2 - the second tuple
TupleInterface<T> add(T tuple2)
tuple2 - the other tuple
TupleInterface<T> sub(T tuple1,
T tuple2)
tuple1 - the first tupletuple2 - the second tuple
TupleInterface<T> sub(T tuple2)
tuple2 - the other tuple
TupleInterface<T> scale(float factor,
T tuple)
factor - the scalar valuetuple - the source tuple
TupleInterface<T> scale(float factor)
factor - the scalar value
TupleInterface<T> scaleAdd(float factor,
T tuple1,
T tuple2)
factor - the scalar valuetuple1 - the tuple to be multipledtuple2 - the tuple to be added
TupleInterface<T> scaleAdd(float factor,
T tuple2)
factor - the scalar valuetuple2 - the tuple to be added
TupleInterface<T> clampMin(float min)
min - the lowest value in this tuple after clamping
TupleInterface<T> clampMax(float max)
max - the highest value in the tuple after clamping
TupleInterface<T> clamp(float min,
float max)
min - the lowest value in this tuple after clampingmax - the highest value in this tuple after clamping
TupleInterface<T> clamp(float min,
float max,
T tuple)
min - the lowest value in the tuple after clampingmax - the highest value in the tuple after clampingtuple - the source tuple, which will not be modified
TupleInterface<T> clampMin(float min,
T tuple)
min - the lowest value in the tuple after clampingtuple - the source tuple, which will not be modified
TupleInterface<T> clampMax(float max,
T tuple)
max - the highest value in the tuple after clampingtuple - the source tuple, which will not be modified
TupleInterface<T> round(T tuple,
int decPlaces)
decPlaces -
TupleInterface<T> round(int decPlaces)
decPlaces -
void interpolate(T t2,
float alpha)
t2 - the first tuplealpha - the alpha interpolation parameter
void interpolate(T t1,
T t2,
float alpha)
t1 - the first tuplet2 - the second tuplealpha - the alpha interpolation parameter
boolean epsilonEquals(T v2,
float epsilon)
v2 - The vector to be compared to this vectorepsilon - the threshold value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||