Hi,
Just to let you know,I have done some research to understand what is exactly matrix in Gideros.
I have seen the page curl effect,and one more example(animated grass).
But still I do not get the core concept.
These are the things,that I am wondering.
What dose it do?
How can it help me?
How dose it work?
Thanks in advance.
www.zoolax.com
Comments
I understand mesh can be a triangle ,but we can create that using the Shape api.
So what is the advantage of Mesh?
I feel these are powerful tools,(MESH AND MATRIX)
That is ,why I am keen to find out what they do?
How they can help us?
Why do we need them?
Thanks
Likes: hgvyas123
In Gideros the matrix is used to represent transformation - the state in which object is transformed right now.
So if we have a matrix:
m11 m21 dx
m12 m22 dy
then:
m11, m12, m21, m22 – define rotation
m11, m22 – define scaling
m12, m21 – define skew
dx and dy – define translation of coordinate plane (offset)
Unit matrix represent default matrix when no transformation is performed:
1 0 0
0 1 0
Here is a Transform class for Gideros which performs matrix operations to perform transformations:
http://appcodingeasy.com/Gideros-Mobile/Abstracting-matrix-transformation-in-Gideros-Mobile
But in most cases, Gideros already abstracted rotation and scaling as Sprite methods, so unless you need some specific transformation, there is no really use of Matrix for you
Likes: hgvyas123
Basically with Shape you can draw any shape easily by passing coordinate points.
In meshes you can draw in triangles (theoretically you could also draw any shape, but you'd need to represent it with triangles, which might get tricky).
Unlike in Shape, triangles in Mesh can be separated, means one triangle can be in one corner, other in other corner and it still will be one Mesh.
And you can control each vertex of a triangle separately, which means you could set separate fill colors and create gradients.
I don't know about antialising, but probably Meshes deal with it better than Shapes.
And for some reason unknown to me Meshes are faster for rendering than Shapes or even Bitmaps separately. But you can't for example transform images used in Meshes as scale or rotate them.
So you must consider limitations and benefits before using one or other object.
Hope that clears things up
Likes: code_monkey
I am getting it slowly,I feel kind of what it can do,
But I have to mess around with it a bit more so it will sink in.
I love the part that we can skew images.
Thanks