diff options
author | Oleksandr Shcherbina <o.shcherbina@samsung.com> | 2015-02-05 15:25:29 +0100 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2015-02-05 15:37:15 +0100 |
commit | 8802ce20516f02cb1db9cb8768ba3f14791236f9 (patch) | |
tree | d7db61e864f276ff23e5aafdec832f6b3f2c6a65 | |
parent | 0c4de0235c0a0ff14896c6e1ba49c1664f908999 (diff) | |
download | efl-8802ce20516f02cb1db9cb8768ba3f14791236f9.tar.gz |
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.c | 10 |
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) if (frame_found) { - if (is_change_orientation) - { - evas_vec3_quaternion_rotate(&pd->obb.p0, &pd->obb.p0, &orientation); - evas_vec3_quaternion_rotate(&pd->obb.p1, &pd->obb.p1, &orientation); - } if ((pd->scale_world.x != 1 || pd->scale_world.y != 1 || pd->scale_world.z != 1)) { Evas_Vec3 scale; @@ -359,6 +354,11 @@ _node_aabb_update(Evas_3D_Node *node, void *data EINA_UNUSED) evas_vec3_multiply(&pd->aabb.p0, &scale, &pd->aabb.p0); evas_vec3_multiply(&pd->aabb.p1, &scale, &pd->aabb.p1); } + if (is_change_orientation) + { + evas_vec3_quaternion_rotate(&pd->obb.p0, &pd->obb.p0, &orientation); + evas_vec3_quaternion_rotate(&pd->obb.p1, &pd->obb.p1, &orientation); + } if ((pd->position_world.x || pd->position_world.y || pd->position_world.z)) { Evas_Vec3 position; |