summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Furs <i.furs@samsung.com>2015-06-03 16:34:45 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-06-03 17:14:12 +0200
commita88aebe8ccf23778a0e82504aadd9c87b09d20bd (patch)
tree0c4c175c9df44fcd60e4d96fca6212c83894bb40
parent69e44c24e3bd946390585a123c73aac9a6653709 (diff)
evas: for aabb add interpolation frame when base frame is not found
Summary: Old algorithm searched specified frame of the base frame and when it could not find the specified frame it ignored. So the bounding box was not synchronized with the object. New algorithm always returns specified base frame or frame interpolation between the nearest base frames. That does synchronizes mesh object and his bounding box. Reviewers: Hermet, cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2594 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/lib/evas/canvas/evas_3d_mesh.c46
-rw-r--r--src/lib/evas/canvas/evas_3d_node.c99
-rw-r--r--src/lib/evas/canvas/evas_3d_scene.c91
-rw-r--r--src/lib/evas/include/evas_private.h1
4 files changed, 122 insertions, 115 deletions
diff --git a/src/lib/evas/canvas/evas_3d_mesh.c b/src/lib/evas/canvas/evas_3d_mesh.c
index 385820fe56..c51afacf30 100644
--- a/src/lib/evas/canvas/evas_3d_mesh.c
+++ b/src/lib/evas/canvas/evas_3d_mesh.c
@@ -911,14 +911,52 @@ _evas_3d_mesh_from_primitive_set(Eo *obj,
911 evas_common_set_model_from_primitive(obj, frame, ppd); 911 evas_common_set_model_from_primitive(obj, frame, ppd);
912} 912}
913 913
914void
915evas_3d_mesh_interpolate_position_get(Evas_Vec3 *out, const Evas_3D_Vertex_Buffer *pos0, const Evas_3D_Vertex_Buffer *pos1,
916 Evas_Real weight, int index)
917{
918 if (pos1->data == NULL)
919 {
920 float *ptr;
921
922 if (pos0->stride != 0.0)
923 ptr = (char *)pos0->data + pos0->stride * index;
924 else
925 ptr = (char *)pos0->data + (3 * sizeof(float)) * index;
926
927 out->x = ptr[0];
928 out->y = ptr[1];
929 out->z = ptr[2];
930 }
931 else
932 {
933 float *ptr0, *ptr1;
934
935 if (pos0->stride != 0.0)
936 ptr0 = (char *)pos0->data + pos0->stride * index;
937 else
938 ptr0 = (char *)pos0->data + (3 * sizeof(float)) * index;
939
940 if (pos1->stride != 0.0)
941 ptr1 = (char *)pos1->data + pos1->stride * index;
942 else
943 ptr1 = (char *)pos1->data + (3 * sizeof(float)) * index;
944
945 out->x = ptr0[0] * weight + ptr1[0] * (1.0 - weight);
946 out->y = ptr0[1] * weight + ptr1[1] * (1.0 - weight);
947 out->z = ptr0[2] * weight + ptr1[2] * (1.0 - weight);
948 }
949}
950
914static inline void 951static inline void
915_mesh_frame_find(Evas_3D_Mesh_Data *mesh, int frame, 952_mesh_frame_find(Evas_3D_Mesh *mesh, int frame,
916 Eina_List **l, Eina_List **r) 953 Eina_List **l, Eina_List **r)
917{ 954{
918 Eina_List *left, *right; 955 Eina_List *left, *right;
919 Evas_3D_Mesh_Frame *f0 = NULL, *f1; 956 Evas_3D_Mesh_Frame *f0 = NULL, *f1;
957 Evas_3D_Mesh_Data *pdmesh = eo_data_scope_get(mesh, EVAS_3D_MESH_CLASS);
920 958
921 left = mesh->frames; 959 left = pdmesh->frames;
922 right = eina_list_next(left); 960 right = eina_list_next(left);
923 961
924 while (right) 962 while (right)
@@ -945,6 +983,7 @@ _mesh_frame_find(Evas_3D_Mesh_Data *mesh, int frame,
945 *l = left; 983 *l = left;
946 *r = NULL; 984 *r = NULL;
947 } 985 }
986 return;
948 } 987 }
949 988
950 *l = left; 989 *l = left;
@@ -960,8 +999,7 @@ evas_3d_mesh_interpolate_vertex_buffer_get(Evas_3D_Mesh *mesh, int frame,
960{ 999{
961 Eina_List *l, *r; 1000 Eina_List *l, *r;
962 const Evas_3D_Mesh_Frame *f0 = NULL, *f1 = NULL; 1001 const Evas_3D_Mesh_Frame *f0 = NULL, *f1 = NULL;
963 Evas_3D_Mesh_Data *pd = eo_data_scope_get(mesh, MY_CLASS); 1002 _mesh_frame_find(mesh, frame, &l, &r);
964 _mesh_frame_find(pd, frame, &l, &r);
965 1003
966 while (l) 1004 while (l)
967 { 1005 {
diff --git a/src/lib/evas/canvas/evas_3d_node.c b/src/lib/evas/canvas/evas_3d_node.c
index cce21f4001..b355e5e5e0 100644
--- a/src/lib/evas/canvas/evas_3d_node.c
+++ b/src/lib/evas/canvas/evas_3d_node.c
@@ -509,55 +509,60 @@ _calculate_box(Evas_Box3 *box3, int vertex_count, Evas_Vec3 *vertex_position)
509static void 509static void
510_pack_meshes_vertex_data(Evas_3D_Node *node, Evas_Vec3 **vertices, int *count) 510_pack_meshes_vertex_data(Evas_3D_Node *node, Evas_Vec3 **vertices, int *count)
511{ 511{
512 const Eina_List *m, *l; 512 const Eina_List *m, *l;
513 Evas_3D_Mesh *mesh; 513 Evas_3D_Mesh *mesh;
514 Evas_3D_Mesh_Frame *f; 514 int j;
515 int j; 515 int frame;
516 int frame; 516 Evas_Vec3 *it;
517 Evas_3D_Mesh_Data *mpd; 517 Evas_3D_Vertex_Buffer pos0, pos1;
518 Evas_Vec3 *it; 518 Evas_Real pos_weight;
519 519
520 *count = 0; 520 *count = 0;
521 eo_do(node, m = (Eina_List *)evas_3d_node_mesh_list_get()); 521 eo_do(node, m = (Eina_List *)evas_3d_node_mesh_list_get());
522 EINA_LIST_FOREACH(m, l, mesh) 522 EINA_LIST_FOREACH(m, l, mesh)
523 { 523 {
524 eo_do(node, frame = evas_3d_node_mesh_frame_get(mesh)); 524 eo_do(node, frame = evas_3d_node_mesh_frame_get(mesh));
525 mpd = eo_data_scope_get(mesh, EVAS_3D_MESH_CLASS); 525 evas_3d_mesh_interpolate_vertex_buffer_get(mesh, frame, EVAS_3D_VERTEX_POSITION,
526 f = evas_3d_mesh_frame_find(mpd, frame); 526 &pos0, &pos1, &pos_weight);
527 if (f) 527 if(!pos0.data) continue;
528 if (f->vertices[EVAS_3D_VERTEX_POSITION].data) 528 if(!pos0.stride)
529 *count += mpd->vertex_count; 529 {
530 } 530 *count += pos0.size / (sizeof(float) * 3);
531 531 }
532 *vertices = (Evas_Vec3*)malloc(*count * sizeof(Evas_Vec3)); 532 else
533 it = *vertices; 533 {
534 if (!*vertices) 534 *count += pos0.size / pos0.stride;
535 { 535 }
536 ERR("Not enough memory."); 536 }
537 return; 537 *vertices = (Evas_Vec3*)malloc(*count * sizeof(Evas_Vec3));
538 } 538 it = *vertices;
539 539 if(!*vertices)
540 EINA_LIST_FOREACH(m, l, mesh) 540 {
541 { 541 ERR("Not enough memory.");
542 eo_do(node, frame = evas_3d_node_mesh_frame_get(mesh)); 542 return;
543 mpd = eo_data_scope_get(mesh, EVAS_3D_MESH_CLASS); 543 }
544 f = evas_3d_mesh_frame_find(mpd, frame); 544
545 if (f) 545 EINA_LIST_FOREACH(m, l, mesh)
546 {
547 eo_do(node, frame = evas_3d_node_mesh_frame_get(mesh));
548 evas_3d_mesh_interpolate_vertex_buffer_get(mesh, frame, EVAS_3D_VERTEX_POSITION,
549 &pos0, &pos1, &pos_weight);
550 if(!pos0.data) continue;
551 int stride = 0;
552 if(!pos0.stride)
553 {
554 stride = sizeof(float) * 3;
555 }
556 else
546 { 557 {
547 float *src = (float *)f->vertices[EVAS_3D_VERTEX_POSITION].data; 558 stride = pos0.stride;
548 if (!src) continue;
549 int stride = f->vertices[EVAS_3D_VERTEX_POSITION].stride;
550 if (!stride) stride = sizeof(float) * 3;
551 for (j = 0; j < mpd->vertex_count; j++)
552 {
553 it->x = src[0];
554 it->y = src[1];
555 it->z = src[2];
556 it++;
557 src = (float *)((char *)src + stride);
558 }
559 } 559 }
560 } 560 for (j = 0; j < pos0.size / stride; j++)
561 {
562 evas_3d_mesh_interpolate_position_get(it, &pos0, &pos1, pos_weight, j);
563 it++;
564 }
565 }
561} 566}
562 567
563static void 568static void
diff --git a/src/lib/evas/canvas/evas_3d_scene.c b/src/lib/evas/canvas/evas_3d_scene.c
index 6784c990a1..c4bfbcf253 100644
--- a/src/lib/evas/canvas/evas_3d_scene.c
+++ b/src/lib/evas/canvas/evas_3d_scene.c
@@ -225,43 +225,6 @@ _pick_data_triangle_add(Evas_3D_Pick_Data *data, const Evas_Ray3 *ray,
225} 225}
226 226
227static inline void 227static inline void
228_position_get(Evas_Vec3 *out, const Evas_3D_Vertex_Buffer *pos0, const Evas_3D_Vertex_Buffer *pos1,
229 Evas_Real weight, int index)
230{
231 if (pos1->data == NULL)
232 {
233 float *ptr;
234
235 if (pos0->stride != 0.0)
236 ptr = (float *)((char *)pos0->data + pos0->stride * index);
237 else
238 ptr = (float *)((char *)pos0->data + (3 * sizeof(float)) * index);
239
240 out->x = ptr[0];
241 out->y = ptr[1];
242 out->z = ptr[2];
243 }
244 else
245 {
246 float *ptr0, *ptr1;
247
248 if (pos0->stride != 0.0)
249 ptr0 = (float *)((char *)pos0->data + pos0->stride * index);
250 else
251 ptr0 = (float *)((char *)pos0->data + (3 * sizeof(float)) * index);
252
253 if (pos1->stride != 0.0)
254 ptr1 = (float *)((char *)pos1->data + pos1->stride * index);
255 else
256 ptr1 = (float *)((char *)pos1->data + (3 * sizeof(float)) * index);
257
258 out->x = ptr0[0] * weight + ptr1[0] * (1.0 - weight);
259 out->y = ptr0[1] * weight + ptr1[1] * (1.0 - weight);
260 out->z = ptr0[2] * weight + ptr1[2] * (1.0 - weight);
261 }
262}
263
264static inline void
265_pick_data_texcoord_update(Evas_3D_Pick_Data *data, 228_pick_data_texcoord_update(Evas_3D_Pick_Data *data,
266 const Evas_3D_Vertex_Buffer *tex0, const Evas_3D_Vertex_Buffer *tex1, 229 const Evas_3D_Vertex_Buffer *tex0, const Evas_3D_Vertex_Buffer *tex1,
267 Evas_Real weight, unsigned int i0, unsigned int i1, unsigned int i2) 230 Evas_Real weight, unsigned int i0, unsigned int i1, unsigned int i2)
@@ -357,9 +320,9 @@ _pick_data_mesh_add(Evas_3D_Pick_Data *data, const Evas_Ray3 *ray,
357 i2 = ((unsigned char *)pdmesh->indices)[i + 2]; 320 i2 = ((unsigned char *)pdmesh->indices)[i + 2];
358 } 321 }
359 322
360 _position_get(&tri.p0, &pos0, &pos1, pos_weight, i0); 323 evas_3d_mesh_interpolate_position_get(&tri.p0, &pos0, &pos1, pos_weight, i0);
361 _position_get(&tri.p1, &pos0, &pos1, pos_weight, i1); 324 evas_3d_mesh_interpolate_position_get(&tri.p1, &pos0, &pos1, pos_weight, i1);
362 _position_get(&tri.p2, &pos0, &pos1, pos_weight, i2); 325 evas_3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, i2);
363 326
364 if (_pick_data_triangle_add(data, ray, &tri)) 327 if (_pick_data_triangle_add(data, ray, &tri))
365 { 328 {
@@ -383,8 +346,8 @@ _pick_data_mesh_add(Evas_3D_Pick_Data *data, const Evas_Ray3 *ray,
383 i2 = ((unsigned char *)pdmesh->indices)[1]; 346 i2 = ((unsigned char *)pdmesh->indices)[1];
384 } 347 }
385 348
386 _position_get(&tri.p1, &pos0, &pos1, pos_weight, i1); 349 evas_3d_mesh_interpolate_position_get(&tri.p1, &pos0, &pos1, pos_weight, i1);
387 _position_get(&tri.p2, &pos0, &pos1, pos_weight, i2); 350 evas_3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, i2);
388 351
389 for (i = 0; i < pdmesh->index_count - 2; i++) 352 for (i = 0; i < pdmesh->index_count - 2; i++)
390 { 353 {
@@ -396,7 +359,7 @@ _pick_data_mesh_add(Evas_3D_Pick_Data *data, const Evas_Ray3 *ray,
396 else 359 else
397 i2 = ((unsigned char *)pdmesh->indices)[i + 2]; 360 i2 = ((unsigned char *)pdmesh->indices)[i + 2];
398 361
399 _position_get(&tri.p2, &pos0, &pos1, pos_weight, i2); 362 evas_3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, i2);
400 363
401 if (_pick_data_triangle_add(data, ray, &tri)) 364 if (_pick_data_triangle_add(data, ray, &tri))
402 { 365 {
@@ -431,8 +394,8 @@ _pick_data_mesh_add(Evas_3D_Pick_Data *data, const Evas_Ray3 *ray,
431 i2 = ((unsigned char *)pdmesh->indices)[1]; 394 i2 = ((unsigned char *)pdmesh->indices)[1];
432 } 395 }
433 396
434 _position_get(&tri.p0, &pos0, &pos1, pos_weight, i0); 397 evas_3d_mesh_interpolate_position_get(&tri.p0, &pos0, &pos1, pos_weight, i0);
435 _position_get(&tri.p2, &pos0, &pos1, pos_weight, i2); 398 evas_3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, i2);
436 399
437 for (i = 1; i < pdmesh->index_count - 1; i++) 400 for (i = 1; i < pdmesh->index_count - 1; i++)
438 { 401 {
@@ -443,7 +406,7 @@ _pick_data_mesh_add(Evas_3D_Pick_Data *data, const Evas_Ray3 *ray,
443 else 406 else
444 i2 = ((unsigned char *)pdmesh->indices)[i + 1]; 407 i2 = ((unsigned char *)pdmesh->indices)[i + 1];
445 408
446 _position_get(&tri.p2, &pos0, &pos1, pos_weight, i2); 409 evas_3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, i2);
447 410
448 if (_pick_data_triangle_add(data, ray, &tri)) 411 if (_pick_data_triangle_add(data, ray, &tri))
449 { 412 {
@@ -466,9 +429,9 @@ _pick_data_mesh_add(Evas_3D_Pick_Data *data, const Evas_Ray3 *ray,
466 { 429 {
467 for (i = 0; i < pdmesh->index_count; i += 3) 430 for (i = 0; i < pdmesh->index_count; i += 3)
468 { 431 {
469 _position_get(&tri.p0, &pos0, &pos1, pos_weight, i); 432 evas_3d_mesh_interpolate_position_get(&tri.p0, &pos0, &pos1, pos_weight, i);
470 _position_get(&tri.p1, &pos0, &pos1, pos_weight, i + 1); 433 evas_3d_mesh_interpolate_position_get(&tri.p1, &pos0, &pos1, pos_weight, i + 1);
471 _position_get(&tri.p2, &pos0, &pos1, pos_weight, i + 2); 434 evas_3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, i + 2);
472 435
473 if (_pick_data_triangle_add(data, ray, &tri)) 436 if (_pick_data_triangle_add(data, ray, &tri))
474 { 437 {
@@ -481,15 +444,15 @@ _pick_data_mesh_add(Evas_3D_Pick_Data *data, const Evas_Ray3 *ray,
481 } 444 }
482 else if (pdmesh->assembly == EVAS_3D_VERTEX_ASSEMBLY_TRIANGLE_STRIP) 445 else if (pdmesh->assembly == EVAS_3D_VERTEX_ASSEMBLY_TRIANGLE_STRIP)
483 { 446 {
484 _position_get(&tri.p1, &pos0, &pos1, pos_weight, 0); 447 evas_3d_mesh_interpolate_position_get(&tri.p1, &pos0, &pos1, pos_weight, 0);
485 _position_get(&tri.p2, &pos0, &pos1, pos_weight, 1); 448 evas_3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, 1);
486 449
487 for (i = 0; i < pdmesh->index_count - 2; i++) 450 for (i = 0; i < pdmesh->index_count - 2; i++)
488 { 451 {
489 tri.p0 = tri.p1; 452 tri.p0 = tri.p1;
490 tri.p1 = tri.p2; 453 tri.p1 = tri.p2;
491 454
492 _position_get(&tri.p2, &pos0, &pos1, pos_weight, i + 2); 455 evas_3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, i + 2);
493 456
494 if (_pick_data_triangle_add(data, ray, &tri)) 457 if (_pick_data_triangle_add(data, ray, &tri))
495 { 458 {
@@ -502,14 +465,14 @@ _pick_data_mesh_add(Evas_3D_Pick_Data *data, const Evas_Ray3 *ray,
502 } 465 }
503 else if (pdmesh->assembly == EVAS_3D_VERTEX_ASSEMBLY_TRIANGLE_FAN) 466 else if (pdmesh->assembly == EVAS_3D_VERTEX_ASSEMBLY_TRIANGLE_FAN)
504 { 467 {
505 _position_get(&tri.p0, &pos0, &pos1, pos_weight, 0); 468 evas_3d_mesh_interpolate_position_get(&tri.p0, &pos0, &pos1, pos_weight, 0);
506 _position_get(&tri.p2, &pos0, &pos1, pos_weight, 1); 469 evas_3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, 1);
507 470
508 for (i = 1; i < pdmesh->index_count - 1; i++) 471 for (i = 1; i < pdmesh->index_count - 1; i++)
509 { 472 {
510 tri.p1 = tri.p2; 473 tri.p1 = tri.p2;
511 474
512 _position_get(&tri.p2, &pos0, &pos1, pos_weight, i + 1); 475 evas_3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, i + 1);
513 476
514 if (_pick_data_triangle_add(data, ray, &tri)) 477 if (_pick_data_triangle_add(data, ray, &tri))
515 { 478 {
@@ -527,9 +490,9 @@ _pick_data_mesh_add(Evas_3D_Pick_Data *data, const Evas_Ray3 *ray,
527 { 490 {
528 for (i = 0; i < pdmesh->vertex_count; i += 3) 491 for (i = 0; i < pdmesh->vertex_count; i += 3)
529 { 492 {
530 _position_get(&tri.p0, &pos0, &pos1, pos_weight, i); 493 evas_3d_mesh_interpolate_position_get(&tri.p0, &pos0, &pos1, pos_weight, i);
531 _position_get(&tri.p1, &pos0, &pos1, pos_weight, i + 1); 494 evas_3d_mesh_interpolate_position_get(&tri.p1, &pos0, &pos1, pos_weight, i + 1);
532 _position_get(&tri.p2, &pos0, &pos1, pos_weight, i + 2); 495 evas_3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, i + 2);
533 496
534 if (_pick_data_triangle_add(data, ray, &tri)) 497 if (_pick_data_triangle_add(data, ray, &tri))
535 { 498 {
@@ -542,15 +505,15 @@ _pick_data_mesh_add(Evas_3D_Pick_Data *data, const Evas_Ray3 *ray,
542 } 505 }
543 else if (pdmesh->assembly == EVAS_3D_VERTEX_ASSEMBLY_TRIANGLE_STRIP) 506 else if (pdmesh->assembly == EVAS_3D_VERTEX_ASSEMBLY_TRIANGLE_STRIP)
544 { 507 {
545 _position_get(&tri.p1, &pos0, &pos1, pos_weight, 0); 508 evas_3d_mesh_interpolate_position_get(&tri.p1, &pos0, &pos1, pos_weight, 0);
546 _position_get(&tri.p2, &pos0, &pos1, pos_weight, 1); 509 evas_3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, 1);
547 510
548 for (i = 0; i < pdmesh->vertex_count - 2; i++) 511 for (i = 0; i < pdmesh->vertex_count - 2; i++)
549 { 512 {
550 tri.p0 = tri.p1; 513 tri.p0 = tri.p1;
551 tri.p1 = tri.p2; 514 tri.p1 = tri.p2;
552 515
553 _position_get(&tri.p2, &pos0, &pos1, pos_weight, i + 2); 516 evas_3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, i + 2);
554 517
555 if (_pick_data_triangle_add(data, ray, &tri)) 518 if (_pick_data_triangle_add(data, ray, &tri))
556 { 519 {
@@ -563,14 +526,14 @@ _pick_data_mesh_add(Evas_3D_Pick_Data *data, const Evas_Ray3 *ray,
563 } 526 }
564 else if (pdmesh->assembly == EVAS_3D_VERTEX_ASSEMBLY_TRIANGLE_FAN) 527 else if (pdmesh->assembly == EVAS_3D_VERTEX_ASSEMBLY_TRIANGLE_FAN)
565 { 528 {
566 _position_get(&tri.p0, &pos0, &pos1, pos_weight, 0); 529 evas_3d_mesh_interpolate_position_get(&tri.p0, &pos0, &pos1, pos_weight, 0);
567 _position_get(&tri.p2, &pos0, &pos1, pos_weight, 1); 530 evas_3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, 1);
568 531
569 for (i = 1; i < pdmesh->vertex_count - 1; i++) 532 for (i = 1; i < pdmesh->vertex_count - 1; i++)
570 { 533 {
571 tri.p1 = tri.p2; 534 tri.p1 = tri.p2;
572 535
573 _position_get(&tri.p2, &pos0, &pos1, pos_weight, i + 1); 536 evas_3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, i + 1);
574 537
575 if (_pick_data_triangle_add(data, ray, &tri)) 538 if (_pick_data_triangle_add(data, ray, &tri))
576 { 539 {
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index 4464a60acf..52feb58367 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1720,6 +1720,7 @@ void evas_3d_light_node_del(Evas_3D_Light *light, Evas_3D_Node *node);
1720/* Mesh functions. */ 1720/* Mesh functions. */
1721void evas_3d_mesh_node_add(Evas_3D_Mesh *mesh, Evas_3D_Node *node); 1721void evas_3d_mesh_node_add(Evas_3D_Mesh *mesh, Evas_3D_Node *node);
1722void evas_3d_mesh_node_del(Evas_3D_Mesh *mesh, Evas_3D_Node *node); 1722void evas_3d_mesh_node_del(Evas_3D_Mesh *mesh, Evas_3D_Node *node);
1723void evas_3d_mesh_interpolate_position_get(Evas_Vec3 *out, const Evas_3D_Vertex_Buffer *pos0, const Evas_3D_Vertex_Buffer *pos1, Evas_Real weight, int index);
1723void evas_3d_mesh_interpolate_vertex_buffer_get(Evas_3D_Mesh *mesh, int frame, Evas_3D_Vertex_Attrib attrib, Evas_3D_Vertex_Buffer *buffer0, Evas_3D_Vertex_Buffer *buffer1, Evas_Real *weight); 1724void evas_3d_mesh_interpolate_vertex_buffer_get(Evas_3D_Mesh *mesh, int frame, Evas_3D_Vertex_Attrib attrib, Evas_3D_Vertex_Buffer *buffer0, Evas_3D_Vertex_Buffer *buffer1, Evas_Real *weight);
1724void evas_3d_mesh_file_md2_set(Evas_3D_Mesh *mesh, const char *file); 1725void evas_3d_mesh_file_md2_set(Evas_3D_Mesh *mesh, const char *file);
1725void evas_3d_mesh_save_obj(Evas_3D_Mesh *mesh, const char *file, Evas_3D_Mesh_Frame *f); 1726void evas_3d_mesh_save_obj(Evas_3D_Mesh *mesh, const char *file, Evas_3D_Mesh_Frame *f);