The reason using the matrix is efficient in computing multiple factors - 
position, rotation, scale ..-  at one time.

eina matrix shouldn't be designed for only svg but for more common cases.
evas 3d will also need the eina matrix and app may uses them for their matrix 
also.

we should design it for more common case.
so the default usage should be this,

matrix m;
matrix_identify(m);
matrix_translate(m);
matrix_rotate(m);
matrix_scale(m);

------------------------------------
-Regards, Hermet-

-----Original Message-----
From: "Cedric BAIL"<cedric.b...@free.fr> 
To: "Enlightenment developer list"<enlightenment-devel@lists.sourceforge.net>; 
Cc: 
Sent: 2015-04-09 (목) 17:03:04
Subject: Re: [E-devel] [EGIT] [core/efl] master 02/02: eina_matrix: Add since 
tags to all new functions in 1.14
 
Hello,

On Thu, Apr 9, 2015 at 7:44 AM, ChunEon Park <her...@naver.com> wrote:
> Current matrix usage seems going wrong.
> I found the current matrix usage is this.
>
> matrix m;
> matrix_translate(m, ...);
>
> matrix m2;
> matrix_rotation(m, ...);
>
> matrix m3;
> matrix_scale(m, ...);
>
> matrix m4;
> matrix_compose(m, m2, m4);
>
> matrix m5;
> matrix_compose(m3, m4, m5);
>
> it's unnecessary and inefficient.
> Rather than, default matrix usage should be designed to compose of the 
> transforms.
>
> matrix m;
> matrix_identify(m);
> matrix_translate(m);
> matrix_rotate(m);
> matrix_scale(m);
>
> if you focused to single factor transform rather than composition
> then single vector is enough to use rather than matrix.

I am not to sure I understand what you mean correctly here. Your
suggestion would be to actually apply the transformation on an
existing matrix doing the set + compose in one step instead of two and
simplifying the operation by knowing where the zero already are in the
composition operation. The reason it is like this, is that in SVG you
only read the matrix once, but you compose it almost every single
frame. It made the core more compact and easier to read, but I can
understand that in different usage scenario you would want to have a
more optimized code path. I guess it can be done.
-- 
Cedric BAIL

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to