#ifndef _EVAS_3D_MESH_EO_H_
#define _EVAS_3D_MESH_EO_H_

/**

 */
#define EVAS_3D_MESH_CLASS evas_3d_mesh_class_get()

const Eo_Class *evas_3d_mesh_class_get(void) EINA_CONST;

/**
 * @def evas_3d_mesh_shade_mode_set
 *
 * No description supplied.
 *
 * @param[in] mode The shade mode.
 *
 */
EAPI void  evas_3d_mesh_shade_mode_set(Evas_3D_Shade_Mode mode);

/**
 * @def evas_3d_mesh_shade_mode_get
 *
 * No description supplied.
 *
 *
 */
EAPI Evas_3D_Shade_Mode  evas_3d_mesh_shade_mode_get(void);

/**
 * @def evas_3d_mesh_frame_material_set
 *
 * No description supplied.
 *
 * @param[in] frame The number of the key frame.
 * @param[in] material The material to be set to the key frame.
 *
 */
EAPI void  evas_3d_mesh_frame_material_set(int frame, Evas_3D_Material *material);

/**
 * @def evas_3d_mesh_frame_material_get
 *
 * No description supplied.
 *
 * @param[in] frame The number of the key frame.
 *
 */
EAPI Evas_3D_Material * evas_3d_mesh_frame_material_get(int frame);

/**
 * @def evas_3d_mesh_vertex_assembly_set
 *
 * No description supplied.
 *
 * @param[in] assembly Vertex assembly.
 *
 */
EAPI void  evas_3d_mesh_vertex_assembly_set(Evas_3D_Vertex_Assembly assembly);

/**
 * @def evas_3d_mesh_vertex_assembly_get
 *
 * No description supplied.
 *
 *
 */
EAPI Evas_3D_Vertex_Assembly  evas_3d_mesh_vertex_assembly_get(void);

/**
 * @def evas_3d_mesh_file_set
 *
 * No description supplied.
 *
 * @param[in] type The type of the mesh file.
 * @param[in] file Path to the mesh file.
 * @param[in] key Key in the mesh file.
 *
 */
EAPI void  evas_3d_mesh_file_set(Evas_3D_Mesh_File_Type type, const char *file, const char *key);

/**
 * @def evas_3d_mesh_frame_vertex_data_set
 *
 * Set the vertex data of the key frame of the given mesh.
 *
 * This function make evas read from the given buffer whenever it requires.
 * If you want to release the buffer after calling this functions, use
 * evas_3d_mesh_frame_vertex_data_copy_set() instead.
 *
 * After setting the vertex data, further modifications should be protected
 * by map/unmap pair.
 *
 * @see evas_3d_mesh_frame_vertex_data_copy_set()
 * @see evas_3d_mesh_frame_vertex_data_map()
 * @see evas_3d_mesh_frame_vertex_data_unmap()
 *
 * @ingroup Evas_3D_Mesh
 * 
 *
 * @param[in] frame The number of the key frame.
 * @param[in] attrib Vertex attribute ID.
 * @param[in] stride Stride to go to the next vertex (in bytes).
 * @param[in] data Pointer to the vertex data buffer.
 *
 */
EAPI void  evas_3d_mesh_frame_vertex_data_set(int frame, Evas_3D_Vertex_Attrib attrib, int stride, const void *data);

/**
 * @def evas_3d_mesh_frame_vertex_data_copy_set
 *
 * Set the vertex data of the key frame of the given mesh by copying from a buffer.
 * This function allocates internal vertex buffer and copy from the given
 * buffer. So you can release the buffer. If you want to modify the vertex data
 * use evas_3d_mesh_frame_vertex_data_map(). After finishing the modifications,
 * you should call evas_3d_mesh_frame_vertex_data_unmap().
 *
 * @see evas_3d_mesh_frame_vertex_data_set()
 * @see evas_3d_mesh_frame_vertex_data_map()
 * @see evas_3d_mesh_frame_vertex_data_unmap()
 *
 * @ingroup Evas_3D_Mesh
 * 
 *
 * @param[in] frame The number of the key frame.
 * @param[in] attrib Vertex attribute ID.
 * @param[in] stride Stride to go to the next vertex (in bytes).
 * @param[in] data Pointer to the vertex data buffer.
 *
 */
EAPI void  evas_3d_mesh_frame_vertex_data_copy_set(int frame, Evas_3D_Vertex_Attrib attrib, int stride, const void *data);

