You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if I inline this code I end up with this order: p_ = p * M1 * M2, which would imply that p is first multiplied by M1 and then M2, but that's not what happens. The result M1 * M2 * p, i.e. it's multiplied by M2 and then by M1.
Wouldn't this order vec3.transformMat4(p_, M_, p); be less confusing? Is it just an oversight or am I missing something?
For example, writing this in CoreGraphics would look like this:
p_ = p.applying(M1.concatenating(M2))
and mathematically equivalent to p_ = p * M1 * M2, i.e. the consistent order, although a bit unconventional use of row-vectors for someone coming from a math background, but at least they are super consistent about that when it comes to the order of arguments in API or any explanations in the documentation.
The text was updated successfully, but these errors were encountered:
There are concepts of left multiplication and right multiplication in matrix multiplication, and they represent different meanings.
glmatrix is used in the drawing engine. I guess the API means more to apply another transformation matrix to a vector or matrix, which satisfies the meaning of matrix left multiplication.
I'm confused about the order of arguments, as it doesn't follow mathematical logic. This code specifically:
if I inline this code I end up with this order:
p_ = p * M1 * M2
, which would imply thatp
is first multiplied byM1
and thenM2
, but that's not what happens. The resultM1 * M2 * p
, i.e. it's multiplied byM2
and then byM1
.Wouldn't this order
vec3.transformMat4(p_, M_, p);
be less confusing? Is it just an oversight or am I missing something?For example, writing this in CoreGraphics would look like this:
and mathematically equivalent to
p_ = p * M1 * M2
, i.e. the consistent order, although a bit unconventional use of row-vectors for someone coming from a math background, but at least they are super consistent about that when it comes to the order of arguments in API or any explanations in the documentation.The text was updated successfully, but these errors were encountered: