Go to the documentation of this file.
12 #ifndef HAL_GFX_MATRIX4X4_H__
13 #define HAL_GFX_MATRIX4X4_H__
147 float nearVal,
float farVal);
164 float left,
float right,
165 float bottom,
float top,
166 float nearVal,
float farVal);
181 float left,
float right,
182 float bottom,
float top);
207 float x_orig,
float y_orig,
208 int width,
int height,
209 float nearVal,
float farVal,
void hal_gfx_mat4x4_rotate_X(hal_gfx_matrix4x4_t m, float angle_degrees)
Apply rotate transformation around X axis.
void hal_gfx_mat4x4_translate(hal_gfx_matrix4x4_t m, float tx, float ty, float tz)
Apply translate transformation.
void hal_gfx_mat4x4_load_perspective(hal_gfx_matrix4x4_t m, float fovy_degrees, float aspect, float nearVal, float farVal)
Set up a perspective projection matrix.
void hal_gfx_mat4x4_load_ortho(hal_gfx_matrix4x4_t m, float left, float right, float bottom, float top, float nearVal, float farVal)
Set up an orthographic projection matrix.
float hal_gfx_matrix4x4_t[4][4]
void hal_gfx_mat4x4_mul_vec(hal_gfx_matrix4x4_t m, float *x, float *y, float *z, float *w)
Multiply a 4x1 vector with a 4x4 matrix.
void hal_gfx_mat4x4_rotate_Y(hal_gfx_matrix4x4_t m, float angle_degrees)
Apply rotate transformation around Y axis.
void hal_gfx_mat4x4_mul(hal_gfx_matrix4x4_t m, hal_gfx_matrix4x4_t m_l, hal_gfx_matrix4x4_t m_r)
Multiply two 4x4 matrices.
void hal_gfx_mat4x4_rotate_Z(hal_gfx_matrix4x4_t m, float angle_degrees)
Apply rotate transformation around Z axis.
void hal_gfx_mat4x4_scale(hal_gfx_matrix4x4_t m, float sx, float sy, float sz)
Apply scale transformation.
int hal_gfx_mat4x4_obj_to_win_coords(hal_gfx_matrix4x4_t mvp, float x_orig, float y_orig, int width, int height, float nearVal, float farVal, float *x, float *y, float *z, float *w)
Convenience Function to calculate window coordinates from object coordinates.
void hal_gfx_mat4x4_load_ortho_2d(hal_gfx_matrix4x4_t m, float left, float right, float bottom, float top)
Set up a 2D orthographic projection matrix.
void hal_gfx_mat4x4_load_identity(hal_gfx_matrix4x4_t m)
Load a 4x4 Identity Matrix.