/**
 * @def evas_3d_mesh_frame_vertex_data_map
 *
 * Map the vertex buffer of the key frame of the given mesh.
 *
 * After manipulating the mapped buffer, evas_3d_mesh_frame_vertex_data_unmap()
 * should be called to properly download the data to the engine. If the data
 * was set using evas_3d_mesh_frame_vertex_data_set(), pointer to the original
 * buffer will be returned. Otherwise, the returned pointer can differ every
 * time calling this function.
 *
 * @see evas_3d_mesh_frame_vertex_data_unmap()
 * @return Starting address of the mapped vertex buffer.
 *
 * @ingroup Evas_3D_Mesh
 * 
 *
 * @param[in] frame The number of the key frame.
 * @param[in] attrib Vertex attribute ID.
 *
 */
EAPI void * evas_3d_mesh_frame_vertex_data_map(int frame, Evas_3D_Vertex_Attrib attrib);

/**
 * @def evas_3d_mesh_frame_vertex_data_unmap
 *
 * No description supplied.
 *
 * @param[in] frame The number of the key frame.
 * @param[in] attrib Vertex attribute ID.
 *
 */
EAPI void  evas_3d_mesh_frame_vertex_data_unmap(int frame, Evas_3D_Vertex_Attrib attrib);

/**
 * @def evas_3d_mesh_frame_vertex_stride_get
 *
 * No description supplied.
 *
 * @param[in] frame The number of the key frame.
 * @param[in] attrib Vertex attribute ID.
 *
 */
EAPI int  evas_3d_mesh_frame_vertex_stride_get(int frame, Evas_3D_Vertex_Attrib attrib);

/**
 * @def evas_3d_mesh_index_data_set
 *
 * No description supplied.
 *
 * @param[in] format Vertex index data format.
 * @param[in] count Vertex index count.
 * @param[in] indices Pointer to the index data.
 *
 */
EAPI void  evas_3d_mesh_index_data_set(Evas_3D_Index_Format format, int count, const void *indices);

/**
 * @def evas_3d_mesh_index_data_copy_set
 *
 * No description supplied.
 *
 * @param[in] format Vertex index data format.
 * @param[in] count Vertex index count.
 * @param[in] indices Pointer to the index data.
 *
 */
EAPI void  evas_3d_mesh_index_data_copy_set(Evas_3D_Index_Format format, int count, const void *indices);

/**
 * @def evas_3d_mesh_index_format_get
 *
 * No description supplied.
 *
 *
 */
EAPI Evas_3D_Index_Format  evas_3d_mesh_index_format_get(void);

/**
 * @def evas_3d_mesh_index_count_get
 *
 * No description supplied.
 *
 *
 */
EAPI int  evas_3d_mesh_index_count_get(void);

/**
 * @def evas_3d_mesh_index_data_map
 *
 * No description supplied.
 *
 *
 */
EAPI void * evas_3d_mesh_index_data_map(void);

/**
 * @def evas_3d_mesh_index_data_unmap
 *
 * No description supplied.
 *
 *
 */
EAPI void  evas_3d_mesh_index_data_unmap(void);

/**
 * @def evas_3d_mesh_frame_add
 *
 * No description supplied.
 *
 * @param[in] frame The number of the key frame to be added.
 *
 */
EAPI void  evas_3d_mesh_frame_add(int frame);

/**
 * @def evas_3d_mesh_frame_del
 *
 * No description supplied.
 *
 * @param[in] frame The number of the key frame to be added.
 *
 */
EAPI void  evas_3d_mesh_frame_del(int frame);

/**
 * @def evas_3d_mesh_vertex_count_set
 *
 * Set the vertex count of the given mesh.
 *
 * Each key frame should have same vertex count to be properly interpolated.
 * Key frames have their own vertex data and the data should have more vertices
 * than the mesh's vertex count.
 *
 * Default vertex count is 0.
 *
 * @ingroup Evas_3D_Mesh
 * 
 *
 * @param[in] count Vertex count.
 *
 */
EAPI void  evas_3d_mesh_vertex_count_set(unsigned int count);

/**
 * @def evas_3d_mesh_vertex_count_get
 *
 * Get the vertex count of the given mesh.
 *
 * @see evas_3d_mesh_vertex_count_set()
 *
 * @ingroup Evas_3D_Mesh
 * 
 *
 *
 */
EAPI int  evas_3d_mesh_vertex_count_get(void);


#endif