Collaboration diagram for Functions:Functions | |
| void | hal_gfx_mat4x4_load_identity (hal_gfx_matrix4x4_t m) |
| Load a 4x4 Identity Matrix. More... | |
| 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. More... | |
| 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. More... | |
| void | hal_gfx_mat4x4_translate (hal_gfx_matrix4x4_t m, float tx, float ty, float tz) |
| Apply translate transformation. More... | |
| void | hal_gfx_mat4x4_scale (hal_gfx_matrix4x4_t m, float sx, float sy, float sz) |
| Apply scale transformation. More... | |
| void | hal_gfx_mat4x4_rotate_X (hal_gfx_matrix4x4_t m, float angle_degrees) |
| Apply rotate transformation around X axis. More... | |
| void | hal_gfx_mat4x4_rotate_Y (hal_gfx_matrix4x4_t m, float angle_degrees) |
| Apply rotate transformation around Y axis. More... | |
| void | hal_gfx_mat4x4_rotate_Z (hal_gfx_matrix4x4_t m, float angle_degrees) |
| Apply rotate transformation around Z axis. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| void hal_gfx_mat4x4_load_identity | ( | hal_gfx_matrix4x4_t | m | ) |
Load a 4x4 Identity Matrix.
| [in] | m | Matrix to be loaded |
| 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.
| [in] | m | A 4x4 Matrix |
| [in] | left | Left vertical clipping plane |
| [in] | right | Right vertical clipping plane |
| [in] | bottom | bottom horizontal clipping plane |
| [in] | top | Top horizontal clipping plane |
| [in] | nearVal | Distance from the viewer to the near clipping plane (always positive) |
| [in] | farVal | Distance from the viewer to the far clipping plane (always positive) |
| 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.
| [in] | m | A 4x4 Matrix |
| [in] | left | Left vertical clipping plane |
| [in] | right | Right vertical clipping plane |
| [in] | bottom | bottom horizontal clipping plane |
| [in] | top | Top horizontal clipping plane |
| 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.
| [in] | m | A 4x4 Matrix |
| [in] | fovy_degrees | Field of View in degrees |
| [in] | aspect | Aspect ratio that determines the field of view in the x direction. |
| [in] | nearVal | Distance from the viewer to the near clipping plane (always positive) |
| [in] | farVal | Distance from the viewer to the far clipping plane (always positive) |
| 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.
| [in] | m | Result Matrix |
| [in] | m_l | Left operand |
| [in] | m_r | Right operand |
| 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.
| [in] | m | Matrix to be multiplied |
| [in] | x | Vector first element |
| [in] | y | Vector second element |
| [in] | z | Vector third element |
| [in] | w | Vector forth element |
| 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.
| [in] | mvp | Model, View and Projection Matrix |
| [in] | x_orig | Window top left X coordinate |
| [in] | y_orig | Window top left Y coordinate |
| [in] | width | Window width |
| [in] | height | Window height |
| [in] | nearVal | Distance from the viewer to the near clipping plane (always positive) |
| [in] | farVal | Distance from the viewer to the far clipping plane (always positive) |
| [in] | x | X object coordinate |
| [in] | y | Y object coordinate |
| [in] | z | Z object coordinate |
| [in] | w | W object coordinate |
| void hal_gfx_mat4x4_rotate_X | ( | hal_gfx_matrix4x4_t | m, |
| float | angle_degrees | ||
| ) |
Apply rotate transformation around X axis.
| [in] | m | Matrix to apply transformation |
| [in] | angle_degrees | Angle to rotate in degrees |
| void hal_gfx_mat4x4_rotate_Y | ( | hal_gfx_matrix4x4_t | m, |
| float | angle_degrees | ||
| ) |
Apply rotate transformation around Y axis.
| [in] | m | Matrix to apply transformation |
| [in] | angle_degrees | Angle to rotate in degrees |
| void hal_gfx_mat4x4_rotate_Z | ( | hal_gfx_matrix4x4_t | m, |
| float | angle_degrees | ||
| ) |
Apply rotate transformation around Z axis.
| [in] | m | Matrix to apply transformation |
| [in] | angle_degrees | Angle to rotate in degrees |
| void hal_gfx_mat4x4_scale | ( | hal_gfx_matrix4x4_t | m, |
| float | sx, | ||
| float | sy, | ||
| float | sz | ||
| ) |
Apply scale transformation.
| [in] | m | Matrix to apply transformation |
| [in] | sx | X scaling factor |
| [in] | sy | Y scaling factor |
| [in] | sz | Z scaling factor |
| void hal_gfx_mat4x4_translate | ( | hal_gfx_matrix4x4_t | m, |
| float | tx, | ||
| float | ty, | ||
| float | tz | ||
| ) |
Apply translate transformation.
| [in] | m | Matrix to apply transformation |
| [in] | tx | X translation factor |
| [in] | ty | Y translation factor |
| [in] | tz | Z translation factor |