\begin{DoxySince}{Since}
1.\+10
\end{DoxySince}
\hypertarget{evil_main_toc}{}\doxysection{Table of Contents}\label{evil_main_toc}
\begin{DoxyItemize}
\item \mbox{\hyperlink{evas_canvas3d_main_evas_canvas3d_intro}{Introduction}} \item \mbox{\hyperlink{evas_canvas3d_main_evas_canvas3d_example}{Introductory Example}}\end{DoxyItemize}
\hypertarget{evas_canvas3d_main_evas_canvas3d_intro}{}\doxysection{Introduction}\label{evas_canvas3d_main_evas_canvas3d_intro}
Evas 3D is an extension to support 3D scene graph rendering into 2D Evas canvases, with tree-\/based scene graph manipulation and other typical 3D rendering techniques.

3D objects are used to describe three dimensional scenes and to provide interfaces to connect the scene to an Evas image object for rendering.

Scenes are constructed by locating cameras and lights and selecting desired meshes, and organizing Node objects into hierarchical n-\/ary tree data structures. The scene is stacked on the canvas with existing Evas objects, which permits intermingling 3D rendered content in existing 2D application layouts.

Rendering techniques supported by Evas 3D include flat and phong shading, normal and texture mapping, and triangle meshes. Existing Evas objects may also be used as textures inside the 3D scene, including E\+FL widgets and even application windows. This latter capability makes it possible to create a 3D version of an arbitrary E\+FL application with minimal code changes.\hypertarget{evas_canvas3d_main_evas_canvas3d_example}{}\doxysection{Introductory Example}\label{evas_canvas3d_main_evas_canvas3d_example}

