What does it mean to "preconcat" a matrix in Android?
When working with matrices, the word concatenation refers to multiplication.
Since matrix multiplication is not commutative, there is a separate word for backwards multiplication.
Pre-concatenating a
to b
means setting a = b × a
. (As opposed to a = a × b
, which will give a different matrix)
Related videos on Youtube
Brad Hein
Professional Linux Engineer Recreational Software Engineer. Some of my Apps (also see my home page: www.gtosoft.com): Sleuth Open Source vehicle network deep diagnostic tool libVoyager Open Source Java to vehicle link VoyagerDash advanced vehicle controls and diagnostics VoyagerConnect advanced vehicle diagnostics VoyagerRC Research app for remotely controlling vehicle systems. Lactoid food journal
Updated on April 20, 2022Comments
-
Brad Hein about 2 years
In reviewing: http://developer.android.com/reference/android/graphics/Canvas.html
I'm wondering
translate(): "preconcat the current matrix with the specified translation" -- what does this mean?
I can't find a good definition of "preconcat" anywhere on the internet! The only place I can find it is in the Android Source - I'm starting to wonder if they made it up? :)
I'm familiar with "concat" or concatenate, which is to append to, so what is a pre-concat?
-
Brad Hein about 14 yearsThank you. My question was in the context of the Android Canvas however and I'm having a hard time making the connection between the canvas and the matrix?
-
SLaks about 14 years@Brad: The canvas maintains a transform matrix;
translate
manipulates it. -
Brad Hein about 14 yearsThe canvas maintains a matrix and the canvas is manipulated by methods which are well defined in OpenGL. A great source of relevant definitions is: gpwiki.org/index.php/OpenGL:Tutorials:Theory