mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +00:00
translate and scale make util
This commit is contained in:
@@ -121,6 +121,13 @@ glm_translate_z(mat4 m, float to) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CGLM_INLINE
|
||||||
|
void
|
||||||
|
glm_translate_make(mat4 m, vec3 v) {
|
||||||
|
mat4 t = GLM_MAT4_IDENTITY_INIT;
|
||||||
|
glm_translate_to(t, v, m);
|
||||||
|
}
|
||||||
|
|
||||||
/* scale */
|
/* scale */
|
||||||
|
|
||||||
CGLM_INLINE
|
CGLM_INLINE
|
||||||
@@ -133,6 +140,13 @@ glm_scale_to(mat4 m, vec3 v, mat4 dest) {
|
|||||||
glm_vec4_copy(m[3], dest[3]);
|
glm_vec4_copy(m[3], dest[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CGLM_INLINE
|
||||||
|
void
|
||||||
|
glm_scale_make(mat4 m, vec3 v) {
|
||||||
|
mat4 t = GLM_MAT4_IDENTITY_INIT;
|
||||||
|
glm_scale_to(t, v, m);
|
||||||
|
}
|
||||||
|
|
||||||
CGLM_INLINE
|
CGLM_INLINE
|
||||||
void
|
void
|
||||||
glm_scale(mat4 m, vec3 v) {
|
glm_scale(mat4 m, vec3 v) {
|
||||||
|
|||||||
Reference in New Issue
Block a user