- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files
- Examples

Typedefs | Functions
Mesh Object
Evas » Evas 3D Extensions

A mesh object is a set of information on a visible geometrical object like character model, terrain or other structures and entities. More...

## Typedefs
typedef Eo | Evas_3D_Mesh
| Mesh object handle. More...

## Functions
EOAPI void | evas_3d_mesh_frame_vertex_data_set (int frame, Evas_3D_Vertex_Attrib attrib, int stride, const void *data)
| Set the vertex data of the key frame of the given mesh. More...
EOAPI void | evas_3d_mesh_frame_vertex_data_copy_set (int frame, Evas_3D_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_3d_mesh_frame_vertex_data_map (int frame, Evas_3D_Vertex_Attrib attrib)
| Map the vertex buffer of the key frame of the given mesh. More...
EOAPI void | evas_3d_mesh_vertex_count_set (unsigned int count)
| Set the vertex count of the given mesh. More...
EOAPI int | evas_3d_mesh_vertex_count_get (void)
| Get the vertex count of the given mesh. More...
void | evas_3d_mesh::frame_vertex_data_set (int frame_, Evas_3D_Vertex_Attrib attrib_, int stride_, const void *data_) const
| Set the vertex data of the key frame of the given mesh. More...
void | evas_3d_mesh::frame_vertex_data_copy_set (int frame_, Evas_3D_Vertex_Attrib attrib_, int stride_, const void *data_) const
| Set the vertex data of the key frame of the given mesh by copying from a buffer. More...
void * | evas_3d_mesh::frame_vertex_data_map (int frame_, Evas_3D_Vertex_Attrib attrib_) const
| Map the vertex buffer of the key frame of the given mesh. More...
void | evas_3d_mesh::vertex_count_set (unsigned int count_) const
| Set the vertex count of the given mesh. More...
int | evas_3d_mesh::vertex_count_get () const
| Get the vertex count of the given mesh. More...

## Detailed Description

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.

## Typedef Documentation

Evas_3D_Mesh

Mesh object handle.

Since
  1.10

## Function Documentation

EOAPI void evas_3d_mesh_frame_vertex_data_set | ( | int | frame,
|  | Evas_3D_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_3d_mesh_frame_vertex_data_copy_set() instead.

After setting the vertex data, further modifications should be protected by map/unmap pair.

See also
  evas_3d_mesh_frame_vertex_data_copy_set()
  evas_3d_mesh_frame_vertex_data_map()
  evas_3d_mesh_frame_vertex_data_unmap()

Parameters

  [in] | frame | The number of the key frame.
  [in] | attrib | Vertex attribute ID.
  [in] | stride | Stride to go to the next vertex (in bytes).
  [in] | data | Pointer to the vertex data buffer.

Referenced by evas_3d_mesh::frame_vertex_data_set().

EOAPI void evas_3d_mesh_frame_vertex_data_copy_set | ( | int | frame,
|  | Evas_3D_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_3d_mesh_frame_vertex_data_map(). After finishing the modifications, you should call evas_3d_mesh_frame_vertex_data_unmap().

See also
  evas_3d_mesh_frame_vertex_data_set()
  evas_3d_mesh_frame_vertex_data_map()
  evas_3d_mesh_frame_vertex_data_unmap()

Parameters

  [in] | frame | The number of the key frame.
  [in] | attrib | Vertex attribute ID.
  [in] | stride | Stride to go to the next vertex (in bytes).
  [in] | data | Pointer to the vertex data buffer.

Referenced by evas_3d_mesh::frame_vertex_data_copy_set().

EOAPI void* evas_3d_mesh_frame_vertex_data_map | ( | int | frame,
|  | Evas_3D_Vertex_Attrib | attrib
| ) |  |

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 also
  evas_3d_mesh_frame_vertex_data_unmap()

Returns
  Starting address of the mapped vertex buffer.

Parameters

  [in] | frame | The number of the key frame.
  [in] | attrib | Vertex attribute ID.

Referenced by evas_3d_mesh::frame_vertex_data_map().

EOAPI void evas_3d_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.

Parameters

  [in] | count | Vertex count.

Referenced by evas_3d_mesh::vertex_count_set().

EOAPI int evas_3d_mesh_vertex_count_get | ( | void |  | ) |

Get the vertex count of the given mesh.

See also
  evas_3d_mesh_vertex_count_set()

Referenced by evas_3d_mesh::vertex_count_get().

void evas_3d_mesh::frame_vertex_data_set | ( | int | frame_,
|  | Evas_3D_Vertex_Attrib | attrib_,
|  | int | stride_,
|  | const void * | data_
| ) |  | const
| inline

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 also
  evas_3d_mesh_frame_vertex_data_copy_set()
  evas_3d_mesh_frame_vertex_data_map()
  evas_3d_mesh_frame_vertex_data_unmap()

Parameters

  frame | The number of the key frame.
  attrib | Vertex attribute ID.
  stride | Stride to go to the next vertex (in bytes).
  data | Pointer to the vertex data buffer.

References efl::eo::base::_eo_ptr(), and evas_3d_mesh_frame_vertex_data_set().

void evas_3d_mesh::frame_vertex_data_copy_set | ( | int | frame_,
|  | Evas_3D_Vertex_Attrib | attrib_,
|  | int | stride_,
|  | const void * | data_
| ) |  | const
| inline

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 also
  evas_3d_mesh_frame_vertex_data_set()
  evas_3d_mesh_frame_vertex_data_map()
  evas_3d_mesh_frame_vertex_data_unmap()

Parameters

  frame | The number of the key frame.
  attrib | Vertex attribute ID.
  stride | Stride to go to the next vertex (in bytes).
  data | Pointer to the vertex data buffer.

References efl::eo::base::_eo_ptr(), and evas_3d_mesh_frame_vertex_data_copy_set().

void* evas_3d_mesh::frame_vertex_data_map | ( | int | frame_,
|  | Evas_3D_Vertex_Attrib | attrib_
| ) |  | const
| inline

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 also
  evas_3d_mesh_frame_vertex_data_unmap()

Returns
  Starting address of the mapped vertex buffer.

Parameters

  frame | The number of the key frame.
  attrib | Vertex attribute ID.

References efl::eo::base::_eo_ptr(), and evas_3d_mesh_frame_vertex_data_map().

void evas_3d_mesh::vertex_count_set | ( | unsigned int | count_ | ) | const
| inline

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.

Parameters

  count | Vertex count.

References efl::eo::base::_eo_ptr(), and evas_3d_mesh_vertex_count_set().

int evas_3d_mesh::vertex_count_get | ( |  | ) | const
| inline

Get the vertex count of the given mesh.

See also
  evas_3d_mesh_vertex_count_set()

References efl::eo::base::_eo_ptr(), and evas_3d_mesh_vertex_count_get().