summaryrefslogtreecommitdiff
path: root/src/lib/evas/include/evas_3d_utils.h
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@free.fr>2014-04-25 14:34:55 +0200
committerCedric Bail <cedric.bail@free.fr>2014-04-25 14:36:20 +0200
commit6efce2289b8734de8cbfee2cdd78ebb1af2ba67c (patch)
tree5e42377a69d3c13fb902c5aef47b00fcae350a47 /src/lib/evas/include/evas_3d_utils.h
parentb9d2972739b1bb1aaf5e6864e98d89a9219d8aca (diff)
evas: fix massive number of warning introduced by Evas_3d.
Diffstat (limited to 'src/lib/evas/include/evas_3d_utils.h')
-rw-r--r--src/lib/evas/include/evas_3d_utils.h58
1 files changed, 36 insertions, 22 deletions
diff --git a/src/lib/evas/include/evas_3d_utils.h b/src/lib/evas/include/evas_3d_utils.h
index 68f3ccdb4e..a5f4214c1b 100644
--- a/src/lib/evas/include/evas_3d_utils.h
+++ b/src/lib/evas/include/evas_3d_utils.h
@@ -7,77 +7,89 @@
7#define DEGREE_TO_RADIAN(x) (((x) * M_PI) / 180.0) 7#define DEGREE_TO_RADIAN(x) (((x) * M_PI) / 180.0)
8#define EVAS_MATRIX_IS_IDENTITY 0x00000001 8#define EVAS_MATRIX_IS_IDENTITY 0x00000001
9 9
10typedef struct _Evas_Color 10typedef struct _Evas_Color Evas_Color;
11typedef struct _Evas_Vec2 Evas_Vec2;
12typedef struct _Evas_Vec3 Evas_Vec3;
13typedef struct _Evas_Vec4 Evas_Vec4;
14typedef struct _Evas_Mat2 Evas_Mat2;
15typedef struct _Evas_Mat3 Evas_Mat3;
16typedef struct _Evas_Mat4 Evas_Mat4;
17typedef struct _Evas_Box2 Evas_Box2;
18typedef struct _Evas_Box3 Evas_Box3;
19typedef struct _Evas_Triangle3 Evas_Triangle3;
20typedef struct _Evas_Ray3 Evas_Ray3;
21
22struct _Evas_Color
11{ 23{
12 Evas_Real r; 24 Evas_Real r;
13 Evas_Real g; 25 Evas_Real g;
14 Evas_Real b; 26 Evas_Real b;
15 Evas_Real a; 27 Evas_Real a;
16} Evas_Color; 28};
17 29
18typedef struct _Evas_Vec2 30struct _Evas_Vec2
19{ 31{
20 Evas_Real x; 32 Evas_Real x;
21 Evas_Real y; 33 Evas_Real y;
22} Evas_Vec2; 34};
23 35
24typedef struct _Evas_Vec3 36struct _Evas_Vec3
25{ 37{
26 Evas_Real x; 38 Evas_Real x;
27 Evas_Real y; 39 Evas_Real y;
28 Evas_Real z; 40 Evas_Real z;
29} Evas_Vec3; 41};
30 42
31typedef struct _Evas_Vec4 43struct _Evas_Vec4
32{ 44{
33 Evas_Real x; 45 Evas_Real x;
34 Evas_Real y; 46 Evas_Real y;
35 Evas_Real z; 47 Evas_Real z;
36 Evas_Real w; 48 Evas_Real w;
37} Evas_Vec4; 49};
38 50
39typedef struct _Evas_Mat2 51struct _Evas_Mat2
40{ 52{
41 Evas_Real m[4]; 53 Evas_Real m[4];
42 int flags; 54 int flags;
43} Evas_Mat2; 55};
44 56
45typedef struct _Evas_Mat3 57struct _Evas_Mat3
46{ 58{
47 Evas_Real m[9]; 59 Evas_Real m[9];
48 int flags; 60 int flags;
49} Evas_Mat3; 61};
50 62
51typedef struct _Evas_Mat4 63struct _Evas_Mat4
52{ 64{
53 Evas_Real m[16]; 65 Evas_Real m[16];
54 int flags; 66 int flags;
55} Evas_Mat4; 67};
56 68
57typedef struct _Evas_Box2 69struct _Evas_Box2
58{ 70{
59 Evas_Vec2 p0; 71 Evas_Vec2 p0;
60 Evas_Vec2 p1; 72 Evas_Vec2 p1;
61} Evas_Box2; 73};
62 74
63typedef struct _Evas_Box3 75struct _Evas_Box3
64{ 76{
65 Evas_Vec3 p0; 77 Evas_Vec3 p0;
66 Evas_Vec3 p1; 78 Evas_Vec3 p1;
67} Evas_Box3; 79};
68 80
69typedef struct _Evas_Triangle3 81struct _Evas_Triangle3
70{ 82{
71 Evas_Vec3 p0; 83 Evas_Vec3 p0;
72 Evas_Vec3 p1; 84 Evas_Vec3 p1;
73 Evas_Vec3 p2; 85 Evas_Vec3 p2;
74} Evas_Triangle3; 86};
75 87
76typedef struct _Evas_Ray3 88struct _Evas_Ray3
77{ 89{
78 Evas_Vec3 org; 90 Evas_Vec3 org;
79 Evas_Vec3 dir; 91 Evas_Vec3 dir;
80} Evas_Ray3; 92};
81 93
82/* 2D vector */ 94/* 2D vector */
83static inline void 95static inline void
@@ -1487,6 +1499,8 @@ evas_ray3_init(Evas_Ray3 *ray, Evas_Real x, Evas_Real y, const Evas_Mat4 *mvp)
1487 Evas_Mat4 mat; 1499 Evas_Mat4 mat;
1488 Evas_Vec4 near, far; 1500 Evas_Vec4 near, far;
1489 1501
1502 memset(&mat, 0, sizeof (mat));
1503
1490 /* Get the matrix which transforms from normalized device coordinate to 1504 /* Get the matrix which transforms from normalized device coordinate to
1491 modeling coodrinate. */ 1505 modeling coodrinate. */
1492 evas_mat4_inverse(&mat, mvp); 1506 evas_mat4_inverse(&mat, mvp);