Drag[en]gine Script Module DragonScript
1.23
|
Immutable 5x4-component row major color matrix. More...
Public Member Functions | |
Management | |
float | getAt (int row, int col) |
Cell value. More... | |
float | get11 () |
Cell value. More... | |
float | get12 () |
Cell value. More... | |
float | get13 () |
Cell value. More... | |
float | get14 () |
Cell value. More... | |
float | get15 () |
Cell value. More... | |
float | get21 () |
Cell value. More... | |
float | get22 () |
Cell value. More... | |
float | get23 () |
Cell value. More... | |
float | get24 () |
Cell value. More... | |
float | get25 () |
Cell value. More... | |
float | get31 () |
Cell value. More... | |
float | get32 () |
Cell value. More... | |
float | get33 () |
Cell value. More... | |
float | get34 () |
Cell value. More... | |
float | get35 () |
Cell value. More... | |
float | get41 () |
Cell value. More... | |
float | get42 () |
Cell value. More... | |
float | get43 () |
Cell value. More... | |
float | get44 () |
Cell value. More... | |
float | get45 () |
Cell value. More... | |
Color | getRedBase () |
Color build from first colon. More... | |
Color | getGreenBase () |
Color build from second colon. More... | |
Color | getBlueBase () |
Color build from third colon. More... | |
Color | getAlphaBase () |
Color build from fourthed colon. More... | |
Color | getWhiteBase () |
Color build from fifth colon. More... | |
bool | equals (Object other) |
ColorMatrix is equal to another object. More... | |
int | hashCode () |
Hash code for use as dictionary keys. More... | |
String | toString () |
String representation of color matrix. More... | |
String | toString (int precision) |
String representation of color matrix with precision. More... | |
Operators | |
ColorMatrix | operator+ (ColorMatrix matrix) |
Sum of two color matrixs. More... | |
ColorMatrix | operator- (ColorMatrix matrix) |
Difference between two color matrixs. More... | |
ColorMatrix | operator* (float scalar) |
ColorMatrix with each component scaled by a value. More... | |
ColorMatrix | operator/ (float scalar) |
ColorMatrix with each component divided by a value. More... | |
ColorMatrix | operator* (ColorMatrix matrix) |
Matrix multiplication of two color matrixs. More... | |
ColorMatrix | operator* (Color color) |
Transform color by color matrix. More... | |
Constructors | |
ColorMatrix | new () |
Create identity color matrix. More... | |
ColorMatrix | new (ColorMatrix matrix) |
Create copy of color matrix. More... | |
ColorMatrix | new (Color red, Color green, Color blue, Color alpha, Color white) |
Create color matrix with initial colons. More... | |
static ColorMatrix | newTranslation (Color color) |
Create translation color matrix. More... | |
static ColorMatrix | newTranslation (float red, float green, float blue, float alpha) |
Create translation color matrix. More... | |
static ColorMatrix | newScaling (Color color) |
Create scaling color matrix. More... | |
static ColorMatrix | newScaling (float red, float green, float blue, float alpha) |
Create scaling color matrix. More... | |
static ColorMatrix | newST (Color scaling, Color translation) |
Create scaling then translaction color matrix. More... | |
static ColorMatrix | newBrightness (float brightness) |
Create brightness color matrix with same brightness value for each color component. More... | |
static ColorMatrix | newBrightness (float red, float green, float blue) |
Create brightness color matrix. More... | |
static ColorMatrix | newBrightness (Color brightness) |
Create brightness color matrix. More... | |
static ColorMatrix | newContrast (float contrast) |
Create contrast color matrix with same contrast value for each color component. More... | |
static ColorMatrix | newContrast (float red, float green, float blue) |
Create contrast color matrix. More... | |
static ColorMatrix | newContrast (Color contrast) |
Create contrast color matrix. More... | |
static ColorMatrix | newSaturation (float saturation) |
Create saturation color matrix with same saturation value for each color component. More... | |
static ColorMatrix | newSaturation (float red, float green, float blue) |
Create saturation color matrix. More... | |
static ColorMatrix | newSaturation (Color saturation) |
Create saturation color matrix. More... | |
static ColorMatrix | newColorInversion () |
Create color inversion color matrix. More... | |
File Handling | |
void | writeToFile (FileWriter writer) |
Write color matrix to a file writer. More... | |
static ColorMatrix | readFromFile (FileReader reader) |
Read color matrix from a file reader. More... | |
Immutable 5x4-component row major color matrix.
This is a native class. It can not be subclassed.
bool Dragengine.Scenery.ColorMatrix.equals | ( | Object | other | ) |
ColorMatrix is equal to another object.
Implements Object.equals(Object).
float Dragengine.Scenery.ColorMatrix.get11 | ( | ) |
Cell value.
float Dragengine.Scenery.ColorMatrix.get12 | ( | ) |
Cell value.
float Dragengine.Scenery.ColorMatrix.get13 | ( | ) |
Cell value.
float Dragengine.Scenery.ColorMatrix.get14 | ( | ) |
Cell value.
float Dragengine.Scenery.ColorMatrix.get15 | ( | ) |
Cell value.
float Dragengine.Scenery.ColorMatrix.get21 | ( | ) |
Cell value.
float Dragengine.Scenery.ColorMatrix.get22 | ( | ) |
Cell value.
float Dragengine.Scenery.ColorMatrix.get23 | ( | ) |
Cell value.
float Dragengine.Scenery.ColorMatrix.get24 | ( | ) |
Cell value.
float Dragengine.Scenery.ColorMatrix.get25 | ( | ) |
Cell value.
float Dragengine.Scenery.ColorMatrix.get31 | ( | ) |
Cell value.
float Dragengine.Scenery.ColorMatrix.get32 | ( | ) |
Cell value.
float Dragengine.Scenery.ColorMatrix.get33 | ( | ) |
Cell value.
float Dragengine.Scenery.ColorMatrix.get34 | ( | ) |
Cell value.
float Dragengine.Scenery.ColorMatrix.get35 | ( | ) |
Cell value.
float Dragengine.Scenery.ColorMatrix.get41 | ( | ) |
Cell value.
float Dragengine.Scenery.ColorMatrix.get42 | ( | ) |
Cell value.
float Dragengine.Scenery.ColorMatrix.get43 | ( | ) |
Cell value.
float Dragengine.Scenery.ColorMatrix.get44 | ( | ) |
Cell value.
float Dragengine.Scenery.ColorMatrix.get45 | ( | ) |
Cell value.
Color Dragengine.Scenery.ColorMatrix.getAlphaBase | ( | ) |
Color build from fourthed colon.
float Dragengine.Scenery.ColorMatrix.getAt | ( | int | row, |
int | col | ||
) |
Cell value.
EInvalidParam | row is less than 0 or larger than 3. |
EInvalidParam | col is less than 0 or larger than 4. |
Color Dragengine.Scenery.ColorMatrix.getBlueBase | ( | ) |
Color build from third colon.
Color Dragengine.Scenery.ColorMatrix.getGreenBase | ( | ) |
Color build from second colon.
Color Dragengine.Scenery.ColorMatrix.getRedBase | ( | ) |
Color build from first colon.
Color Dragengine.Scenery.ColorMatrix.getWhiteBase | ( | ) |
Color build from fifth colon.
int Dragengine.Scenery.ColorMatrix.hashCode | ( | ) |
Hash code for use as dictionary keys.
Implements Object.hashCode().
ColorMatrix Dragengine.Scenery.ColorMatrix.new | ( | ) |
Create identity color matrix.
ColorMatrix Dragengine.Scenery.ColorMatrix.new | ( | Color | red, |
Color | green, | ||
Color | blue, | ||
Color | alpha, | ||
Color | white | ||
) |
Create color matrix with initial colons.
red sets the first colon, green the second, blue the third, alpha the fourthed and white the fifth colon.
ColorMatrix Dragengine.Scenery.ColorMatrix.new | ( | ColorMatrix | matrix | ) |
Create copy of color matrix.
|
static |
Create brightness color matrix.
|
static |
Create brightness color matrix with same brightness value for each color component.
|
static |
Create brightness color matrix.
|
static |
Create color inversion color matrix.
|
static |
Create contrast color matrix.
|
static |
Create contrast color matrix with same contrast value for each color component.
|
static |
Create contrast color matrix.
|
static |
Create saturation color matrix.
|
static |
Create saturation color matrix.
|
static |
Create saturation color matrix with same saturation value for each color component.
|
static |
Create scaling color matrix.
|
static |
Create scaling color matrix.
|
static |
Create scaling then translaction color matrix.
|
static |
Create translation color matrix.
|
static |
Create translation color matrix.
ColorMatrix Dragengine.Scenery.ColorMatrix.operator* | ( | Color | color | ) |
Transform color by color matrix.
ColorMatrix Dragengine.Scenery.ColorMatrix.operator* | ( | ColorMatrix | matrix | ) |
Matrix multiplication of two color matrixs.
Both matrices are threaded as 5x5 matrices with (0,0,0,0,1) as last row during multiplication. The returned matrix is the upper 5x4 of the multiplication result.
ColorMatrix Dragengine.Scenery.ColorMatrix.operator* | ( | float | scalar | ) |
ColorMatrix with each component scaled by a value.
ColorMatrix Dragengine.Scenery.ColorMatrix.operator+ | ( | ColorMatrix | matrix | ) |
Sum of two color matrixs.
ColorMatrix Dragengine.Scenery.ColorMatrix.operator- | ( | ColorMatrix | matrix | ) |
Difference between two color matrixs.
ColorMatrix Dragengine.Scenery.ColorMatrix.operator/ | ( | float | scalar | ) |
ColorMatrix with each component divided by a value.
EDivisionByZero | scalar is 0. |
|
static |
Read color matrix from a file reader.
String Dragengine.Scenery.ColorMatrix.toString | ( | ) |
String representation of color matrix.
Implements Object.toString()
String Dragengine.Scenery.ColorMatrix.toString | ( | int | precision | ) |
String representation of color 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.ColorMatrix.writeToFile | ( | FileWriter | writer | ) |
Write color matrix to a file writer.