summaryrefslogtreecommitdiff
path: root/src/lib/evas/include/evas_private.h
diff options
context:
space:
mode:
authorBogdan Devichev <b.devichev@samsung.com>2015-05-26 18:49:15 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-05-27 00:31:07 +0200
commit6dac83e643934573a734491d97b549a6b235c0f5 (patch)
treea5272df551b3c77107e79910cb0f9bde2f8ca6cc /src/lib/evas/include/evas_private.h
parentabc1eabecb6da1bf77b530132814a2427bfb44fb (diff)
evas: add API for creation Evas_3D node primitives.
Summary: Now mechanism of creation of primitives is similar to model loading. Reviewers: Oleksander, Hermet, raster, cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2516 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to '')
-rw-r--r--src/lib/evas/include/evas_private.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index 7d9303c802..e7c8d02a5d 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -100,6 +100,7 @@ typedef struct _Evas_3D_Camera Evas_3D_Camera_Data;
100typedef struct _Evas_3D_Light Evas_3D_Light_Data; 100typedef struct _Evas_3D_Light Evas_3D_Light_Data;
101typedef struct _Evas_3D_Material Evas_3D_Material_Data; 101typedef struct _Evas_3D_Material Evas_3D_Material_Data;
102typedef struct _Evas_3D_Texture Evas_3D_Texture_Data; 102typedef struct _Evas_3D_Texture Evas_3D_Texture_Data;
103typedef struct _Evas_3D_Primitive Evas_3D_Primitive_Data;
103 104
104/* Structs for mesh eet saver/loader */ 105/* Structs for mesh eet saver/loader */
105typedef struct _Evas_3D_Vec2_Eet Evas_3D_Vec2_Eet; 106typedef struct _Evas_3D_Vec2_Eet Evas_3D_Vec2_Eet;
@@ -415,6 +416,17 @@ struct _Evas_3D_Material
415 Eina_Hash *meshes; 416 Eina_Hash *meshes;
416}; 417};
417 418
419struct _Evas_3D_Primitive
420{
421 Evas_3D_Mesh_Primitive form;
422 Evas_3D_Primitive_Mode mode;
423 Evas_Real ratio;
424 int precision;
425 Evas_3D_Surface_Func *surface;
426
427 Evas_Vec2 tex_scale;
428};
429
418struct _Evas_3D_Scene_Public_Data 430struct _Evas_3D_Scene_Public_Data
419{ 431{
420 Evas_Color bg_color; 432 Evas_Color bg_color;
@@ -1746,6 +1758,17 @@ void evas_model_save_file_eet(Evas_3D_Mesh *mesh, const char *file, Evas_3D_Mesh
1746void evas_model_save_file_obj(Evas_3D_Mesh *mesh, const char *file, Evas_3D_Mesh_Frame *f); 1758void evas_model_save_file_obj(Evas_3D_Mesh *mesh, const char *file, Evas_3D_Mesh_Frame *f);
1747void evas_model_save_file_ply(Evas_3D_Mesh *mesh, const char *file, Evas_3D_Mesh_Frame *f); 1759void evas_model_save_file_ply(Evas_3D_Mesh *mesh, const char *file, Evas_3D_Mesh_Frame *f);
1748 1760
1761/* Primitives functions */
1762void evas_common_set_model_from_primitive(Evas_3D_Mesh *model, int frame, Evas_3D_Primitive_Data *primitive);
1763void evas_model_set_from_square_primitive(Evas_3D_Mesh *mesh, int frame);
1764void evas_model_set_from_cube_primitive(Evas_3D_Mesh *mesh, int frame);
1765void evas_model_set_from_cylinder_primitive(Evas_3D_Mesh *mesh, int frame, Evas_3D_Primitive_Mode mode, int precision, Evas_Vec2 tex_scale);
1766void evas_model_set_from_cone_primitive(Evas_3D_Mesh *mesh, int frame, Evas_3D_Primitive_Mode mode, int precision, Evas_Vec2 tex_scale);
1767void evas_model_set_from_sphere_primitive(Evas_3D_Mesh *mesh, int frame, Evas_3D_Primitive_Mode mode, int precision, Evas_Vec2 tex_scale);
1768void evas_model_set_from_torus_primitive(Evas_3D_Mesh *mesh, int frame, Evas_Real ratio, int precision, Evas_Vec2 tex_scale);
1769void evas_model_set_from_surface_primitive(Evas_3D_Mesh *mesh, int frame, Evas_3D_Surface_Func func, int precision, Evas_Vec2 tex_scale);
1770void evas_model_set_from_terrain_primitive(Evas_3D_Mesh *mesh, int frame, int precision, Evas_Vec2 tex_scale);
1771
1749extern int _evas_alloc_error; 1772extern int _evas_alloc_error;
1750extern int _evas_event_counter; 1773extern int _evas_event_counter;
1751 1774