Functions | |
void | hal_gfx_mat3x3_load_identity (hal_gfx_matrix3x3_t m) |
Load Identity Matrix. More... | |
void | hal_gfx_mat3x3_translate (hal_gfx_matrix3x3_t m, float tx, float ty) |
Apply translate transformation. More... | |
void | hal_gfx_mat3x3_scale (hal_gfx_matrix3x3_t m, float sx, float sy) |
Apply scale transformation. More... | |
void | hal_gfx_mat3x3_shear (hal_gfx_matrix3x3_t m, float shx, float shy) |
Apply shear transformation. More... | |
void | hal_gfx_mat3x3_mirror (hal_gfx_matrix3x3_t m, int mx, int my) |
Apply mirror transformation. More... | |
void | hal_gfx_mat3x3_rotate (hal_gfx_matrix3x3_t m, float angle_degrees) |
Apply rotation transformation. More... | |
void | hal_gfx_mat3x3_mul (hal_gfx_matrix3x3_t m, hal_gfx_matrix3x3_t _m) |
Multiply two 3x3 matrices ( m = m*_m) More... | |
void | hal_gfx_mat3x3_mul_vec (hal_gfx_matrix3x3_t m, float *x, float *y) |
Multiply vector with matrix. More... | |
void | hal_gfx_mat3x3_mul_vec_affine (hal_gfx_matrix3x3_t m, float *x, float *y) |
Multiply vector with affine matrix. More... | |
void | hal_gfx_mat3x3_adj (hal_gfx_matrix3x3_t m) |
Calculate adjoint. More... | |
void | hal_gfx_mat3x3_div_scalar (hal_gfx_matrix3x3_t m, float s) |
Divide matrix with scalar value. More... | |
int | hal_gfx_mat3x3_invert (hal_gfx_matrix3x3_t m) |
Invert matrix. More... | |
int | hal_gfx_mat3x3_square_to_quad (float dx0, float dy0, float dx1, float dy1, float dx2, float dy2, float dx3, float dy3, hal_gfx_matrix3x3_t m) |
Square to quad transformation. More... | |
int | hal_gfx_mat3x3_quad_to_rect (int width, int height, float sx0, float sy0, float sx1, float sy1, float sx2, float sy2, float sx3, float sy3, hal_gfx_matrix3x3_t m) |
Map rectangle to quadrilateral. More... | |
void hal_gfx_mat3x3_adj | ( | hal_gfx_matrix3x3_t | m | ) |
Calculate adjoint.
[in] | m | Matrix |
void hal_gfx_mat3x3_div_scalar | ( | hal_gfx_matrix3x3_t | m, |
float | s | ||
) |
Divide matrix with scalar value.
[in] | m | Matrix to divide |
[in] | s | scalar value |
int hal_gfx_mat3x3_invert | ( | hal_gfx_matrix3x3_t | m | ) |
Invert matrix.
[in] | m | Matrix to invert |
void hal_gfx_mat3x3_load_identity | ( | hal_gfx_matrix3x3_t | m | ) |
Load Identity Matrix.
[in] | m | Matrix to be loaded |
void hal_gfx_mat3x3_mirror | ( | hal_gfx_matrix3x3_t | m, |
int | mx, | ||
int | my | ||
) |
Apply mirror transformation.
[in] | m | Matrix to apply transformation |
[in] | mx | if non-zero, mirror horizontally |
[in] | my | if non-zero, mirror vertically |
void hal_gfx_mat3x3_mul | ( | hal_gfx_matrix3x3_t | m, |
hal_gfx_matrix3x3_t | _m | ||
) |
Multiply two 3x3 matrices ( m = m*_m)
[in] | m | left matrix, will be overwritten by the result |
[in] | _m | right matrix |
void hal_gfx_mat3x3_mul_vec | ( | hal_gfx_matrix3x3_t | m, |
float * | x, | ||
float * | y | ||
) |
Multiply vector with matrix.
[in] | m | Matrix to multiply with |
[in] | x | Vector x coefficient |
[in] | y | Vector y coefficient |
void hal_gfx_mat3x3_mul_vec_affine | ( | hal_gfx_matrix3x3_t | m, |
float * | x, | ||
float * | y | ||
) |
Multiply vector with affine matrix.
[in] | m | Matrix to multiply with |
[in] | x | Vector x coefficient |
[in] | y | Vector y coefficient |
int hal_gfx_mat3x3_quad_to_rect | ( | int | width, |
int | height, | ||
float | sx0, | ||
float | sy0, | ||
float | sx1, | ||
float | sy1, | ||
float | sx2, | ||
float | sy2, | ||
float | sx3, | ||
float | sy3, | ||
hal_gfx_matrix3x3_t | m | ||
) |
Map rectangle to quadrilateral.
[in] | width | Rectangle width |
[in] | height | Rectangle height |
[in] | sx0 | x coordinate at the first vertex of the quadrilateral |
[in] | sy0 | y coordinate at the first vertex of the quadrilateral |
[in] | sx1 | x coordinate at the second vertex of the quadrilateral |
[in] | sy1 | y coordinate at the second vertex of the quadrilateral |
[in] | sx2 | x coordinate at the third vertex of the quadrilateral |
[in] | sy2 | y coordinate at the third vertex of the quadrilateral |
[in] | sx3 | x coordinate at the fourth vertex of the quadrilateral |
[in] | sy3 | y coordinate at the fourth vertex of the quadrilateral |
[in] | m | Mapping matrix |
void hal_gfx_mat3x3_rotate | ( | hal_gfx_matrix3x3_t | m, |
float | angle_degrees | ||
) |
Apply rotation transformation.
[in] | m | Matrix to apply transformation |
[in] | angle_degrees | Angle to rotate in degrees |
void hal_gfx_mat3x3_scale | ( | hal_gfx_matrix3x3_t | m, |
float | sx, | ||
float | sy | ||
) |
Apply scale transformation.
[in] | m | Matrix to apply transformation |
[in] | sx | X scaling factor |
[in] | sy | Y scaling factor |
void hal_gfx_mat3x3_shear | ( | hal_gfx_matrix3x3_t | m, |
float | shx, | ||
float | shy | ||
) |
Apply shear transformation.
[in] | m | Matrix to apply transformation |
[in] | shx | X shearing factor |
[in] | shy | Y shearing factor |
int hal_gfx_mat3x3_square_to_quad | ( | float | dx0, |
float | dy0, | ||
float | dx1, | ||
float | dy1, | ||
float | dx2, | ||
float | dy2, | ||
float | dx3, | ||
float | dy3, | ||
hal_gfx_matrix3x3_t | m | ||
) |
Square to quad transformation.
[in] | dx0 | x coordinate at the first vertex of the quadrilateral |
[in] | dy0 | y coordinate at the first vertex of the quadrilateral |
[in] | dx1 | x coordinate at the second vertex of the quadrilateral |
[in] | dy1 | y coordinate at the second vertex of the quadrilateral |
[in] | dx2 | x coordinate at the third vertex of the quadrilateral |
[in] | dy2 | y coordinate at the third vertex of the quadrilateral |
[in] | dx3 | x coordinate at the fourth vertex of the quadrilateral |
[in] | dy3 | y coordinate at the fourth vertex of the quadrilateral |
[in] | m | Store converted matrix |
void hal_gfx_mat3x3_translate | ( | hal_gfx_matrix3x3_t | m, |
float | tx, | ||
float | ty | ||
) |
Apply translate transformation.
[in] | m | Matrix to apply transformation |
[in] | tx | X translation factor |
[in] | ty | Y translation factor |