From 694f9dbcdb279c10a02ccc76230b2fbd4089bbc9 Mon Sep 17 00:00:00 2001 From: "perepelits.m" Date: Thu, 8 Jan 2015 15:21:15 +0900 Subject: [PATCH] [Evas, Edje] Adding of new structures Summary: There will be several methods to set orientation in edc, so we have decided to make one big vector, the main reason is that we use quaternion by default, but look_at, for example, is given as 6 coordinates. Reviewers: Hermet, cedric, raster Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1693 --- src/lib/edje/edje_private.h | 23 +++++++++++++++-------- src/lib/evas/Evas_Eo.h | 22 ++++++++++++++++++++++ 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h index ab50abe..19bc694 100644 --- a/src/lib/edje/edje_private.h +++ b/src/lib/edje/edje_private.h @@ -1347,8 +1347,9 @@ struct _Edje_Part_Description_Spec_Mesh_Node AABB aabb2; struct { - Evas_Real angle; - Edje_3D_Vec axis; + Evas_3D_Node_Orientation_Type type; + FLOAT_T data[6]; + int look_to; /* -1 = whole part collection, or part ID */ } orientation; struct { @@ -1370,10 +1371,13 @@ struct _Edje_Part_Description_Spec_Light Edje_3D_Vec point; unsigned char space; - Edje_3D_Vec look1; - Edje_3D_Vec look2; - int look_to; /* -1 = whole part collection, or part ID */ } position; + + struct { + Evas_3D_Node_Orientation_Type type; + FLOAT_T data[6]; + int look_to; /* -1 = whole part collection, or part ID */ + } orientation; }; struct _Edje_Part_Description_Spec_Camera @@ -1388,10 +1392,13 @@ struct _Edje_Part_Description_Spec_Camera struct { Edje_3D_Vec point; unsigned char space; - Edje_3D_Vec look1; - Edje_3D_Vec look2; - int look_to; /* -1 = whole part collection, or part ID */ } position; + + struct { + Evas_3D_Node_Orientation_Type type; + FLOAT_T data[6]; + int look_to; /* -1 = whole part collection, or part ID */ + } orientation; }; diff --git a/src/lib/evas/Evas_Eo.h b/src/lib/evas/Evas_Eo.h index 5a493e1..088f15f 100644 --- a/src/lib/evas/Evas_Eo.h +++ b/src/lib/evas/Evas_Eo.h @@ -539,6 +539,28 @@ typedef enum _Evas_3D_Node_Type } Evas_3D_Node_Type; /** + * Types of node orientation + * + * @since 1.13 + * @ingroup Evas_3D_Types + */ +typedef enum _Evas_3D_Node_Orientation_Type +{ + /**< Node with no orientation properties */ + EVAS_3D_NODE_ORIENTATION_TYPE_NONE = 0, + /**< Node orientation is given as a point to look at and a vector + that indicates the angle at which the subject is looking at the point */ + EVAS_3D_NODE_ORIENTATION_TYPE_LOOK_AT, + /**< Node orientation is given as id of another part to look at and a vector + that indicates the angle at which the subject is looking at the part */ + EVAS_3D_NODE_ORIENTATION_TYPE_LOOK_TO, + /**< Node orientation is given as an angle and an axis to rotate around */ + EVAS_3D_NODE_ORIENTATION_TYPE_ANGLE_AXIS, + /**< Node orientation is given as a quaternion */ + EVAS_3D_NODE_ORIENTATION_TYPE_QUATERNION, +} Evas_3D_Node_Orientation_Type; + +/** * Vertex attribute IDs * * @since 1.10 -- 2.7.4