/
xverizex
/
c_game_engine
Обзор
Документация
Войти
/
xverizex
/
c_game_engine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/engine/include/gl-math.h
30 строк
1 KB
Dmitry
Add engine
08 авг 2025, 04:00
08 авг 2025, 04:00
ce7ab0d
Код
Авторство
О чём код?
#ifndef GL_MATH_H #define GL_MATH_H void math_clear_vec4 (float *e); void math_clear_vec3 (float *e); void math_clear_mat4x4 (float *e); void math_model(float *e, float sc); void math_scale(float *e, float sc); void math_perspective(float *e, float angle, float aspect, float near, float far); void math_translate(float *e, float x, float y, float z); void math_mat4_mul(float *e, float *a, float *b); void math_lookat (float *e, float *ee, float *r, float *up); void math_transpose_mat4(float *e, float *a); void math_vec3_cross(float *e, float *a, float *b); void math_vec3_normalize(float *e, float *a); void math_vec3_sub(float *e, float *a, float *b); void math_mat4_mul_vec4(float *e, float *m, float *v); void math_ortho_rh(float *e, float left, float right, float bottom, float top, float near, float far); void math_ortho_lh(float *e, float left, float right, float bottom, float top, float near, float far); void math_vec3_add (float *e, float *a, float *b); float math_radians (float r); float math_magnitude (float *e); float math_distance_to_plane (float *a, float *b, float d); void math_mat4_inverse(float *e, float *m); void math_rotate(float *e, float angle, int xaxis, int yaxis, int zaxis); int math_intersect_ray_triangle(float *origin, float *direction, float *vec0, float *vec1, float *vec2); int math_simple_intersect_ray_triangle(float *origin, float *direction, float *vec0, float *vec1, float *vec2); #endif