AI for Games 1.1.1
|
Classes | |
class | Matrix |
Public Member Functions | |
void | matrixMultiply (final Matrix mIn) |
List< Vector2D > | transformVector2D (final List< Vector2D > vList) |
Vector2D | transformVector2D (final Vector2D vPoint) |
void | identity () |
void | translate (double x, double y) |
void | scale (double xScale, double yScale) |
void | rotate (final double rot) |
void | rotate (final Vector2D fwd, final Vector2D side) |
void | _11 (double val) |
void | _12 (double val) |
void | _13 (double val) |
void | _21 (double val) |
void | _22 (double val) |
void | _23 (double val) |
void | _31 (double val) |
void | _32 (double val) |
void | _33 (double val) |
Private Attributes | |
Matrix | matrix |
Class to represent a 2D matrix that can be used to create transformed Vector2D objects.
void game2dai.maths.Matrix2D.identity | ( | ) |
Initialise the matrix to the identity matrix. This will erase the previous matrix element data.
void game2dai.maths.Matrix2D.matrixMultiply | ( | final Matrix | mIn | ) |
Multiply this matrix by another
mIn | the multiplying matrix |
void game2dai.maths.Matrix2D.rotate | ( | final double | rot | ) |
Rotate the matrix.
rot | angle in radians. |
Rotate the matrix based an entity's heading and side vectors
fwd | |
side |
void game2dai.maths.Matrix2D.scale | ( | double | xScale, |
double | yScale | ||
) |
Scale the matrix in the x and y directions.
xScale | scale x by this |
yScale | scale y by this |
Create a new list of vectors from the provided list after being transformed by this matrix.
vList | the original list of vectors |
Create a new vector from the provided vector after being transformed by the matrix.
vPoint | the original vector |
void game2dai.maths.Matrix2D.translate | ( | double | x, |
double | y | ||
) |
Translate the matrix by the amount specified in x and y.
x | x-translation value |
y | y-translation value |