]>
git.bts.cx Git - benzene.git/blob - src/bz/math/matrix.h
1 #ifndef BZ_MATH_MATRIX_H
2 #define BZ_MATH_MATRIX_H
4 #include <bz/math/vector.h>
18 typedef struct BZMatrix BZMatrix
;
21 extern void bzMatrixSet(BZMatrix
*matrixOut
, float a
, float b
, float c
, float d
, float x
, float y
);
22 extern void bzMatrixCopy(BZMatrix
*matrixOut
, const BZMatrix
*matrix
);
24 extern void bzMatrixInverse(BZMatrix
*matrixOut
, const BZMatrix
*matrix
);
25 extern void bzMatrixMultiply(BZMatrix
*matrixOut
, const BZMatrix
*matrix1
, const BZMatrix
*matrix2
);
27 extern void bzMatrixIdentity(BZMatrix
*matrixOut
);
28 extern void bzMatrixRotation(BZMatrix
*matrixOut
, float angle
);
29 extern void bzMatrixTranslation(BZMatrix
*matrixOut
, float translateX
, float translateY
);
30 extern void bzMatrixScale(BZMatrix
*matrixOut
, float scaleX
, float scaleY
);
31 //extern void bzMatrixTRS(BZMatrix *matrixOut, float translateX, float translateY, float angle, float scaleX, float scaleY);
32 extern void bzMatrixSRT(BZMatrix
*matrixOut
, float translateX
, float translateY
, float angle
, float scaleX
, float scaleY
);
33 extern void bzMatrixShear(BZMatrix
*matrixOut
, float shearX
, float shearY
);
34 extern void bzMatrixOrtho(BZMatrix
*matrixOut
, float left
, float top
, float right
, float bottom
);
36 //extern void bzMatrixScaleVector(BZVector *vectorOut, const BZVector *vector, const BZMatrix *matrix); // NB: Expensive
37 extern void bzMatrixTranslateVector(BZVector
*vectorOut
, const BZVector
*vector
, const BZMatrix
*matrix
);
38 extern void bzMatrixScaleRotateVector(BZVector
*vectorOut
, const BZVector
*vector
, const BZMatrix
*matrix
);
39 extern void bzMatrixTransformVector(BZVector
*vectorOut
, const BZVector
*vector
, const BZMatrix
*matrix
);