Skip to content

Is it safe to pass matrices for non-affine transformations to e.g. glm_translate? #370

Answered by recp
v1993 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @v1993,

Affine functions can be used with any matrices ( if there is a need ) but affine-mat.h cannot, because affine-mat.h has assumptions like:

 * Matrix format should be:
 *   R  R  R  X
 *   R  R  R  Y
 *   R  R  R  Z
 *   0  0  0  W
 * Right Matrix format should be:
 *   R  R  R  0
 *   R  R  R  0
 *   R  R  R  0
 *   0  0  0  1
inverse orthonormal rotation + translation matrix (ridig-body)

Actually there are some functions in affine too that needs specific type of matrix:

 * @brief decompose affine transform, TODO: extract shear factors.
 *        DON'T pass projected matrix here

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@v1993
Comment options

@recp
Comment options

@v1993
Comment options

@recp
Comment options

Answer selected by v1993
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants