summaryrefslogtreecommitdiff
path: root/src/lib/evas/include/evas_3d_utils.h
diff options
context:
space:
mode:
authorChunEon Park <chuneon.park@samsung.com>2014-04-16 16:31:14 +0900
committerChunEon Park <hermet@hermet.pe.kr>2014-04-25 17:34:11 +0900
commit433699e976d21efd219c9c4660aa4975a4cc56da (patch)
tree6b360bd1885e3af3825cd28de702050737be2806 /src/lib/evas/include/evas_3d_utils.h
parent60e703bc24819b89e28d335e21849aa64bf17dd3 (diff)
evas/evas3d: cleanup docs and removed unncessary files.
Conflicts: src/lib/evas/Evas_Legacy.h
Diffstat (limited to 'src/lib/evas/include/evas_3d_utils.h')
-rw-r--r--src/lib/evas/include/evas_3d_utils.h54
1 files changed, 29 insertions, 25 deletions
diff --git a/src/lib/evas/include/evas_3d_utils.h b/src/lib/evas/include/evas_3d_utils.h
index 8933c45e7a..68f3ccdb4e 100644
--- a/src/lib/evas/include/evas_3d_utils.h
+++ b/src/lib/evas/include/evas_3d_utils.h
@@ -622,11 +622,12 @@ evas_mat4_copy(Evas_Mat4 *dst, const Evas_Mat4 *src)
622} 622}
623 623
624static inline void 624static inline void
625evas_mat4_nocheck_multiply(Evas_Mat4 *out, const Evas_Mat4 *mat_a, const Evas_Mat4 *mat_b) 625evas_mat4_nocheck_multiply(Evas_Mat4 *out, const Evas_Mat4 *mat_a,
626 const Evas_Mat4 *mat_b)
626{ 627{
627 Evas_Real *d = &out->m[0]; 628 Evas_Real *d = out->m;
628 const Evas_Real *a = &mat_a->m[0]; 629 const Evas_Real *a = mat_a->m;
629 const Evas_Real *b = &mat_b->m[0]; 630 const Evas_Real *b = mat_b->m;
630 631
631 if (mat_a->flags & EVAS_MATRIX_IS_IDENTITY) 632 if (mat_a->flags & EVAS_MATRIX_IS_IDENTITY)
632 { 633 {
@@ -664,7 +665,8 @@ evas_mat4_nocheck_multiply(Evas_Mat4 *out, const Evas_Mat4 *mat_a, const Evas_Ma
664} 665}
665 666
666static inline void 667static inline void
667evas_mat4_multiply(Evas_Mat4 *out, const Evas_Mat4 *mat_a, const Evas_Mat4 *mat_b) 668evas_mat4_multiply(Evas_Mat4 *out, const Evas_Mat4 *mat_a,
669 const Evas_Mat4 *mat_b)
668{ 670{
669 if (out != mat_a && out != mat_b) 671 if (out != mat_a && out != mat_b)
670 { 672 {
@@ -785,9 +787,9 @@ evas_mat4_ortho_set(Evas_Mat4 *m,
785static inline void 787static inline void
786evas_mat4_nocheck_inverse(Evas_Mat4 *out, const Evas_Mat4 *mat) 788evas_mat4_nocheck_inverse(Evas_Mat4 *out, const Evas_Mat4 *mat)
787{ 789{
788 Evas_Real *d = &out->m[0]; 790 Evas_Real *d = out->m;
789 const Evas_Real *m = &mat->m[0]; 791 const Evas_Real *m = mat->m;
790 Evas_Real det; 792 Evas_Real det;
791 793
792 if (mat->flags & EVAS_MATRIX_IS_IDENTITY) 794 if (mat->flags & EVAS_MATRIX_IS_IDENTITY)
793 { 795 {
@@ -909,8 +911,7 @@ evas_mat4_nocheck_inverse(Evas_Mat4 *out, const Evas_Mat4 *mat)
909 911
910 det = m[0] * d[0] + m[1] * d[4] + m[2] * d[8] + m[3] * d[12]; 912 det = m[0] * d[0] + m[1] * d[4] + m[2] * d[8] + m[3] * d[12];
911 913
912 if (det == 0.0) 914 if (det == 0.0) return;
913 return;
914 915
915 det = 1.0 / det; 916 det = 1.0 / det;
916 917
@@ -1016,9 +1017,9 @@ evas_mat3_copy(Evas_Mat3 *dst, const Evas_Mat3 *src)
1016static inline void 1017static inline void
1017evas_mat3_nocheck_multiply(Evas_Mat3 *out, const Evas_Mat3 *mat_a, const Evas_Mat3 *mat_b) 1018evas_mat3_nocheck_multiply(Evas_Mat3 *out, const Evas_Mat3 *mat_a, const Evas_Mat3 *mat_b)
1018{ 1019{
1019 Evas_Real *d = &out->m[0]; 1020 Evas_Real *d = out->m;
1020 const Evas_Real *a = &mat_a->m[0]; 1021 const Evas_Real *a = mat_a->m;
1021 const Evas_Real *b = &mat_b->m[0]; 1022 const Evas_Real *b = mat_b->m;
1022 1023
1023 if (mat_a->flags & EVAS_MATRIX_IS_IDENTITY) 1024 if (mat_a->flags & EVAS_MATRIX_IS_IDENTITY)
1024 { 1025 {
@@ -1236,7 +1237,8 @@ evas_mat2_invserse(Evas_Mat2 *out, const Evas_Mat2 *mat)
1236} 1237}
1237 1238
1238static inline void 1239static inline void
1239evas_box2_set(Evas_Box2 *box, Evas_Real x0, Evas_Real y0, Evas_Real x1, Evas_Real y1) 1240evas_box2_set(Evas_Box2 *box, Evas_Real x0, Evas_Real y0, Evas_Real x1,
1241 Evas_Real y1)
1240{ 1242{
1241 box->p0.x = x0; 1243 box->p0.x = x0;
1242 box->p0.y = y0; 1244 box->p0.y = y0;
@@ -1245,7 +1247,8 @@ evas_box2_set(Evas_Box2 *box, Evas_Real x0, Evas_Real y0, Evas_Real x1, Evas_Rea
1245} 1247}
1246 1248
1247static inline void 1249static inline void
1248evas_box3_set(Evas_Box3 *box, Evas_Real x0, Evas_Real y0, Evas_Real z0, Evas_Real x1, Evas_Real y1, Evas_Real z1) 1250evas_box3_set(Evas_Box3 *box, Evas_Real x0, Evas_Real y0, Evas_Real z0,
1251 Evas_Real x1, Evas_Real y1, Evas_Real z1)
1249{ 1252{
1250 box->p0.x = x0; 1253 box->p0.x = x0;
1251 box->p0.y = y0; 1254 box->p0.y = y0;
@@ -1481,17 +1484,18 @@ evas_color_blend(Evas_Color *dst, const Evas_Color *c0, const Evas_Color *c1, Ev
1481static inline void 1484static inline void
1482evas_ray3_init(Evas_Ray3 *ray, Evas_Real x, Evas_Real y, const Evas_Mat4 *mvp) 1485evas_ray3_init(Evas_Ray3 *ray, Evas_Real x, Evas_Real y, const Evas_Mat4 *mvp)
1483{ 1486{
1484 Evas_Mat4 mat; 1487 Evas_Mat4 mat;
1485 Evas_Vec4 near, far; 1488 Evas_Vec4 near, far;
1486 1489
1487 /* Get the matrix which transforms from normalized device coordinate to modeling coodrinate. */ 1490 /* Get the matrix which transforms from normalized device coordinate to
1491 modeling coodrinate. */
1488 evas_mat4_inverse(&mat, mvp); 1492 evas_mat4_inverse(&mat, mvp);
1489 1493
1490 /* Transform near point. */ 1494 /* Transform near point. */
1491 near.x = x; 1495 near.x = x;
1492 near.y = y; 1496 near.y = y;
1493 near.z = -1.0; 1497 near.z = -1.0;
1494 near.w = 1.0; 1498 near.w = 1.0;
1495 1499
1496 evas_vec4_transform(&near, &near, &mat); 1500 evas_vec4_transform(&near, &near, &mat);
1497 1501
@@ -1503,10 +1507,10 @@ evas_ray3_init(Evas_Ray3 *ray, Evas_Real x, Evas_Real y, const Evas_Mat4 *mvp)
1503 evas_vec3_set(&ray->org, near.x, near.y, near.z); 1507 evas_vec3_set(&ray->org, near.x, near.y, near.z);
1504 1508
1505 /* Transform far point. */ 1509 /* Transform far point. */
1506 far.x = x; 1510 far.x = x;
1507 far.y = y; 1511 far.y = y;
1508 far.z = 1.0; 1512 far.z = 1.0;
1509 far.w = 1.0; 1513 far.w = 1.0;
1510 1514
1511 evas_vec4_transform(&far, &far, &mat); 1515 evas_vec4_transform(&far, &far, &mat);
1512 1516