A mesh object is a set of information on a visible geometrical object like character model, terrain or other structures and entities. More...
Functions | |
EOAPI void | evas_canvas3d_mesh_shade_mode_set (Evas_Canvas3D_Shade_Mode mode) |
Set the shade mode of the given mesh. More... | |
EOAPI Evas_Canvas3D_Shade_Mode | evas_canvas3d_mesh_shade_mode_get (void) |
Get the shade mode of the given mesh. More... | |
EOAPI void | evas_canvas3d_mesh_color_pick_enable_set (Eina_Bool enabled) |
Set posibility color picking. More... | |
EOAPI Eina_Bool | evas_canvas3d_mesh_color_pick_enable_get (void) |
Get status of color picking of the mesh. More... | |
EOAPI void | evas_canvas3d_mesh_vertex_count_set (unsigned int count) |
Set the vertex count of the given mesh. More... | |
EOAPI unsigned int | evas_canvas3d_mesh_vertex_count_get (void) |
Get the vertex count of the given mesh. More... | |
EOAPI void | evas_canvas3d_mesh_fog_enable_set (Eina_Bool enabled) |
Enable or disable fog effect for given mesh. More... | |
EOAPI Eina_Bool | evas_canvas3d_mesh_fog_enable_get (void) |
Get the enable status of fog effect for given mesh. More... | |
EOAPI void | evas_canvas3d_mesh_alpha_test_enable_set (Eina_Bool enabled) |
Get the enable status of alpha test for given mesh. More... | |
EOAPI Eina_Bool | evas_canvas3d_mesh_alpha_test_enable_get (void) |
Get the enable status of alpha test for given mesh. More... | |
EOAPI void | evas_canvas3d_mesh_alpha_func_set (Evas_Canvas3D_Comparison comparison_func, Evas_Real ref_value) |
Set the alpha func. More... | |
EOAPI void | evas_canvas3d_mesh_alpha_func_get (Evas_Canvas3D_Comparison *comparison_func, Evas_Real *ref_value) |
Get the reference value and the comparison function for alpha testing. More... | |
EOAPI void | evas_canvas3d_mesh_blending_enable_set (Eina_Bool blending) |
Enable or disable blending for given mesh. More... | |
EOAPI Eina_Bool | evas_canvas3d_mesh_blending_enable_get (void) |
Get whether blending is enabled for the mesh. More... | |
EOAPI void | evas_canvas3d_mesh_frame_material_set (int frame, Evas_Canvas3D_Material *material) |
Set the material of the key frame of the given mesh. More... | |
EOAPI Evas_Canvas3D_Material * | evas_canvas3d_mesh_frame_material_get (int frame) |
Get the material of the key frame of the given mesh. More... | |
EOAPI void | evas_canvas3d_mesh_vertex_assembly_set (Evas_Canvas3D_Vertex_Assembly assembly) |
Set the vertex assembly of the given mesh. More... | |
EOAPI Evas_Canvas3D_Vertex_Assembly | evas_canvas3d_mesh_vertex_assembly_get (void) |
Get the vertex assembly of the given mesh. More... | |
EOAPI void | evas_canvas3d_mesh_shadows_edges_filtering_set (int blur_level, Evas_Real edges_size) |
Set the shadow edges blur parameters. More... | |
EOAPI void | evas_canvas3d_mesh_shadows_edges_filtering_get (int *blur_level, Evas_Real *edges_size) |
Get the shadow edges blur parameters. More... | |
EOAPI void | evas_canvas3d_mesh_shadows_constant_bias_set (Evas_Real bias) |
Set offset shadow toward object. More... | |
EOAPI Evas_Real | evas_canvas3d_mesh_shadows_constant_bias_get (void) |
Get offset shadow toward object. More... | |
EOAPI void | evas_canvas3d_mesh_frame_vertex_data_set (int frame, Evas_Canvas3D_Vertex_Attrib attrib, int stride, const void *data) |
Set the vertex data of the key frame of the given mesh. More... | |
EOAPI void | evas_canvas3d_mesh_frame_vertex_data_copy_set (int frame, Evas_Canvas3D_Vertex_Attrib attrib, int stride, const void *data) |
Set the vertex data of the key frame of the given mesh by copying from a buffer. More... | |
EOAPI void * | evas_canvas3d_mesh_frame_vertex_data_map (int frame, Evas_Canvas3D_Vertex_Attrib attrib) |
Map the vertex buffer of the key frame of the given mesh. More... | |
EOAPI void | evas_canvas3d_mesh_frame_vertex_data_unmap (int frame, Evas_Canvas3D_Vertex_Attrib attrib) |
Unmap the vertex buffer of the key frame of the given mesh. More... | |
EOAPI int | evas_canvas3d_mesh_frame_vertex_stride_get (int frame, Evas_Canvas3D_Vertex_Attrib attrib) |
Get the vertex buffer stride of the key frame of the given mesh. More... | |
EOAPI void | evas_canvas3d_mesh_index_data_set (Evas_Canvas3D_Index_Format format, int count, const void *indices) |
Set the vertex index data of the given mesh. More... | |
EOAPI void | evas_canvas3d_mesh_convex_hull_data_get (int frame, Eina_Inarray *vertex, Eina_Inarray *index) |
Get the vertex and index data of convex hull around the given mesh. More... | |
EOAPI void | evas_canvas3d_mesh_index_data_copy_set (Evas_Canvas3D_Index_Format format, int count, const void *indices) |
Set the vertex index data of the given mesh by copying from a buffer. More... | |
EOAPI Evas_Canvas3D_Index_Format | evas_canvas3d_mesh_index_format_get (void) |
Get the format of the index data of the given mesh. More... | |
EOAPI int | evas_canvas3d_mesh_index_count_get (void) |
Get the count of the index data of the given mesh. More... | |
EOAPI void * | evas_canvas3d_mesh_index_data_map (void) |
Map the index buffer of the given mesh. More... | |
EOAPI void | evas_canvas3d_mesh_index_data_unmap (void) |
Unmap the index buffer of the given mesh. More... | |
EOAPI Eina_Bool | evas_canvas3d_mesh_frame_exist (int frame) |
Returns EINA_TRUE if frame was added and EINA_FALSE in other case. More... | |
EOAPI void | evas_canvas3d_mesh_frame_add (int frame) |
Add a key frame to the given mesh. More... | |
EOAPI void | evas_canvas3d_mesh_frame_del (int frame) |
Delete a key frame from the given mesh. More... | |
EOAPI void | evas_canvas3d_mesh_fog_color_set (Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a) |
Set the fog color and density for the given mesh. More... | |
EOAPI void | evas_canvas3d_mesh_fog_color_get (Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a) |
Set the fog color and density for the given mesh. More... | |
EOAPI void | evas_canvas3d_mesh_blending_func_set (Evas_Canvas3D_Blend_Func sfactor, Evas_Canvas3D_Blend_Func dfactor) |
Set the blending function for given mesh. More... | |
EOAPI void | evas_canvas3d_mesh_blending_func_get (Evas_Canvas3D_Blend_Func *sfactor, Evas_Canvas3D_Blend_Func *dfactor) |
Get blending blending function for given mesh. More... | |
EOAPI void | evas_canvas3d_mesh_from_primitive_set (int frame, Evas_Canvas3D_Primitive *primitive) |
Set the data of given mesh frame from the given primitive. More... | |
A mesh object is a set of information on a visible geometrical object like character model, terrain or other structures and entities.
Evas 3D support key-frame-based mesh animation, so a mesh can have multiple frames and each frame has its own material and geometric data. Like other data objects, a mesh can be located on a scene by being contained in a node. The mesh is transformed from its modeling coordinate space into the node's coordinate space. Also, the frame number is saved in the containing node. So, one can locate multiple nodes having same mesh object with different animation frame and transform. Unlike camera and light object, multiple meshes can be contained in a single node.
EOAPI void evas_canvas3d_mesh_shade_mode_set | ( | Evas_Canvas3D_Shade_Mode | mode | ) |
Set the shade mode of the given mesh.
Default shade mode is EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR.
[in] | mode | The shade mode. |
EOAPI Evas_Canvas3D_Shade_Mode evas_canvas3d_mesh_shade_mode_get | ( | void | ) |
Get the shade mode of the given mesh.
EOAPI void evas_canvas3d_mesh_color_pick_enable_set | ( | Eina_Bool | enabled | ) |
Set posibility color picking.
[in] | enabled | Posibility flag. |
EOAPI Eina_Bool evas_canvas3d_mesh_color_pick_enable_get | ( | void | ) |
Get status of color picking of the mesh.
EOAPI void evas_canvas3d_mesh_vertex_count_set | ( | unsigned int | count | ) |
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.
[in] | count | Vertex count. |
EOAPI unsigned int evas_canvas3d_mesh_vertex_count_get | ( | void | ) |
Get the vertex count of the given mesh.
EOAPI void evas_canvas3d_mesh_fog_enable_set | ( | Eina_Bool | enabled | ) |
Enable or disable fog effect for given mesh.
Default fog is disabled.
[in] | enabled | Fog enabled status. |
EOAPI Eina_Bool evas_canvas3d_mesh_fog_enable_get | ( | void | ) |
Get the enable status of fog effect for given mesh.
EOAPI void evas_canvas3d_mesh_alpha_test_enable_set | ( | Eina_Bool | enabled | ) |
Get the enable status of alpha test for given mesh.
Default alpha test disabled.
[in] | enabled | The alpha test status. |
EOAPI Eina_Bool evas_canvas3d_mesh_alpha_test_enable_get | ( | void | ) |
Get the enable status of alpha test for given mesh.
EOAPI void evas_canvas3d_mesh_alpha_func_set | ( | Evas_Canvas3D_Comparison | comparison_func, |
Evas_Real | ref_value | ||
) |
Set the alpha func.
The alpha test discards fragments depending on the outcome of a comparison between an incoming fragment's alpha value and a constant reference value. This func specifies the reference value and the comparison function.
[in] | comparison_func | The alpha comparison function. |
[in] | ref_value | The reference value that incoming alpha values are compared to. |
EOAPI void evas_canvas3d_mesh_alpha_func_get | ( | Evas_Canvas3D_Comparison * | comparison_func, |
Evas_Real * | ref_value | ||
) |
Get the reference value and the comparison function for alpha testing.
[out] | comparison_func | The alpha comparison function. |
[out] | ref_value | The reference value that incoming alpha values are compared to. |
EOAPI void evas_canvas3d_mesh_blending_enable_set | ( | Eina_Bool | blending | ) |
Enable or disable blending for given mesh.
[in] | blending | The blending state. |
EOAPI Eina_Bool evas_canvas3d_mesh_blending_enable_get | ( | void | ) |
Get whether blending is enabled for the mesh.
EOAPI void evas_canvas3d_mesh_frame_material_set | ( | int | frame, |
Evas_Canvas3D_Material * | material | ||
) |
Set the material of the key frame of the given mesh.
Setting different materials for each key frame is useful for doing animations like GIF images or color changing animations.
[in] | frame | The number of the key frame. |
[in] | material | The material to be set to the key frame. |
EOAPI Evas_Canvas3D_Material* evas_canvas3d_mesh_frame_material_get | ( | int | frame | ) |
Get the material of the key frame of the given mesh.
[in] | frame | The number of the key frame. |
EOAPI void evas_canvas3d_mesh_vertex_assembly_set | ( | Evas_Canvas3D_Vertex_Assembly | assembly | ) |
Set the vertex assembly of the given mesh.
Vertex assembly defines how the engine organizes vertices into geometric primitives.
Default vertex assembly is EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES.
[in] | assembly | The vertex assembly. |
EOAPI Evas_Canvas3D_Vertex_Assembly evas_canvas3d_mesh_vertex_assembly_get | ( | void | ) |
Get the vertex assembly of the given mesh.
EOAPI void evas_canvas3d_mesh_shadows_edges_filtering_set | ( | int | blur_level, |
Evas_Real | edges_size | ||
) |
Set the shadow edges blur parameters.
The averaging values in window is used for blurring. User can set the size of window and num of points in window.
[in] | blur_level | Number of points within a bluring radius. |
[in] | edges_size | The bluring radius. |
EOAPI void evas_canvas3d_mesh_shadows_edges_filtering_get | ( | int * | blur_level, |
Evas_Real * | edges_size | ||
) |
Get the shadow edges blur parameters.
[out] | blur_level | Number of points within a bluring radius. |
[out] | edges_size | The bluring radius. |
EOAPI void evas_canvas3d_mesh_shadows_constant_bias_set | ( | Evas_Real | bias | ) |
Set offset shadow toward object.
[in] | bias | Offset. |
EOAPI Evas_Real evas_canvas3d_mesh_shadows_constant_bias_get | ( | void | ) |
Get offset shadow toward object.
EOAPI void evas_canvas3d_mesh_frame_vertex_data_set | ( | int | frame, |
Evas_Canvas3D_Vertex_Attrib | attrib, | ||
int | stride, | ||
const void * | data | ||
) |
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_canvas3d_mesh_frame_vertex_data_copy_set instead.
After setting the vertex data, further modifications should be protected by map/unmap pair.
See also evas_canvas3d_mesh_frame_vertex_data_map, evas_canvas3d_mesh_frame_vertex_data_unmap.
[in] | attrib | Vertex attribute ID. |
[in] | stride | Stride to go to the next vertex (in bytes). |
[in] | data | Pointer to the vertex data buffer. |
EOAPI void evas_canvas3d_mesh_frame_vertex_data_copy_set | ( | int | frame, |
Evas_Canvas3D_Vertex_Attrib | attrib, | ||
int | stride, | ||
const void * | data | ||
) |
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_canvas3d_mesh_frame_vertex_data_map. After finishing the modifications, you should call evas_canvas3d_mesh_frame_vertex_data_unmap.
See also evas_canvas3d_mesh_frame_vertex_data_set.
[in] | attrib | Vertex attribute ID. |
[in] | stride | Stride to go to the next vertex (in bytes). |
[in] | data | Pointer to the vertex data buffer. |
EOAPI void* evas_canvas3d_mesh_frame_vertex_data_map | ( | int | frame, |
Evas_Canvas3D_Vertex_Attrib | attrib | ||
) |
Map the vertex buffer of the key frame of the given mesh.
After manipulating the mapped buffer, evas_canvas3d_mesh_frame_vertex_data_unmap should be called to properly download the data to the engine. If the data was set using evas_canvas3d_mesh_frame_vertex_data_set, pointer to the original buffer will be returned. Otherwise, the returned pointer can differ every time calling this function.
[in] | attrib | Vertex attribute ID. |
EOAPI void evas_canvas3d_mesh_frame_vertex_data_unmap | ( | int | frame, |
Evas_Canvas3D_Vertex_Attrib | attrib | ||
) |
Unmap the vertex buffer of the key frame of the given mesh.
See also evas_canvas3d_mesh_frame_vertex_data_map.
[in] | attrib | Vertex attribute ID. |
EOAPI int evas_canvas3d_mesh_frame_vertex_stride_get | ( | int | frame, |
Evas_Canvas3D_Vertex_Attrib | attrib | ||
) |
Get the vertex buffer stride of the key frame of the given mesh.
This function returns valid stride only when the vertex buffer is mapped. If the data was set with evas_canvas3d_mesh_frame_vertex_data_set, the original stride will be returned unchanged.
[in] | attrib | Vertex attribute ID. |
EOAPI void evas_canvas3d_mesh_index_data_set | ( | Evas_Canvas3D_Index_Format | format, |
int | count, | ||
const void * | indices | ||
) |
Set the vertex index data of the given mesh.
When the index data is set, Evas 3D assembles vertices using the index data. If you want to free the data buffer, use evas_canvas3d_mesh_index_data_copy_set. Further modifications should be made within map/unmap pair.
[in] | count | Vertex index count. |
[in] | indices | Pointer to the index data. |
EOAPI void evas_canvas3d_mesh_convex_hull_data_get | ( | int | frame, |
Eina_Inarray * | vertex, | ||
Eina_Inarray * | index | ||
) |
Get the vertex and index data of convex hull around the given mesh.
[in] | vertex | |
[in] | index |
EOAPI void evas_canvas3d_mesh_index_data_copy_set | ( | Evas_Canvas3D_Index_Format | format, |
int | count, | ||
const void * | indices | ||
) |
Set the vertex index data of the given mesh by copying from a buffer.
This function allocates internal index buffer any copy data from the given buffer. Further modifications can be made within map/unmap pair.
See also evas_canvas3d_mesh_index_data_set.
[in] | count | Vertex index count. |
[in] | indices | Pointer to the index data. |
EOAPI Evas_Canvas3D_Index_Format evas_canvas3d_mesh_index_format_get | ( | void | ) |
Get the format of the index data of the given mesh.
Returns valid format only when the index buffer is mapped. First map the index buffer and then query the properties of the mapped buffer. If the index data was set by evas_canvas3d_mesh_index_data_set, the original format will be returned. Otherwise the format can differ every time you call the evas_canvas3d_mesh_index_data_map function.
EOAPI int evas_canvas3d_mesh_index_count_get | ( | void | ) |
Get the count of the index data of the given mesh.
This function returns the index count of the last called data_set function.
EOAPI void* evas_canvas3d_mesh_index_data_map | ( | void | ) |
Map the index buffer of the given mesh.
evas_canvas3d_mesh_index_data_unmap should be called after modifications. If the data was set using evas_canvas3d_mesh_index_data_set, the original pointer will be returned, otherwise, the returned pointer may differ every time you call this function.
EOAPI void evas_canvas3d_mesh_index_data_unmap | ( | void | ) |
Unmap the index buffer of the given mesh.
See also evas_canvas3d_mesh_index_data_map.
EOAPI Eina_Bool evas_canvas3d_mesh_frame_exist | ( | int | frame | ) |
Returns EINA_TRUE if frame was added and EINA_FALSE in other case.
[in] | frame | Frame number. |
EOAPI void evas_canvas3d_mesh_frame_add | ( | int | frame | ) |
Add a key frame to the given mesh.
If specified frame is already exist, error message will be generated.
[in] | frame | The number of the key frame to be added. |
EOAPI void evas_canvas3d_mesh_frame_del | ( | int | frame | ) |
Delete a key frame from the given mesh.
[in] | frame | The number of the key frame to be added. |
Set the fog color and density for the given mesh.
[in] | g | The green component of the fog color. |
[in] | b | The blue component of the fog color. |
[in] | a | The transparency of fog. |
EOAPI void evas_canvas3d_mesh_fog_color_get | ( | Evas_Real * | r, |
Evas_Real * | g, | ||
Evas_Real * | b, | ||
Evas_Real * | a | ||
) |
Set the fog color and density for the given mesh.
[out] | g | Pointer to receive green component of the fog color. |
[out] | b | Pointer to receive blue component of the fog color. |
[out] | a | Pointer to receive transparency of fog. |
EOAPI void evas_canvas3d_mesh_blending_func_set | ( | Evas_Canvas3D_Blend_Func | sfactor, |
Evas_Canvas3D_Blend_Func | dfactor | ||
) |
Set the blending function for given mesh.
[in] | dfactor | Specifies how the red, green, blue, and alpha destination blending factors are computed. |
EOAPI void evas_canvas3d_mesh_blending_func_get | ( | Evas_Canvas3D_Blend_Func * | sfactor, |
Evas_Canvas3D_Blend_Func * | dfactor | ||
) |
Get blending blending function for given mesh.
[out] | dfactor | Pointer to receive destination blendin factors key. |
EOAPI void evas_canvas3d_mesh_from_primitive_set | ( | int | frame, |
Evas_Canvas3D_Primitive * | primitive | ||
) |
Set the data of given mesh frame from the given primitive.
[in] | primitive | Specifies which data will be set. |