\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#ifdef HAVE\_CONFIG\_H}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include "config.h"}}
\DoxyCodeLine{\textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define EFL\_BETA\_API\_SUPPORT}}
\DoxyCodeLine{\textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <Eo.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <Evas.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <Ecore.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <\mbox{\hyperlink{Ecore__Evas_8h}{Ecore\_Evas.h}}>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#define  WIDTH          400}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define  HEIGHT         400}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{typedef} \textcolor{keyword}{struct }\_Scene\_Data}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo}} *scene;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo}} *root\_node;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo}} *camera\_node;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo}} *light\_node;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo}} *mesh\_node;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo}} *camera;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo}} *light;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo}} *mesh;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo}} *material;}
\DoxyCodeLine{\} Scene\_Data;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} Ecore\_Evas *ecore\_evas = NULL;}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} *evas = NULL;}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo}} *background = NULL;}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo}} *image = NULL;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{float} cube\_vertices[] =}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{comment}{/* Front */}}
\DoxyCodeLine{   -\/1.0,  1.0,  1.0,     0.0,  0.0,  1.0,     1.0, 0.0, 0.0, 1.0,     0.0,  1.0,}
\DoxyCodeLine{    1.0,  1.0,  1.0,     0.0,  0.0,  1.0,     1.0, 0.0, 0.0, 1.0,     1.0,  1.0,}
\DoxyCodeLine{   -\/1.0, -\/1.0,  1.0,     0.0,  0.0,  1.0,     1.0, 0.0, 0.0, 1.0,     0.0,  0.0,}
\DoxyCodeLine{    1.0, -\/1.0,  1.0,     0.0,  0.0,  1.0,     1.0, 0.0, 0.0, 1.0,     1.0,  0.0,}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* Back */}}
\DoxyCodeLine{    1.0,  1.0, -\/1.0,     0.0,  0.0, -\/1.0,     0.0, 0.0, 1.0, 1.0,     0.0,  1.0,}
\DoxyCodeLine{   -\/1.0,  1.0, -\/1.0,     0.0,  0.0, -\/1.0,     0.0, 0.0, 1.0, 1.0,     1.0,  1.0,}
\DoxyCodeLine{    1.0, -\/1.0, -\/1.0,     0.0,  0.0, -\/1.0,     0.0, 0.0, 1.0, 1.0,     0.0,  0.0,}
\DoxyCodeLine{   -\/1.0, -\/1.0, -\/1.0,     0.0,  0.0, -\/1.0,     0.0, 0.0, 1.0, 1.0,     1.0,  0.0,}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* Left */}}
\DoxyCodeLine{   -\/1.0,  1.0, -\/1.0,    -\/1.0,  0.0,  0.0,     0.0, 1.0, 0.0, 1.0,     0.0,  1.0,}
\DoxyCodeLine{   -\/1.0,  1.0,  1.0,    -\/1.0,  0.0,  0.0,     0.0, 1.0, 0.0, 1.0,     1.0,  1.0,}
\DoxyCodeLine{   -\/1.0, -\/1.0, -\/1.0,    -\/1.0,  0.0,  0.0,     0.0, 1.0, 0.0, 1.0,     0.0,  0.0,}
\DoxyCodeLine{   -\/1.0, -\/1.0,  1.0,    -\/1.0,  0.0,  0.0,     0.0, 1.0, 0.0, 1.0,     1.0,  0.0,}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* Right */}}
\DoxyCodeLine{    1.0,  1.0,  1.0,     1.0,  0.0,  0.0,     1.0, 1.0, 0.0, 1.0,     0.0,  1.0,}
\DoxyCodeLine{    1.0,  1.0, -\/1.0,     1.0,  0.0,  0.0,     1.0, 1.0, 0.0, 1.0,     1.0,  1.0,}
\DoxyCodeLine{    1.0, -\/1.0,  1.0,     1.0,  0.0,  0.0,     1.0, 1.0, 0.0, 1.0,     0.0,  0.0,}
\DoxyCodeLine{    1.0, -\/1.0, -\/1.0,     1.0,  0.0,  0.0,     1.0, 1.0, 0.0, 1.0,     1.0,  0.0,}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* Top */}}
\DoxyCodeLine{   -\/1.0,  1.0, -\/1.0,     0.0,  1.0,  0.0,     1.0, 0.0, 1.0, 1.0,     0.0,  1.0,}
\DoxyCodeLine{    1.0,  1.0, -\/1.0,     0.0,  1.0,  0.0,     1.0, 0.0, 1.0, 1.0,     1.0,  1.0,}
\DoxyCodeLine{   -\/1.0,  1.0,  1.0,     0.0,  1.0,  0.0,     1.0, 0.0, 1.0, 1.0,     0.0,  0.0,}
\DoxyCodeLine{    1.0,  1.0,  1.0,     0.0,  1.0,  0.0,     1.0, 0.0, 1.0, 1.0,     1.0,  0.0,}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* Bottom */}}
\DoxyCodeLine{    1.0, -\/1.0, -\/1.0,     0.0, -\/1.0,  0.0,     0.0, 1.0, 1.0, 1.0,     0.0,  1.0,}
\DoxyCodeLine{   -\/1.0, -\/1.0, -\/1.0,     0.0, -\/1.0,  0.0,     0.0, 1.0, 1.0, 1.0,     1.0,  1.0,}
\DoxyCodeLine{    1.0, -\/1.0,  1.0,     0.0, -\/1.0,  0.0,     0.0, 1.0, 1.0, 1.0,     0.0,  0.0,}
\DoxyCodeLine{   -\/1.0, -\/1.0,  1.0,     0.0, -\/1.0,  0.0,     0.0, 1.0, 1.0, 1.0,     1.0,  0.0,}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} cube\_indices[] =}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{comment}{/* Front */}}
\DoxyCodeLine{   0,   1,  2,  2,  1,  3,}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* Back */}}
\DoxyCodeLine{   4,   5,  6,  6,  5,  7,}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* Left */}}
\DoxyCodeLine{   8,   9, 10, 10,  9, 11,}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* Right */}}
\DoxyCodeLine{   12, 13, 14, 14, 13, 15,}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* Top */}}
\DoxyCodeLine{   16, 17, 18, 18, 17, 19,}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* Bottom */}}
\DoxyCodeLine{   20, 21, 22, 22, 21, 23}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_on\_delete(Ecore\_Evas *ee \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_on\_canvas\_resize(Ecore\_Evas *ee)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keywordtype}{int} w, h;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_ga931aadf4603731e73e8a84e4b14f1493}{ecore\_evas\_geometry\_get}}(ee, NULL, NULL, \&w, \&h);}
\DoxyCodeLine{   efl\_gfx\_entity\_size\_set(background, EINA\_SIZE2D(w,  h));}
\DoxyCodeLine{   efl\_gfx\_entity\_size\_set(image, EINA\_SIZE2D(w,  h));}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{\_animate\_scene(\textcolor{keywordtype}{void} *data)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keyword}{static} \textcolor{keywordtype}{float} angle = 0.0f;}
\DoxyCodeLine{   Scene\_Data *scene = (Scene\_Data *)data;}
\DoxyCodeLine{}
\DoxyCodeLine{   angle += 0.5;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Node_ga3f85075551014b524acd2898e9651397}{evas\_canvas3d\_node\_orientation\_angle\_axis\_set}}(scene-\/>mesh\_node, angle, 1.0, 1.0, 1.0);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* Rotate */}}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (angle > 360.0) angle -\/= 360.0f;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_camera\_setup(Scene\_Data *data)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   data-\/>camera = \mbox{\hyperlink{group__Eo_ga663b4b6d84c39cd08874af5094d96d67}{efl\_add}}(\mbox{\hyperlink{group__Evas__Canvas3D__Camera_ga57d64b3de4d49bc68087ee3565ac8566}{EVAS\_CANVAS3D\_CAMERA\_CLASS}}, evas);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Camera_ga5027c6be4dc48861aa4d44b0e1c8eb76}{evas\_canvas3d\_camera\_projection\_perspective\_set}}(data-\/>camera, 60.0, 1.0, 2.0, 50.0);}
\DoxyCodeLine{}
\DoxyCodeLine{   data-\/>camera\_node =}
\DoxyCodeLine{      \mbox{\hyperlink{group__Eo_ga663b4b6d84c39cd08874af5094d96d67}{efl\_add}}(\mbox{\hyperlink{group__Evas__Canvas3D__Node_gae5f300acebcf1cd3d2c1120814bb53fa}{EVAS\_CANVAS3D\_NODE\_CLASS}}, evas, \mbox{\hyperlink{group__Evas__Canvas3D__Node_ga8f87399e2324ebe47f7e0546e2937014}{evas\_canvas3d\_node\_type\_set}}(efl\_added, EVAS\_CANVAS3D\_NODE\_TYPE\_CAMERA));}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Node_gada82d511931d224183241f6573aeb016}{evas\_canvas3d\_node\_camera\_set}}(data-\/>camera\_node, data-\/>camera);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Node_ga34226725e6f77397123da2fd927f8dca}{evas\_canvas3d\_node\_position\_set}}(data-\/>camera\_node, 0.0, 0.0, 10.0);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Node_ga8ae46000ed15a96a2b1fb6c8001cc890}{evas\_canvas3d\_node\_look\_at\_set}}(data-\/>camera\_node, EVAS\_CANVAS3D\_SPACE\_PARENT, 0.0, 0.0, 0.0, EVAS\_CANVAS3D\_SPACE\_PARENT, 0.0, 1.0, 0.0);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Node_gafe4b1558adbb99add423014a33f66a42}{evas\_canvas3d\_node\_member\_add}}(data-\/>root\_node, data-\/>camera\_node);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_light\_setup(Scene\_Data *data)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   data-\/>light = \mbox{\hyperlink{group__Eo_ga663b4b6d84c39cd08874af5094d96d67}{efl\_add}}(\mbox{\hyperlink{group__Evas__Canvas3D__Light_ga468e6f0bfe72f83393011963268208e0}{EVAS\_CANVAS3D\_LIGHT\_CLASS}}, evas);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Light_gaba32530c3f4a03ad3db6b4d83c893e4e}{evas\_canvas3d\_light\_ambient\_set}}(data-\/>light, 0.2, 0.2, 0.2, 1.0);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Light_ga33fd09219eec857754f3c7a0a3116665}{evas\_canvas3d\_light\_diffuse\_set}}(data-\/>light, 1.0, 1.0, 1.0, 1.0);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Light_gab8ac412e68c33037dd8f07345a67f8dc}{evas\_canvas3d\_light\_specular\_set}}(data-\/>light, 1.0, 1.0, 1.0, 1.0);}
\DoxyCodeLine{}
\DoxyCodeLine{   data-\/>light\_node =}
\DoxyCodeLine{      \mbox{\hyperlink{group__Eo_ga663b4b6d84c39cd08874af5094d96d67}{efl\_add}}(\mbox{\hyperlink{group__Evas__Canvas3D__Node_gae5f300acebcf1cd3d2c1120814bb53fa}{EVAS\_CANVAS3D\_NODE\_CLASS}}, evas, \mbox{\hyperlink{group__Evas__Canvas3D__Node_ga8f87399e2324ebe47f7e0546e2937014}{evas\_canvas3d\_node\_type\_set}}(efl\_added, EVAS\_CANVAS3D\_NODE\_TYPE\_LIGHT));}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Node_ga7084e99ee4ddc80564cc5038f381d70a}{evas\_canvas3d\_node\_light\_set}}(data-\/>light\_node, data-\/>light);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Node_ga34226725e6f77397123da2fd927f8dca}{evas\_canvas3d\_node\_position\_set}}(data-\/>light\_node, 0.0, 0.0, 10.0);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Node_ga8ae46000ed15a96a2b1fb6c8001cc890}{evas\_canvas3d\_node\_look\_at\_set}}(data-\/>light\_node, EVAS\_CANVAS3D\_SPACE\_PARENT, 0.0, 0.0, 0.0, EVAS\_CANVAS3D\_SPACE\_PARENT, 0.0, 1.0, 0.0);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Node_gafe4b1558adbb99add423014a33f66a42}{evas\_canvas3d\_node\_member\_add}}(data-\/>root\_node, data-\/>light\_node);}
\DoxyCodeLine{\}}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_mesh\_setup(Scene\_Data *data)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{comment}{/* Setup material. */}}
\DoxyCodeLine{   data-\/>material = \mbox{\hyperlink{group__Eo_ga663b4b6d84c39cd08874af5094d96d67}{efl\_add}}(\mbox{\hyperlink{group__Evas__Canvas3D__Material_ga6b8b7350133efb20e3bb2e96b3a55db6}{EVAS\_CANVAS3D\_MATERIAL\_CLASS}}, evas);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Material_ga2e7d668fb9dbba6aabb06294cbece424}{evas\_canvas3d\_material\_enable\_set}}(data-\/>material, EVAS\_CANVAS3D\_MATERIAL\_ATTRIB\_AMBIENT, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Material_ga2e7d668fb9dbba6aabb06294cbece424}{evas\_canvas3d\_material\_enable\_set}}(data-\/>material, EVAS\_CANVAS3D\_MATERIAL\_ATTRIB\_DIFFUSE, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Material_ga2e7d668fb9dbba6aabb06294cbece424}{evas\_canvas3d\_material\_enable\_set}}(data-\/>material, EVAS\_CANVAS3D\_MATERIAL\_ATTRIB\_SPECULAR, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Material_ga5ced565c2c89331cea8cf707b435177a}{evas\_canvas3d\_material\_color\_set}}(data-\/>material, EVAS\_CANVAS3D\_MATERIAL\_ATTRIB\_AMBIENT, 0.2, 0.2, 0.2, 1.0);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Material_ga5ced565c2c89331cea8cf707b435177a}{evas\_canvas3d\_material\_color\_set}}(data-\/>material, EVAS\_CANVAS3D\_MATERIAL\_ATTRIB\_DIFFUSE, 0.8, 0.8, 0.8, 1.0);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Material_ga5ced565c2c89331cea8cf707b435177a}{evas\_canvas3d\_material\_color\_set}}(data-\/>material, EVAS\_CANVAS3D\_MATERIAL\_ATTRIB\_SPECULAR, 1.0, 1.0, 1.0, 1.0);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Material_ga677ab1157d7068a15f885976988a5357}{evas\_canvas3d\_material\_shininess\_set}}(data-\/>material, 100.0);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* Setup mesh. */}}
\DoxyCodeLine{   data-\/>mesh = \mbox{\hyperlink{group__Eo_ga663b4b6d84c39cd08874af5094d96d67}{efl\_add}}(\mbox{\hyperlink{group__Evas__Canvas3D__Mesh_gac53ede501cedbac0d201e3811c22df2a}{EVAS\_CANVAS3D\_MESH\_CLASS}}, evas);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Mesh_gaa9003ece67c1b894a120bb4fce31f853}{evas\_canvas3d\_mesh\_vertex\_count\_set}}(data-\/>mesh, 24);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Mesh_ga14c55769f8923769e496be2635d7bb8c}{evas\_canvas3d\_mesh\_frame\_add}}(data-\/>mesh, 0);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Mesh_gaf9c98c1519090bebf45db043a901c103}{evas\_canvas3d\_mesh\_frame\_vertex\_data\_set}}(data-\/>mesh, 0, EVAS\_CANVAS3D\_VERTEX\_ATTRIB\_POSITION, 12 * \textcolor{keyword}{sizeof}(\textcolor{keywordtype}{float}), \&cube\_vertices[ 0]);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Mesh_gaf9c98c1519090bebf45db043a901c103}{evas\_canvas3d\_mesh\_frame\_vertex\_data\_set}}(data-\/>mesh, 0, EVAS\_CANVAS3D\_VERTEX\_ATTRIB\_NORMAL, 12 * \textcolor{keyword}{sizeof}(\textcolor{keywordtype}{float}), \&cube\_vertices[ 3]);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Mesh_gaf9c98c1519090bebf45db043a901c103}{evas\_canvas3d\_mesh\_frame\_vertex\_data\_set}}(data-\/>mesh, 0, EVAS\_CANVAS3D\_VERTEX\_ATTRIB\_COLOR, 12 * \textcolor{keyword}{sizeof}(\textcolor{keywordtype}{float}), \&cube\_vertices[ 6]);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Mesh_gaf9c98c1519090bebf45db043a901c103}{evas\_canvas3d\_mesh\_frame\_vertex\_data\_set}}(data-\/>mesh, 0, EVAS\_CANVAS3D\_VERTEX\_ATTRIB\_TEXCOORD, 12 * \textcolor{keyword}{sizeof}(\textcolor{keywordtype}{float}), \&cube\_vertices[10]);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Mesh_ga72517810ec5bb87fdb14968bc8719b00}{evas\_canvas3d\_mesh\_index\_data\_set}}(data-\/>mesh, EVAS\_CANVAS3D\_INDEX\_FORMAT\_UNSIGNED\_SHORT, 36, \&cube\_indices[0]);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Mesh_gabd3e82c79b161dc35f417f9819e59002}{evas\_canvas3d\_mesh\_vertex\_assembly\_set}}(data-\/>mesh, EVAS\_CANVAS3D\_VERTEX\_ASSEMBLY\_TRIANGLES);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Mesh_ga26638a558bddc06da4fcfa0437393f59}{evas\_canvas3d\_mesh\_shader\_mode\_set}}(data-\/>mesh, EVAS\_CANVAS3D\_SHADER\_MODE\_PHONG);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Mesh_ga00cec1f7c3a757540f0b4dee377fd2f7}{evas\_canvas3d\_mesh\_frame\_material\_set}}(data-\/>mesh, 0, data-\/>material);}
\DoxyCodeLine{}
\DoxyCodeLine{   data-\/>mesh\_node =}
\DoxyCodeLine{      \mbox{\hyperlink{group__Eo_ga663b4b6d84c39cd08874af5094d96d67}{efl\_add}}(\mbox{\hyperlink{group__Evas__Canvas3D__Node_gae5f300acebcf1cd3d2c1120814bb53fa}{EVAS\_CANVAS3D\_NODE\_CLASS}}, evas, \mbox{\hyperlink{group__Evas__Canvas3D__Node_ga8f87399e2324ebe47f7e0546e2937014}{evas\_canvas3d\_node\_type\_set}}(efl\_added, EVAS\_CANVAS3D\_NODE\_TYPE\_MESH));}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Node_gafe4b1558adbb99add423014a33f66a42}{evas\_canvas3d\_node\_member\_add}}(data-\/>root\_node, data-\/>mesh\_node);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Node_ga1c590f8577ced65a875cbbbee494e375}{evas\_canvas3d\_node\_mesh\_add}}(data-\/>mesh\_node, data-\/>mesh);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_scene\_setup(Scene\_Data *data)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   data-\/>scene = \mbox{\hyperlink{group__Eo_ga663b4b6d84c39cd08874af5094d96d67}{efl\_add}}(\mbox{\hyperlink{group__Evas__Canvas3D__Scene_gab849c0ff5be904ac77e201f3d6b5db0c}{EVAS\_CANVAS3D\_SCENE\_CLASS}}, evas);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Scene_gae15d6ae4c998ee2948c327524e4583a9}{evas\_canvas3d\_scene\_size\_set}}(data-\/>scene, WIDTH, HEIGHT);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Scene_ga739849c2bcc4456736155d906a1d9300}{evas\_canvas3d\_scene\_background\_color\_set}}(data-\/>scene, 0.0, 0.0, 0.0, 0.0);}
\DoxyCodeLine{}
\DoxyCodeLine{   data-\/>root\_node =}
\DoxyCodeLine{      \mbox{\hyperlink{group__Eo_ga663b4b6d84c39cd08874af5094d96d67}{efl\_add}}(\mbox{\hyperlink{group__Evas__Canvas3D__Node_gae5f300acebcf1cd3d2c1120814bb53fa}{EVAS\_CANVAS3D\_NODE\_CLASS}}, evas, \mbox{\hyperlink{group__Evas__Canvas3D__Node_ga8f87399e2324ebe47f7e0546e2937014}{evas\_canvas3d\_node\_type\_set}}(efl\_added, EVAS\_CANVAS3D\_NODE\_TYPE\_NODE));}
\DoxyCodeLine{}
\DoxyCodeLine{   \_camera\_setup(data);}
\DoxyCodeLine{   \_light\_setup(data);}
\DoxyCodeLine{   \_mesh\_setup(data);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Scene_ga1bf3ce3e21e478974e30a88133f47c3d}{evas\_canvas3d\_scene\_root\_node\_set}}(data-\/>scene, data-\/>root\_node);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas3D__Scene_ga137e26bf40efe75b24197091d888c874}{evas\_canvas3d\_scene\_camera\_node\_set}}(data-\/>scene, data-\/>camera\_node);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int}}
\DoxyCodeLine{main(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{comment}{// Unless Evas 3D supports Software renderer, we force use of the gl backend.}}
\DoxyCodeLine{   putenv(\textcolor{stringliteral}{"ECORE\_EVAS\_ENGINE=opengl\_x11"});}
\DoxyCodeLine{}
\DoxyCodeLine{   Scene\_Data data;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Ecore__Evas__Group_ga32ddbb6457033ad435a177eb0c4fe235}{ecore\_evas\_init}}()) \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{}
\DoxyCodeLine{   ecore\_evas = \mbox{\hyperlink{group__Ecore__Evas__Group_gac7f2cdbcb79635c34317c1183dd04cb0}{ecore\_evas\_new}}(NULL, 10, 10, WIDTH, HEIGHT, NULL);}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!ecore\_evas) \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_ga3d478e975e2101b9b821ef24baf3dd9e}{ecore\_evas\_callback\_delete\_request\_set}}(ecore\_evas, \_on\_delete);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_gaac67f679c9027059a34519fbdea360df}{ecore\_evas\_callback\_resize\_set}}(ecore\_evas, \_on\_canvas\_resize);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_ga4953047ff97d4f1b0d75a7d513d4f317}{ecore\_evas\_show}}(ecore\_evas);}
\DoxyCodeLine{}
\DoxyCodeLine{   evas = \mbox{\hyperlink{group__Ecore__Evas__Group_ga75a7cc694b6069e78df47dab0b0f2d20}{ecore\_evas\_get}}(ecore\_evas);}
\DoxyCodeLine{}
\DoxyCodeLine{   \_scene\_setup(\&data);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* Add a background rectangle object. */}}
\DoxyCodeLine{   background = \mbox{\hyperlink{group__Eo_ga663b4b6d84c39cd08874af5094d96d67}{efl\_add}}(EFL\_CANVAS\_RECTANGLE\_CLASS, evas);}
\DoxyCodeLine{   efl\_gfx\_color\_set(background, 0, 0, 0, 255);}
\DoxyCodeLine{   efl\_gfx\_entity\_size\_set(background, EINA\_SIZE2D(WIDTH,  HEIGHT));}
\DoxyCodeLine{   efl\_gfx\_entity\_visible\_set(background, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* Add an image object for 3D scene rendering. */}}
\DoxyCodeLine{   image = \mbox{\hyperlink{group__Eo_ga663b4b6d84c39cd08874af5094d96d67}{efl\_add}}(EFL\_CANVAS\_SCENE3D\_CLASS, evas);}
\DoxyCodeLine{   efl\_gfx\_entity\_size\_set(image, EINA\_SIZE2D(WIDTH,  HEIGHT));}
\DoxyCodeLine{   efl\_gfx\_entity\_visible\_set(image, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* Set the image object as render target for 3D scene. */}}
\DoxyCodeLine{   efl\_canvas\_scene3d\_set(image, data.scene);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* Add animation timer callback. */}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Timer__Group_ga7b9cb9d24ecebfdbb957436e2e669402}{ecore\_timer\_add}}(0.016, \_animate\_scene, \&data);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* Enter main loop. */}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}}();}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_gad3ec61f2aa03df4d3dbfd0d311e0c8dc}{ecore\_evas\_free}}(ecore\_evas);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}}();}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\}}
\end{DoxyCodeInclude}
 