summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Shcherbina <o.shcherbina@samsung.com>2015-02-05 15:25:29 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-02-05 15:37:15 +0100
commit8802ce20516f02cb1db9cb8768ba3f14791236f9 (patch)
treed7db61e864f276ff23e5aafdec832f6b3f2c6a65
parent0c4de0235c0a0ff14896c6e1ba49c1664f908999 (diff)
evas: Evas_3D - fix order of transformation while updating bounding object.
Summary: The order of tranformation changed to scale, orientation, position as in some cases it can lead to incorrect value for the bounding box. @fix Reviewers: cedric, Hermet, raster Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1942 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/lib/evas/canvas/evas_3d_node.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/evas/canvas/evas_3d_node.c b/src/lib/evas/canvas/evas_3d_node.c
index b013e63293..ed47791ad5 100644
--- a/src/lib/evas/canvas/evas_3d_node.c
+++ b/src/lib/evas/canvas/evas_3d_node.c
@@ -345,11 +345,6 @@ _node_aabb_update(Evas_3D_Node *node, void *data EINA_UNUSED)
345 345
346 if (frame_found) 346 if (frame_found)
347 { 347 {
348 if (is_change_orientation)
349 {
350 evas_vec3_quaternion_rotate(&pd->obb.p0, &pd->obb.p0, &orientation);
351 evas_vec3_quaternion_rotate(&pd->obb.p1, &pd->obb.p1, &orientation);
352 }
353 if ((pd->scale_world.x != 1 || pd->scale_world.y != 1 || pd->scale_world.z != 1)) 348 if ((pd->scale_world.x != 1 || pd->scale_world.y != 1 || pd->scale_world.z != 1))
354 { 349 {
355 Evas_Vec3 scale; 350 Evas_Vec3 scale;
@@ -359,6 +354,11 @@ _node_aabb_update(Evas_3D_Node *node, void *data EINA_UNUSED)
359 evas_vec3_multiply(&pd->aabb.p0, &scale, &pd->aabb.p0); 354 evas_vec3_multiply(&pd->aabb.p0, &scale, &pd->aabb.p0);
360 evas_vec3_multiply(&pd->aabb.p1, &scale, &pd->aabb.p1); 355 evas_vec3_multiply(&pd->aabb.p1, &scale, &pd->aabb.p1);
361 } 356 }
357 if (is_change_orientation)
358 {
359 evas_vec3_quaternion_rotate(&pd->obb.p0, &pd->obb.p0, &orientation);
360 evas_vec3_quaternion_rotate(&pd->obb.p1, &pd->obb.p1, &orientation);
361 }
362 if ((pd->position_world.x || pd->position_world.y || pd->position_world.z)) 362 if ((pd->position_world.x || pd->position_world.y || pd->position_world.z))
363 { 363 {
364 Evas_Vec3 position; 364 Evas_Vec3 position;