update docs, add clarifications for affine transforms

This commit is contained in:
Recep Aslantas
2018-04-17 15:42:24 +03:00
parent 33e951fe2e
commit 27ab6a7dd0
4 changed files with 148 additions and 5 deletions

View File

@@ -25,6 +25,8 @@
CGLM_INLINE void glm_rotate_make(mat4 m, float angle, vec3 axis);
CGLM_INLINE void glm_rotate_ndc(mat4 m, float angle, vec3 axis);
CGLM_INLINE void glm_rotate(mat4 m, float angle, vec3 axis);
CGLM_INLINE void glm_rotate_at(mat4 m, vec3 pivot, float angle, vec3 axis);
CGLM_INLINE void glm_rotate_atm(mat4 m, vec3 pivot, float angle, vec3 axis);
CGLM_INLINE void glm_decompose_scalev(mat4 m, vec3 s);
CGLM_INLINE bool glm_uniscaled(mat4 m);
CGLM_INLINE void glm_decompose_rs(mat4 m, mat4 r, vec3 s);
@@ -521,7 +523,7 @@ glm_decompose_scalev(mat4 m, vec3 s) {
}
/*!
* @brief returns true if matrix is uniform scaled. This is helpful for
* @brief returns true if matrix is uniform scaled. This is helpful for
* creating normal matrix.
*
* @param[in] m m

View File

@@ -757,14 +757,14 @@ glm_quat_rotate(mat4 m, versor q, mat4 dest) {
*/
CGLM_INLINE
void
glm_quat_rotate_at(mat4 model, versor q, vec3 pivot) {
glm_quat_rotate_at(mat4 m, versor q, vec3 pivot) {
vec3 pivotInv;
glm_vec_inv_to(pivot, pivotInv);
glm_translate(model, pivot);
glm_quat_rotate(model, q, model);
glm_translate(model, pivotInv);
glm_translate(m, pivot);
glm_quat_rotate(m, q, m);
glm_translate(m, pivotInv);
}
/*!