Drag[en]gine Script Module DragonScript
1.23
|
Immutable 3x3-component row major texture matrix. More...
Public Member Functions | |
Management | |
float | getAt (int row, int col) |
Value at row and colon. More... | |
float | get11 () |
Value at (1,1). More... | |
float | get12 () |
Value at (1,2). More... | |
float | get13 () |
Value at (1,3). More... | |
float | get21 () |
Value at (2,1). More... | |
float | get22 () |
Value at (2,2). More... | |
float | get23 () |
Value at (2,3). More... | |
float | get31 () |
Value at (3,1). More... | |
float | get32 () |
Value at (3,2). More... | |
float | get33 () |
Value at (3,3). More... | |
bool | equals (Object other) |
TexMatrix is equal to another object. More... | |
int | hashCode () |
Hash code for use as dictionary keys. More... | |
String | toString () |
String representation of texture matrix. More... | |
String | toString (int precision) |
String representation of texture matrix with precision. More... | |
Operators | |
TexMatrix | operator+ (TexMatrix matrix) |
Sum of matrix with another texture matrix. More... | |
TexMatrix | operator- (TexMatrix matrix) |
Difference of matrix and another texture matrix. More... | |
TexMatrix | operator* (float k) |
Texture matrix multiplied by a factor. More... | |
TexMatrix | operator/ (float k) |
Texture matrix divided by a factor. More... | |
TexMatrix | operator* (TexMatrix matrix) |
Texture matrix multiplied by another texture matrix. More... | |
Vector2 | operator* (Vector2 texcoord) |
Vector transformed by texture matrix. More... | |
Vector2 | operator* (float u, float v) |
Vector transformed by texture matrix. More... | |
Constructors | |
TexMatrix | new () |
Create identity texture matrix. More... | |
TexMatrix | new (TexMatrix matrix) |
Create copy of a texture matrix. More... | |
static TexMatrix | newTranslation (Vector2 translation) |
Create translation texture matrix. More... | |
static TexMatrix | newTranslation (float u, float v) |
Create translation texture matrix. More... | |
static TexMatrix | newScaling (Vector2 scaling) |
Create scaling texture matrix. More... | |
static TexMatrix | newScaling (float u, float v) |
Create scaling texture matrix. More... | |
static TexMatrix | newRotation (float rotation) |
Create rotation texture matrix. More... | |
static TexMatrix | newST (Vector2 translation, Vector2 scaling) |
Create scaling-translation texture matrix composing of a scaling followed by a translation. More... | |
static TexMatrix | newST (float translationU, float translationV, float scalingU, float scalingV) |
Create scaling-translation texture matrix composing of a scaling followed by a translation. More... | |
static TexMatrix | newSRT (Vector2 translation, Vector2 scaling, float rotation) |
Create scaling-rotation-translation texture matrix composing of a scaling followed by a rotation and a translation. More... | |
static TexMatrix | newSRT (float translationU, float translationV, float scalingU, float scalingV, float rotation) |
Create scaling-rotation-translation texture matrix composing of a scaling followed by a rotation and a translation. More... | |
static TexMatrix | newCenterSRT (Vector2 translation, Vector2 scaling, float rotation) |
Create centere scaling-rotation-translation texture matrix composing of a scaling followed by a rotation and a translation. More... | |
static TexMatrix | newCenterSRT (float translationU, float translationV, float scalingU, float scalingV, float rotation) |
Create centere scaling-rotation-translation texture matrix composing of a scaling followed by a rotation and a translation. More... | |
File Handling | |
void | writeToFile (FileWriter writer) |
Write texture matrix to a file writer. More... | |
static TexMatrix | readFromFile (FileReader reader) |
Read texture matrix from a file reader. More... | |
Immutable 3x3-component row major texture matrix.
This is a native class. It can not be subclassed.
bool Dragengine.Scenery.TexMatrix.equals | ( | Object | other | ) |
float Dragengine.Scenery.TexMatrix.get11 | ( | ) |
Value at (1,1).
float Dragengine.Scenery.TexMatrix.get12 | ( | ) |
Value at (1,2).
float Dragengine.Scenery.TexMatrix.get13 | ( | ) |
Value at (1,3).
float Dragengine.Scenery.TexMatrix.get21 | ( | ) |
Value at (2,1).
float Dragengine.Scenery.TexMatrix.get22 | ( | ) |
Value at (2,2).
float Dragengine.Scenery.TexMatrix.get23 | ( | ) |
Value at (2,3).
float Dragengine.Scenery.TexMatrix.get31 | ( | ) |
Value at (3,1).
float Dragengine.Scenery.TexMatrix.get32 | ( | ) |
Value at (3,2).
float Dragengine.Scenery.TexMatrix.get33 | ( | ) |
Value at (3,3).
float Dragengine.Scenery.TexMatrix.getAt | ( | int | row, |
int | col | ||
) |
Value at row and colon.
EInvalidParam | row is less than 0 or larger than 2. |
EInvalidParam | col is less than 0 or larger than 2. |
int Dragengine.Scenery.TexMatrix.hashCode | ( | ) |
Hash code for use as dictionary keys.
Implements Object.hashCode().
TexMatrix Dragengine.Scenery.TexMatrix.new | ( | ) |
Create identity texture matrix.
|
static |
Create centere scaling-rotation-translation texture matrix composing of a scaling followed by a rotation and a translation.
Similar to newSRT but the coordinate system is first shifted to the center of the texture (0.5,0.5) before scale-rotate-translation is applied.
|
static |
Create centere scaling-rotation-translation texture matrix composing of a scaling followed by a rotation and a translation.
Similar to newSRT but the coordinate system is first shifted to the center of the texture (0.5,0.5) before scale-rotate-translation is applied.
|
static |
Create rotation texture matrix.
|
static |
Create scaling texture matrix.
Create scaling texture matrix.
|
static |
Create scaling-rotation-translation texture matrix composing of a scaling followed by a rotation and a translation.
|
static |
Create scaling-rotation-translation texture matrix composing of a scaling followed by a rotation and a translation.
|
static |
Create scaling-translation texture matrix composing of a scaling followed by a translation.
Create scaling-translation texture matrix composing of a scaling followed by a translation.
|
static |
Create translation texture matrix.
Create translation texture matrix.
TexMatrix Dragengine.Scenery.TexMatrix.operator* | ( | float | k | ) |
Texture matrix multiplied by a factor.
Vector2 Dragengine.Scenery.TexMatrix.operator* | ( | float | u, |
float | v | ||
) |
Vector transformed by texture matrix.
Texture matrix multiplied by another texture matrix.
Vector transformed by texture matrix.
Sum of matrix with another texture matrix.
Difference of matrix and another texture matrix.
TexMatrix Dragengine.Scenery.TexMatrix.operator/ | ( | float | k | ) |
Texture matrix divided by a factor.
EDivisionByZero | scalar is 0. |
|
static |
Read texture matrix from a file reader.
String Dragengine.Scenery.TexMatrix.toString | ( | ) |
String representation of texture matrix.
Implements Object.toString()
String Dragengine.Scenery.TexMatrix.toString | ( | int | precision | ) |
String representation of texture matrix with precision.
Same as toString() except the count of digits of each component is precision.
precision | Precision in digits in the range from 0 to 9 inclusive. |
EInvalidParam | precision is less than 0 or larger than 9. |
void Dragengine.Scenery.TexMatrix.writeToFile | ( | FileWriter | writer | ) |
Write texture matrix to a file writer.