drawTrace.Reset();
actor.SetPosition( x, y, 0.0f);
- actor.SetRotation( Degree(angle), Vector3::ZAXIS );
+ actor.SetOrientation( Degree(angle), Vector3::ZAXIS );
application.SendNotification();
application.Render(16);
if( inside )
drawTrace.Reset();
actor.SetPosition( x, y, 0.0f);
- actor.SetRotation( Degree(angle), Vector3::ZAXIS );
+ actor.SetOrientation( Degree(angle), Vector3::ZAXIS );
application.SendNotification();
application.Render(16);
if( inside )
application.Render();
DALI_TEST_EQUALS( Vector3( 1.0f, 1.1f, 1.2f ), actor.GetCurrentPosition(), TEST_LOCATION );
- actor.MoveBy( Vector3( 0.1f, 0.1f, 0.1f ) );
+ actor.TranslateBy( Vector3( 0.1f, 0.1f, 0.1f ) );
// flush the queue and render once
application.SendNotification();
application.Render();
END_TEST;
}
-int UtcDaliActorMoveBy(void)
+int UtcDaliActorTranslateBy(void)
{
TestApplication application;
DALI_TEST_CHECK(vector == actor.GetCurrentPosition());
- actor.MoveBy(vector);
+ actor.TranslateBy(vector);
// flush the queue and render once
application.SendNotification();
END_TEST;
}
-// SetRotation(float angleRadians, Vector3 axis)
-int UtcDaliActorSetRotation01(void)
+// SetOrientation(float angleRadians, Vector3 axis)
+int UtcDaliActorSetOrientation01(void)
{
TestApplication application;
Quaternion rotation(0.785f, Vector3(1.0f, 1.0f, 0.0f));
Actor actor = Actor::New();
- actor.SetRotation(rotation);
+ actor.SetOrientation(rotation);
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(rotation, actor.GetCurrentRotation(), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
END_TEST;
}
-int UtcDaliActorSetRotation02(void)
+int UtcDaliActorSetOrientation02(void)
{
TestApplication application;
float angle = 0.785f;
Vector3 axis(1.0f, 1.0f, 0.0f);
- actor.SetRotation(Radian( angle ), axis);
+ actor.SetOrientation(Radian( angle ), axis);
Quaternion rotation( angle, axis );
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(rotation, actor.GetCurrentRotation(), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
Stage::GetCurrent().Add( actor );
actor.RotateBy( Degree( 360 ), axis);
- DALI_TEST_EQUALS(rotation, actor.GetCurrentRotation(), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
- actor.SetRotation( Degree( 0 ), Vector3( 1.0f, 0.0f, 0.0f ) );
+ actor.SetOrientation( Degree( 0 ), Vector3( 1.0f, 0.0f, 0.0f ) );
Quaternion result( 0, Vector3( 1.0f, 0.0f, 0.0f ) );
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( result, actor.GetCurrentRotation(), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS( result, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
- actor.SetRotation(Radian( angle ), axis);
+ actor.SetOrientation(Radian( angle ), axis);
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(rotation, actor.GetCurrentRotation(), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
Stage::GetCurrent().Remove( actor );
END_TEST;
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(Quaternion(M_PI*0.25f, Vector3::ZAXIS), actor.GetCurrentRotation(), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS(Quaternion(M_PI*0.25f, Vector3::ZAXIS), actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
Stage::GetCurrent().Add( actor );
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(Quaternion(M_PI*0.5f, Vector3::ZAXIS), actor.GetCurrentRotation(), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS(Quaternion(M_PI*0.5f, Vector3::ZAXIS), actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
Stage::GetCurrent().Remove( actor );
END_TEST;
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(rotation, actor.GetCurrentRotation(), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
actor.RotateBy(rotation);
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(Quaternion(M_PI*0.5f, Vector3::ZAXIS), actor.GetCurrentRotation(), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS(Quaternion(M_PI*0.5f, Vector3::ZAXIS), actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
END_TEST;
}
-int UtcDaliActorGetCurrentRotation(void)
+int UtcDaliActorGetCurrentOrientation(void)
{
TestApplication application;
Actor actor = Actor::New();
Quaternion rotation(0.785f, Vector3(1.0f, 1.0f, 0.0f));
- actor.SetRotation(rotation);
+ actor.SetOrientation(rotation);
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(rotation, actor.GetCurrentRotation(), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
END_TEST;
}
-int UtcDaliActorGetCurrentWorldRotation(void)
+int UtcDaliActorGetCurrentWorldOrientation(void)
{
tet_infoline("Testing Actor::GetCurrentWorldRotation");
TestApplication application;
Actor parent = Actor::New();
Radian rotationAngle( Degree(90.0f) );
Quaternion rotation( rotationAngle, Vector3::YAXIS );
- parent.SetRotation( rotation );
+ parent.SetOrientation( rotation );
Stage::GetCurrent().Add( parent );
Actor child = Actor::New();
- child.SetRotation( rotation );
+ child.SetOrientation( rotation );
parent.Add( child );
// The actors should not have a world rotation yet
- DALI_TEST_EQUALS( parent.GetCurrentWorldRotation(), Quaternion(0.0f, Vector3::YAXIS), 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldRotation(), Quaternion(0.0f, Vector3::YAXIS), 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentWorldOrientation(), Quaternion(0.0f, Vector3::YAXIS), 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentWorldOrientation(), Quaternion(0.0f, Vector3::YAXIS), 0.001, TEST_LOCATION );
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( parent.GetCurrentRotation(), rotation, 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentRotation(), rotation, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentOrientation(), rotation, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentOrientation(), rotation, 0.001, TEST_LOCATION );
// The actors should have a world rotation now
- DALI_TEST_EQUALS( parent.GetCurrentWorldRotation(), Quaternion( rotationAngle, Vector3::YAXIS ), 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldRotation(), Quaternion( rotationAngle * 2.0f, Vector3::YAXIS ), 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentWorldOrientation(), Quaternion( rotationAngle, Vector3::YAXIS ), 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentWorldOrientation(), Quaternion( rotationAngle * 2.0f, Vector3::YAXIS ), 0.001, TEST_LOCATION );
// turn off child rotation inheritance
- child.SetInheritRotation( false );
- DALI_TEST_EQUALS( child.IsRotationInherited(), false, TEST_LOCATION );
+ child.SetInheritOrientation( false );
+ DALI_TEST_EQUALS( child.IsOrientationInherited(), false, TEST_LOCATION );
application.SendNotification();
application.Render(0);
// The actors should have a world rotation now
- DALI_TEST_EQUALS( parent.GetCurrentWorldRotation(), Quaternion( rotationAngle, Vector3::YAXIS ), 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldRotation(), rotation, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentWorldOrientation(), Quaternion( rotationAngle, Vector3::YAXIS ), 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentWorldOrientation(), rotation, 0.001, TEST_LOCATION );
END_TEST;
}
DALI_TEST_EQUALS(actor.GetCurrentOpacity(), 0.4f, TEST_LOCATION );
// change opacity, actor is on stage to change is not immediate
- actor.OpacityBy( 0.1f );
+ actor.SetOpacity( actor.GetCurrentOpacity() + 0.1f );
// flush the queue and render once
application.SendNotification();
application.Render();
DALI_TEST_EQUALS(actor.GetCurrentOpacity(), 0.9f, TEST_LOCATION );
// change opacity, actor is on stage to change is not immediate
- actor.OpacityBy( -0.9f );
+ actor.SetOpacity( actor.GetCurrentOpacity() - 0.9f );
// flush the queue and render once
application.SendNotification();
application.Render();
application.Render();
DALI_TEST_CHECK(color == actor.GetCurrentColor());
- actor.ColorBy( Vector4( -0.4f, -0.5f, -0.6f, -0.4f ) );
+ actor.SetColor( actor.GetCurrentColor() + Vector4( -0.4f, -0.5f, -0.6f, -0.4f ) );
// flush the queue and render once
application.SendNotification();
application.Render();
application.Render();
DALI_TEST_EQUALS( color, actor.GetCurrentColor(), TEST_LOCATION );
- actor.ColorBy( Vector4( 1.1f, 1.1f, 1.1f, 1.1f ) );
+ actor.SetColor( actor.GetCurrentColor() + Vector4( 1.1f, 1.1f, 1.1f, 1.1f ) );
// flush the queue and render once
application.SendNotification();
application.Render();
Quaternion parentRotation(rotationAngle, Vector3::ZAXIS);
Vector3 parentScale( 1.0f, 2.0f, 3.0f );
parent.SetPosition( parentPosition );
- parent.SetRotation( parentRotation );
+ parent.SetOrientation( parentRotation );
parent.SetScale( parentScale );
Stage::GetCurrent().Add( parent );
Quaternion childRotation( childRotationAngle, Vector3::YAXIS );
Vector3 childScale( 2.0f, 2.0f, 2.0f );
child.SetPosition( childPosition );
- child.SetRotation( childRotation );
+ child.SetOrientation( childRotation );
child.SetScale( childScale );
parent.Add( child );
Quaternion parentRotation(rotationAngle, Vector3::ZAXIS);
Vector3 parentScale( 1.0f, 2.0f, 3.0f );
parent.SetPosition( parentPosition );
- parent.SetRotation( parentRotation );
+ parent.SetOrientation( parentRotation );
parent.SetScale( parentScale );
Stage::GetCurrent().Add( parent );
{ "world-position-x", Actor::Property::WORLD_POSITION_X, Property::FLOAT },
{ "world-position-y", Actor::Property::WORLD_POSITION_Y, Property::FLOAT },
{ "world-position-z", Actor::Property::WORLD_POSITION_Z, Property::FLOAT },
- { "rotation", Actor::Property::ROTATION, Property::ROTATION },
- { "world-rotation", Actor::Property::WORLD_ROTATION, Property::ROTATION },
+ { "orientation", Actor::Property::ORIENTATION, Property::ROTATION },
+ { "world-orientation", Actor::Property::WORLD_ORIENTATION, Property::ROTATION },
{ "scale", Actor::Property::SCALE, Property::VECTOR3 },
{ "scale-x", Actor::Property::SCALE_X, Property::FLOAT },
{ "scale-y", Actor::Property::SCALE_Y, Property::FLOAT },
{ "name", Actor::Property::NAME, Property::STRING },
{ "sensitive", Actor::Property::SENSITIVE, Property::BOOLEAN },
{ "leave-required", Actor::Property::LEAVE_REQUIRED, Property::BOOLEAN },
- { "inherit-rotation", Actor::Property::INHERIT_ROTATION, Property::BOOLEAN },
+ { "inherit-orientation", Actor::Property::INHERIT_ORIENTATION, Property::BOOLEAN },
{ "inherit-scale", Actor::Property::INHERIT_SCALE, Property::BOOLEAN },
{ "color-mode", Actor::Property::COLOR_MODE, Property::STRING },
{ "position-inheritance", Actor::Property::POSITION_INHERITANCE, Property::STRING },
TestApplication application;
Actor actor = Actor::New();
- actor.SetRotation(Quaternion(0.0f, Vector3::YAXIS));
+ actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
Animation animation = Animation::New(durationSeconds);
Degree targetRotationDegrees(90.0f);
Radian targetRotationRadians(targetRotationDegrees);
- animation.AnimateTo( Property(actor, Actor::Property::ROTATION), AngleAxis(targetRotationRadians, Vector3::YAXIS) );
+ animation.AnimateTo( Property(actor, Actor::Property::ORIENTATION), AngleAxis(targetRotationRadians, Vector3::YAXIS) );
// Start the animation
animation.Play();
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- actor.SetRotation(Quaternion(0.0f, Vector3::YAXIS));
+ actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
Degree targetRotationDegrees(90.0f);
Radian targetRotationRadians(targetRotationDegrees);
Quaternion targetRotation(targetRotationRadians, Vector3::YAXIS);
- animation.AnimateTo( Property(actor, Actor::Property::ROTATION), targetRotation );
+ animation.AnimateTo( Property(actor, Actor::Property::ORIENTATION), targetRotation );
// Start the animation
animation.Play();
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- actor.SetRotation(Quaternion(0.0f, Vector3::YAXIS));
+ actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
Animation animation = Animation::New(durationSeconds);
Degree targetRotationDegrees(90.0f);
Radian targetRotationRadians(targetRotationDegrees);
- animation.AnimateTo( Property(actor, Actor::Property::ROTATION), AngleAxis(targetRotationDegrees, Vector3::YAXIS), AlphaFunctions::EaseIn);
+ animation.AnimateTo( Property(actor, Actor::Property::ORIENTATION), AngleAxis(targetRotationDegrees, Vector3::YAXIS), AlphaFunctions::EaseIn);
// Start the animation
animation.Play();
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.25f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.25f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.5f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.5f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.75f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.75f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- actor.SetRotation(Quaternion(0.0f, Vector3::YAXIS));
+ actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
Degree targetRotationDegrees(90.0f);
Radian targetRotationRadians(targetRotationDegrees);
float delay(0.1f);
- animation.AnimateTo( Property(actor, Actor::Property::ROTATION), AngleAxis(targetRotationDegrees, Vector3::YAXIS), TimePeriod(delay, durationSeconds - delay));
+ animation.AnimateTo( Property(actor, Actor::Property::ORIENTATION), AngleAxis(targetRotationDegrees, Vector3::YAXIS), TimePeriod(delay, durationSeconds - delay));
// Start the animation
animation.Play();
application.SendNotification();
finishCheck.CheckSignalNotReceived();
float progress = max(0.0f, 0.25f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
progress = max(0.0f, 0.5f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
progress = max(0.0f, 0.75f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- actor.SetRotation(Quaternion(0.0f, Vector3::YAXIS));
+ actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
Degree targetRotationDegrees(90.0f);
Radian targetRotationRadians(targetRotationDegrees);
float delay(0.1f);
- animation.AnimateTo( Property(actor, Actor::Property::ROTATION), AngleAxis(targetRotationDegrees, Vector3::YAXIS), AlphaFunctions::EaseIn, TimePeriod(delay, durationSeconds - delay));
+ animation.AnimateTo( Property(actor, Actor::Property::ORIENTATION), AngleAxis(targetRotationDegrees, Vector3::YAXIS), AlphaFunctions::EaseIn, TimePeriod(delay, durationSeconds - delay));
// Start the animation
animation.Play();
application.SendNotification();
finishCheck.CheckSignalNotReceived();
float progress = max(0.0f, 0.25f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
progress = max(0.0f, 0.5f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
progress = max(0.0f, 0.75f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
AngleAxis aa(Degree(90), Vector3::XAXIS);
- actor.SetRotation(aa.angle, aa.axis);
+ actor.SetOrientation(aa.angle, aa.axis);
Stage::GetCurrent().Add(actor);
application.SendNotification();
Actor actor = Actor::New();
AngleAxis aa(Degree(90), Vector3::XAXIS);
- actor.SetRotation(aa.angle, aa.axis);
+ actor.SetOrientation(aa.angle, aa.axis);
Stage::GetCurrent().Add(actor);
application.SendNotification();
Actor actor = Actor::New();
AngleAxis aa(Degree(90), Vector3::XAXIS);
- actor.SetRotation(aa.angle, aa.axis);
+ actor.SetOrientation(aa.angle, aa.axis);
Stage::GetCurrent().Add(actor);
application.SendNotification();
application.Render(0);
Quaternion start(Radian(aa.angle), aa.axis);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), start, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), start, 0.001f, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
KeyFrames keyFrames = KeyFrames::New();
keyFrames.Add(0.0f, AngleAxis(Degree(60), Vector3::ZAXIS));
- animation.AnimateBetween( Property(actor, Actor::Property::ROTATION), keyFrames );
+ animation.AnimateBetween( Property(actor, Actor::Property::ORIENTATION), keyFrames );
// Start the animation
animation.Play();
Quaternion check = Quaternion::FromAxisAngle(Vector4::ZAXIS, Radian(Degree(60)));
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
finishCheck.CheckSignalReceived();
END_TEST;
}
Actor actor = Actor::New();
AngleAxis aa(Degree(90), Vector3::XAXIS);
- actor.SetRotation(aa.angle, aa.axis);
+ actor.SetOrientation(aa.angle, aa.axis);
application.SendNotification();
application.Render(0);
Stage::GetCurrent().Add(actor);
Quaternion start(Radian(aa.angle), aa.axis);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), start, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), start, 0.001f, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
keyFrames.Add(0.5f, AngleAxis(Degree(120), Vector3::XAXIS));
keyFrames.Add(1.0f, AngleAxis(Degree(120), Vector3::YAXIS));
- animation.AnimateBetween( Property(actor, Actor::Property::ROTATION), keyFrames );
+ animation.AnimateBetween( Property(actor, Actor::Property::ORIENTATION), keyFrames );
// Start the animation
animation.Play();
finishCheck.CheckSignalNotReceived();
Quaternion check(Radian(Degree(60)), Vector3::XAXIS);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 25% progress */);
application.SendNotification();
check = Quaternion::FromAxisAngle(Vector4::XAXIS, Radian(Degree(90)));
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
application.SendNotification();
check = Quaternion::FromAxisAngle(Vector4::XAXIS, Radian(Degree(120)));
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
application.SendNotification();
check = Quaternion::FromAxisAngle(Vector4(0.5f, 0.5f, 0.0f, 0.0f), Radian(Degree(101.5)));
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)+1/* 100% progress */);
application.SendNotification();
check = Quaternion::FromAxisAngle(Vector4::YAXIS, Radian(Degree(120)));
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
// We did expect the animation to finish
Actor actor = Actor::New();
AngleAxis aa(Degree(90), Vector3::XAXIS);
- actor.SetRotation(aa.angle, aa.axis);
+ actor.SetOrientation(aa.angle, aa.axis);
Stage::GetCurrent().Add(actor);
application.SendNotification();
application.Render(0);
Quaternion start(Radian(aa.angle), aa.axis);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), start, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), start, 0.001f, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
keyFrames.Add(0.0f, AngleAxis(Degree(60), Vector3::ZAXIS));
//Cubic interpolation should be ignored for quaternions
- animation.AnimateBetween( Property(actor, Actor::Property::ROTATION), keyFrames, Animation::Cubic );
+ animation.AnimateBetween( Property(actor, Actor::Property::ORIENTATION), keyFrames, Animation::Cubic );
// Start the animation
animation.Play();
Quaternion check = Quaternion::FromAxisAngle(Vector4::ZAXIS, Radian(Degree(60)));
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
finishCheck.CheckSignalReceived();
END_TEST;
}
Actor actor = Actor::New();
AngleAxis aa(Degree(90), Vector3::XAXIS);
- actor.SetRotation(aa.angle, aa.axis);
+ actor.SetOrientation(aa.angle, aa.axis);
application.SendNotification();
application.Render(0);
Stage::GetCurrent().Add(actor);
Quaternion start(Radian(aa.angle), aa.axis);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), start, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), start, 0.001f, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
keyFrames.Add(1.0f, AngleAxis(Degree(120), Vector3::YAXIS));
//Cubic interpolation should be ignored for quaternions
- animation.AnimateBetween( Property(actor, Actor::Property::ROTATION), keyFrames, Animation::Cubic );
+ animation.AnimateBetween( Property(actor, Actor::Property::ORIENTATION), keyFrames, Animation::Cubic );
// Start the animation
animation.Play();
finishCheck.CheckSignalNotReceived();
Quaternion check(Radian(Degree(60)), Vector3::XAXIS);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 25% progress */);
application.SendNotification();
check = Quaternion::FromAxisAngle(Vector4::XAXIS, Radian(Degree(90)));
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
application.SendNotification();
check = Quaternion::FromAxisAngle(Vector4::XAXIS, Radian(Degree(120)));
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
application.SendNotification();
check = Quaternion::FromAxisAngle(Vector4(0.5f, 0.5f, 0.0f, 0.0f), Radian(Degree(101.5)));
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)+1/* 100% progress */);
application.SendNotification();
check = Quaternion::FromAxisAngle(Vector4::YAXIS, Radian(Degree(120)));
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
// We did expect the animation to finish
TestApplication application;
Actor actor = Actor::New();
- actor.SetRotation(Quaternion(0.0f, Vector3::YAXIS));
+ actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- actor.SetRotation(Quaternion(0.0f, Vector3::YAXIS));
+ actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- actor.SetRotation(Quaternion(0.0f, Vector3::YAXIS));
+ actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(0.25f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(0.25f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(0.5f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(0.5f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(0.75f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(0.75f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- actor.SetRotation(Quaternion(0.0f, Vector3::YAXIS));
+ actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(0.25f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(0.25f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(0.5f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(0.5f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(0.75f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(0.75f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- actor.SetRotation(Quaternion(0.0f, Vector3::YAXIS));
+ actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
float progress = max(0.0f, 0.25f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
progress = max(0.0f, 0.5f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
progress = max(0.0f, 0.75f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- actor.SetRotation(Quaternion(0.0f, Vector3::YAXIS));
+ actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
float progress = max(0.0f, 0.25f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
progress = max(0.0f, 0.5f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
progress = max(0.0f, 0.75f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- actor.SetRotation(Quaternion(0.0f, Vector3::YAXIS));
+ actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- actor.SetRotation(Quaternion(0.0f, Vector3::YAXIS));
+ actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- actor.SetRotation(Quaternion(0.0f, Vector3::YAXIS));
+ actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- actor.SetRotation(Quaternion(0.0f, Vector3::YAXIS));
+ actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.25f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.25f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.5f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.5f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.75f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.75f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- actor.SetRotation(Quaternion(0.0f, Vector3::YAXIS));
+ actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.25f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.25f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.5f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.5f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.75f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.75f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- actor.SetRotation(Quaternion(0.0f, Vector3::YAXIS));
+ actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.25f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.25f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.5f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.5f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.75f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.75f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- actor.SetRotation(Quaternion(0.0f, Vector3::YAXIS));
+ actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
float progress = max(0.0f, 0.25f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
progress = max(0.0f, 0.5f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
progress = max(0.0f, 0.75f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- actor.SetRotation(Quaternion(0.0f, Vector3::YAXIS));
+ actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
float progress = max(0.0f, 0.25f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
progress = max(0.0f, 0.5f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
progress = max(0.0f, 0.75f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- actor.SetRotation(Quaternion(0.0f, Vector3::YAXIS));
+ actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
float progress = max(0.0f, 0.25f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
progress = max(0.0f, 0.5f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
progress = max(0.0f, 0.75f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
END_TEST;
}
-int UtcDaliAnimationOpacityBy(void)
-{
- TestApplication application;
- Actor actor = Actor::New();
- float startingOpacity(0.5f);
- actor.SetOpacity(startingOpacity);
- application.SendNotification();
- application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentOpacity(), startingOpacity, TEST_LOCATION );
- Stage::GetCurrent().Add(actor);
-
- // Build the animation
- float durationSeconds(1.0f);
- Animation animation = Animation::New(durationSeconds);
- float relativeOpacity(-0.5f); // target of zero
- animation.OpacityBy(actor, relativeOpacity);
-
- float seventyFivePercentProgress((1.0f - 0.75f) * startingOpacity);
-
- // Start the animation
- animation.Play();
-
- bool signalReceived(false);
- AnimationFinishCheck finishCheck(signalReceived);
- animation.FinishedSignal().Connect(&application, finishCheck);
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*750.0f)/* 75% progress */);
-
- // We didn't expect the animation to finish yet
- application.SendNotification();
- finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOpacity(), seventyFivePercentProgress, TEST_LOCATION );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
-
- // We did expect the animation to finish
- application.SendNotification();
- finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOpacity(), startingOpacity+relativeOpacity, TEST_LOCATION );
-
- // Reset everything
- finishCheck.Reset();
- actor.SetOpacity(startingOpacity);
- application.SendNotification();
- application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentOpacity(), startingOpacity, TEST_LOCATION );
-
- // Repeat with a different (ease-in) alpha function
- animation = Animation::New(durationSeconds);
- animation.OpacityBy(actor, relativeOpacity, AlphaFunctions::EaseIn);
- animation.FinishedSignal().Connect(&application, finishCheck);
- animation.Play();
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*750.0f)/* 75% progress */);
-
- // We didn't expect the animation to finish yet
- application.SendNotification();
- finishCheck.CheckSignalNotReceived();
-
- // The opacity should reduce less, than with a linear alpha function
- float current(actor.GetCurrentOpacity());
- DALI_TEST_CHECK( current < 1.0f );
- DALI_TEST_CHECK( current > seventyFivePercentProgress );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
-
- // We did expect the animation to finish
- application.SendNotification();
- finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOpacity(), startingOpacity+relativeOpacity, TEST_LOCATION );
-
- // Reset everything
- finishCheck.Reset();
- actor.SetOpacity(startingOpacity);
- application.SendNotification();
- application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentOpacity(), startingOpacity, TEST_LOCATION );
-
- // Repeat with a delay
- float delay = 0.5f;
- animation = Animation::New(durationSeconds);
- animation.OpacityBy(actor, relativeOpacity, AlphaFunctions::Linear, delay, durationSeconds - delay);
- animation.FinishedSignal().Connect(&application, finishCheck);
- animation.Play();
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*500.0f)/* 50% animation progress, 0% animator progress */);
-
- // We didn't expect the animation to finish yet
- application.SendNotification();
- finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOpacity(), startingOpacity, TEST_LOCATION );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*500.0f*0.75)/* 7/8 animation progress, 3/4 animator progress */);
-
- // We didn't expect the animation to finish yet
- application.SendNotification();
- finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOpacity(), seventyFivePercentProgress, TEST_LOCATION );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*500.0f*0.25) + 1u/*just beyond the animation duration*/);
-
- // We did expect the animation to finish
- application.SendNotification();
- finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOpacity(), startingOpacity+relativeOpacity, TEST_LOCATION );
- END_TEST;
-}
-
int UtcDaliAnimationOpacityTo(void)
{
TestApplication application;
END_TEST;
}
-int UtcDaliAnimationColorBy(void)
-{
- TestApplication application;
-
- Actor actor = Actor::New();
- actor.SetColor(Color::BLACK);
- application.SendNotification();
- application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::BLACK, TEST_LOCATION );
- Stage::GetCurrent().Add(actor);
-
- // Build the animation
- float durationSeconds(1.0f);
- Animation animation = Animation::New(durationSeconds);
- Vector4 targetColor(Color::GREEN);
- Vector4 relativeColor(Color::GREEN); // Note the alpha is automatically clamped <= 1.0f in world color
- animation.ColorBy(actor, relativeColor);
-
- Vector4 tenPercentProgress(Vector4(0.0f, 0.1f, 0.0f, 1.0f));
- Vector4 twentyPercentProgress(Vector4(0.0f, 0.2f, 0.0f, 1.0f));
-
- // Start the animation
- animation.Play();
-
- bool signalReceived(false);
- AnimationFinishCheck finishCheck(signalReceived);
- animation.FinishedSignal().Connect(&application, finishCheck);
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*100.0f)/* 10% progress */);
-
- // We didn't expect the animation to finish yet
- application.SendNotification();
- finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentWorldColor(), tenPercentProgress, TEST_LOCATION );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*900.0f) + 1u/*just beyond the animation duration*/);
-
- // We did expect the animation to finish
- application.SendNotification();
- finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentWorldColor(), targetColor, TEST_LOCATION );
-
- // Reset everything
- finishCheck.Reset();
- actor.SetColor(Color::BLACK);
- application.SendNotification();
- application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentWorldColor(), Color::BLACK, TEST_LOCATION );
-
- // Repeat with a different (ease-in) alpha function
- animation = Animation::New(durationSeconds);
- animation.ColorBy(actor, relativeColor, AlphaFunctions::EaseIn);
- animation.FinishedSignal().Connect(&application, finishCheck);
- animation.Play();
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*100.0f)/* 10% progress */);
-
- // We didn't expect the animation to finish yet
- application.SendNotification();
- finishCheck.CheckSignalNotReceived();
-
- // The color should have changed less, than with a linear alpha function
- Vector4 current(actor.GetCurrentWorldColor());
- DALI_TEST_CHECK( current.x == 0.0f ); // doesn't change
- DALI_TEST_CHECK( current.y > 0.0f );
- DALI_TEST_CHECK( current.y < tenPercentProgress.y );
- DALI_TEST_CHECK( current.z == 0.0f ); // doesn't change
- DALI_TEST_CHECK( current.w == 1.0f ); // doesn't change
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*900.0f) + 1u/*just beyond the animation duration*/);
-
- // We did expect the animation to finish
- application.SendNotification();
- finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentWorldColor(), targetColor, TEST_LOCATION );
-
- // Reset everything
- finishCheck.Reset();
- actor.SetColor(Color::BLACK);
- application.SendNotification();
- application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentWorldColor(), Color::BLACK, TEST_LOCATION );
-
- // Repeat with a shorter animator duration
- float animatorDuration = 0.5f;
- animation = Animation::New(durationSeconds);
- animation.ColorBy(actor, relativeColor, AlphaFunctions::Linear, 0, animatorDuration);
- animation.FinishedSignal().Connect(&application, finishCheck);
- animation.Play();
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*100.0f)/* 10% animation progress, 20% animator progress */);
-
- // We didn't expect the animation to finish yet
- application.SendNotification();
- finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentWorldColor(), twentyPercentProgress, TEST_LOCATION );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*400.0f)/* 50% animation progress, 100% animator progress */);
-
- // We didn't expect the animation to finish yet
- application.SendNotification();
- finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentWorldColor(), targetColor, TEST_LOCATION );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/);
-
- // We did expect the animation to finish
- application.SendNotification();
- finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentWorldColor(), targetColor, TEST_LOCATION );
- END_TEST;
-}
-
int UtcDaliAnimationColorTo(void)
{
TestApplication application;
path.Sample( 0.0f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 25% progress */);
application.SendNotification();
path.Sample( 0.25f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
application.SendNotification();
path.Sample( 0.5f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
application.SendNotification();
path.Sample( 0.75f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)+1/* 100% progress */);
application.SendNotification();
path.Sample( 1.0f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentRotation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
finishCheck.CheckSignalReceived();
END_TEST;
target.SetPosition(targetPosition);
Constraint cameraOrientationConstraint =
- Constraint::New<Quaternion> ( Actor::Property::ROTATION,
+ Constraint::New<Quaternion> ( Actor::Property::ORIENTATION,
Source( target, Actor::Property::WORLD_POSITION ),
Source( freeLookCameraActor, Actor::Property::WORLD_POSITION ),
- Source( target, Actor::Property::WORLD_ROTATION ),
+ Source( target, Actor::Property::WORLD_ORIENTATION ),
&LookAt );
freeLookCameraActor.ApplyConstraint( cameraOrientationConstraint );
target.SetPosition(targetPosition);
Constraint cameraOrientationConstraint =
- Constraint::New<Quaternion> ( Actor::Property::ROTATION,
+ Constraint::New<Quaternion> ( Actor::Property::ORIENTATION,
Source( target, Actor::Property::WORLD_POSITION ),
Source( freeLookCameraActor, Actor::Property::WORLD_POSITION ),
- Source( target, Actor::Property::WORLD_ROTATION ),
+ Source( target, Actor::Property::WORLD_ORIENTATION ),
&LookAt );
freeLookCameraActor.ApplyConstraint( cameraOrientationConstraint );
Quaternion cameraOrientation( Radian(Degree(180.f)), Vector3::YAXIS );
freeLookCameraActor.SetPosition(cameraOffset);
- freeLookCameraActor.SetRotation(cameraOrientation);
+ freeLookCameraActor.SetOrientation(cameraOrientation);
Actor cameraAnchor = Actor::New();
cameraAnchor.Add(freeLookCameraActor);
Quaternion rotation(Radian(Degree(angle)), Vector3::YAXIS);
freeLookCameraActor.SetPosition( rotation.Rotate( cameraOffset ) );
- cameraAnchor.SetRotation( rotation );
+ cameraAnchor.SetOrientation( rotation );
application.SendNotification();
application.Render();
// Move the actors and try again
Vector3 relativePosition( 5, 5, 5 );
- parent.MoveBy( relativePosition );
+ parent.TranslateBy( relativePosition );
application.SendNotification();
application.Render(0);
Actor parent = Actor::New();
Radian rotationAngle( Degree(90.0f) );
Quaternion rotation( rotationAngle, Vector3::YAXIS );
- parent.SetRotation( rotation );
+ parent.SetOrientation( rotation );
Stage::GetCurrent().Add( parent );
Actor child = Actor::New();
- child.SetRotation( rotation );
+ child.SetOrientation( rotation );
parent.Add( child );
Actor trackingActor = Actor::New();
Stage::GetCurrent().Add( trackingActor );
// The actors should not have a world rotation yet
- DALI_TEST_EQUALS( parent.GetCurrentWorldRotation(), Quaternion(0.0f, Vector3::YAXIS), 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldRotation(), Quaternion(0.0f, Vector3::YAXIS), 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentWorldOrientation(), Quaternion(0.0f, Vector3::YAXIS), 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentWorldOrientation(), Quaternion(0.0f, Vector3::YAXIS), 0.001, TEST_LOCATION );
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( parent.GetCurrentRotation(), rotation, 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentRotation(), rotation, 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( trackingActor.GetCurrentRotation(), Quaternion(0.0f, Vector3::YAXIS), 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentOrientation(), rotation, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentOrientation(), rotation, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( trackingActor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( parent.GetCurrentWorldRotation(), Quaternion( rotationAngle, Vector3::YAXIS ), 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentWorldOrientation(), Quaternion( rotationAngle, Vector3::YAXIS ), 0.001, TEST_LOCATION );
Quaternion previousRotation( rotationAngle * 2.0f, Vector3::YAXIS );
- DALI_TEST_EQUALS( child.GetCurrentWorldRotation(), previousRotation, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentWorldOrientation(), previousRotation, 0.001, TEST_LOCATION );
// Build constraint, to make actor track the world-rotation of another actor
// Note that the world-rotation is always from the previous frame, so the tracking actor will lag behind
- Constraint constraint = Constraint::New<Quaternion>( Actor::Property::ROTATION,
- Source( child, Actor::Property::WORLD_ROTATION ),
+ Constraint constraint = Constraint::New<Quaternion>( Actor::Property::ORIENTATION,
+ Source( child, Actor::Property::WORLD_ORIENTATION ),
EqualToQuaternion() );
trackingActor.ApplyConstraint( constraint );
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( trackingActor.GetCurrentRotation(), previousRotation, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( trackingActor.GetCurrentOrientation(), previousRotation, 0.001, TEST_LOCATION );
// Rotate the actors and try again
parent.RotateBy( rotation );
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( parent.GetCurrentRotation(), rotation * rotation, 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentRotation(), rotation, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentOrientation(), rotation * rotation, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentOrientation(), rotation, 0.001, TEST_LOCATION );
// The tracking actor lags behind
- DALI_TEST_EQUALS( trackingActor.GetCurrentRotation(), previousRotation, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( trackingActor.GetCurrentOrientation(), previousRotation, 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( parent.GetCurrentWorldRotation(), Quaternion( rotationAngle * 2.0f, Vector3::YAXIS ), 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentWorldOrientation(), Quaternion( rotationAngle * 2.0f, Vector3::YAXIS ), 0.001, TEST_LOCATION );
previousRotation = Quaternion( rotationAngle * 3.0f, Vector3::YAXIS );
- DALI_TEST_EQUALS( child.GetCurrentWorldRotation(), previousRotation, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentWorldOrientation(), previousRotation, 0.001, TEST_LOCATION );
// Allow the tracking actor to catch up
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( parent.GetCurrentRotation(), rotation * rotation, 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentRotation(), rotation, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentOrientation(), rotation * rotation, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentOrientation(), rotation, 0.001, TEST_LOCATION );
// The tracking actor catches up!
- DALI_TEST_EQUALS( trackingActor.GetCurrentRotation(), previousRotation, 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( parent.GetCurrentWorldRotation(), Quaternion( rotationAngle * 2.0f, Vector3::YAXIS ), 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldRotation(), previousRotation, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( trackingActor.GetCurrentOrientation(), previousRotation, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentWorldOrientation(), Quaternion( rotationAngle * 2.0f, Vector3::YAXIS ), 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentWorldOrientation(), previousRotation, 0.001, TEST_LOCATION );
END_TEST;
}
//
Quaternion q1 = Quaternion( Math::PI_2, Vector3::XAXIS );
Quaternion q2 = Quaternion( Math::PI_4, Vector3::YAXIS );
- actor1.SetRotation( q1 );
- actor2.SetRotation( q2 );
+ actor1.SetOrientation( q1 );
+ actor2.SetOrientation( q2 );
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( actor1.GetCurrentRotation(), q1, 0.01, TEST_LOCATION );
- DALI_TEST_EQUALS( actor2.GetCurrentRotation(), q2, 0.01, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor1.GetCurrentOrientation(), q1, 0.01, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor2.GetCurrentOrientation(), q2, 0.01, TEST_LOCATION );
- Constraint constraint4 = Constraint::New<Quaternion>( Actor::Property::ROTATION,
- Source( actor1, Actor::Property::ROTATION ),
+ Constraint constraint4 = Constraint::New<Quaternion>( Actor::Property::ORIENTATION,
+ Source( actor1, Actor::Property::ORIENTATION ),
EqualToConstraint() );
constraint4.SetRemoveAction( Constraint::Discard );
actor2.ApplyConstraint( constraint4 );
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( actor2.GetCurrentRotation(), q1, 0.01, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor2.GetCurrentOrientation(), q1, 0.01, TEST_LOCATION );
//
// Check Matrix3 variant
DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::POSITION_X ) );
DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::POSITION_Y ) );
DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::POSITION_Z ) );
- DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::ROTATION ) );
+ DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::ORIENTATION ) );
DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::SCALE ) );
DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::SCALE_X ) );
DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::SCALE_Y ) );
// World-properties are not writable:
DALI_TEST_CHECK( false == actor.IsPropertyWritable( Actor::Property::WORLD_POSITION ) );
- DALI_TEST_CHECK( false == actor.IsPropertyWritable( Actor::Property::WORLD_ROTATION ) );
+ DALI_TEST_CHECK( false == actor.IsPropertyWritable( Actor::Property::WORLD_ORIENTATION ) );
DALI_TEST_CHECK( false == actor.IsPropertyWritable( Actor::Property::WORLD_SCALE ) );
DALI_TEST_CHECK( false == actor.IsPropertyWritable( Actor::Property::WORLD_COLOR ) );
DALI_TEST_CHECK( false == actor.IsPropertyWritable( Actor::Property::WORLD_POSITION_X ) );
DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::POSITION_X ) );
DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::POSITION_Y ) );
DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::POSITION_Z ) );
- DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::ROTATION ) );
+ DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::ORIENTATION ) );
DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::SCALE ) );
DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::SCALE_X ) );
DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::SCALE_Y ) );
// World-properties can not be animated
DALI_TEST_CHECK( false == actor.IsPropertyAnimatable( Actor::Property::WORLD_POSITION ) );
- DALI_TEST_CHECK( false == actor.IsPropertyAnimatable( Actor::Property::WORLD_ROTATION ) );
+ DALI_TEST_CHECK( false == actor.IsPropertyAnimatable( Actor::Property::WORLD_ORIENTATION ) );
DALI_TEST_CHECK( false == actor.IsPropertyAnimatable( Actor::Property::WORLD_SCALE ) );
DALI_TEST_CHECK( false == actor.IsPropertyAnimatable( Actor::Property::WORLD_COLOR ) );
DALI_TEST_CHECK( false == actor.IsPropertyAnimatable( Actor::Property::WORLD_POSITION_X ) );
DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::POSITION_X ) );
DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::POSITION_Y ) );
DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::POSITION_Z ) );
- DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::ROTATION ) );
+ DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::ORIENTATION ) );
DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::SCALE ) );
DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::SCALE_X ) );
DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::SCALE_Y ) );
DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::COLOR_BLUE ) );
DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::COLOR_ALPHA ) );
DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::WORLD_POSITION ) );
- DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::WORLD_ROTATION ) );
+ DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::WORLD_ORIENTATION ) );
DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::WORLD_SCALE ) );
DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::WORLD_COLOR ) );
DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::WORLD_POSITION_X ) );
DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::NAME ) );
DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::SENSITIVE ) );
DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::LEAVE_REQUIRED ) );
- DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::INHERIT_ROTATION ) );
+ DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::INHERIT_ORIENTATION ) );
DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::INHERIT_SCALE ) );
DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::COLOR_MODE ) );
DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::POSITION_INHERITANCE ) );
DALI_TEST_CHECK( Property::VECTOR3 == actor.GetPropertyType( Actor::Property::ANCHOR_POINT ) );
DALI_TEST_CHECK( Property::VECTOR3 == actor.GetPropertyType( Actor::Property::SIZE ) );
DALI_TEST_CHECK( Property::VECTOR3 == actor.GetPropertyType( Actor::Property::POSITION ) );
- DALI_TEST_CHECK( Property::ROTATION == actor.GetPropertyType( Actor::Property::ROTATION ) );
+ DALI_TEST_CHECK( Property::ROTATION == actor.GetPropertyType( Actor::Property::ORIENTATION ) );
DALI_TEST_CHECK( Property::VECTOR3 == actor.GetPropertyType( Actor::Property::SCALE ) );
DALI_TEST_CHECK( Property::BOOLEAN == actor.GetPropertyType( Actor::Property::VISIBLE ) );
DALI_TEST_CHECK( Property::VECTOR4 == actor.GetPropertyType( Actor::Property::COLOR ) );
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetRotation(Dali::Degree(90.0f), Vector3::ZAXIS);
+ actor.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS);
Stage::GetCurrent().Add(actor);
// Render and notify
DALI_TEST_EQUALS( Vector2(5.0f, 5.0f), data.receivedGesture.screenPoint, 0.1, TEST_LOCATION);
// Rotate actor again and render
- actor.SetRotation(Dali::Degree(180.0f), Vector3::ZAXIS);
+ actor.SetOrientation(Dali::Degree(180.0f), Vector3::ZAXIS);
application.SendNotification();
application.Render();
DALI_TEST_EQUALS( Vector2(5.0f, 5.0f), data.receivedGesture.screenPoint, 0.1, TEST_LOCATION);
// Rotate actor again and render
- actor.SetRotation(Dali::Degree(90.0f), Vector3::YAXIS);
+ actor.SetOrientation(Dali::Degree(90.0f), Vector3::YAXIS);
application.SendNotification();
application.Render();
child.SetSize(100.0f, 100.0f);
child.SetAnchorPoint(AnchorPoint::CENTER);
child.SetParentOrigin(ParentOrigin::CENTER);
- child.SetRotation(Dali::Degree(90.0f), Vector3::ZAXIS);
+ child.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS);
parent.Add(child);
TouchEventFunctor touchFunctor;
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetRotation(Dali::Degree(90.0f), Vector3::ZAXIS);
+ actor.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS);
Stage::GetCurrent().Add(actor);
// Render and notify
DALI_TEST_EQUALS(Vector2(8.0f, -5.0f), data.receivedGesture.displacement, 0.01f, TEST_LOCATION); // Actor relative
// Rotate actor again and render a couple of times
- actor.SetRotation(Dali::Degree(180.0f), Vector3::ZAXIS);
+ actor.SetOrientation(Dali::Degree(180.0f), Vector3::ZAXIS);
application.SendNotification();
application.Render();
DALI_TEST_EQUALS(Vector2(-5.0f, -8.0f), data.receivedGesture.displacement, 0.01f, TEST_LOCATION); // Actor relative
// Rotate actor again and render a couple of times
- actor.SetRotation(Dali::Degree(270.0f), Vector3::ZAXIS);
+ actor.SetOrientation(Dali::Degree(270.0f), Vector3::ZAXIS);
application.SendNotification();
application.Render();
child.SetSize(100.0f, 100.0f);
child.SetAnchorPoint(AnchorPoint::CENTER);
child.SetParentOrigin(ParentOrigin::CENTER);
- child.SetRotation(Dali::Degree(90.0f), Vector3::ZAXIS);
+ child.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS);
parent.Add(child);
TouchEventFunctor touchFunctor;
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetRotation(Dali::Degree(90.0f), Vector3::ZAXIS);
+ actor.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS);
Stage::GetCurrent().Add(actor);
// Render and notify a couple of times
DALI_TEST_EQUALS(Vector2(10.0f, 10.0f), data.receivedGesture.screenCenterPoint, 0.01f, TEST_LOCATION);
// Rotate actor again and render and notify
- actor.SetRotation(Dali::Degree(180.0f), Vector3::ZAXIS);
+ actor.SetOrientation(Dali::Degree(180.0f), Vector3::ZAXIS);
application.SendNotification();
application.Render();
DALI_TEST_EQUALS(Vector2(10.0f, 10.0f), data.receivedGesture.screenCenterPoint, 0.01f, TEST_LOCATION);
// Rotate actor again and render and notify
- actor.SetRotation(Dali::Degree(270.0f), Vector3::ZAXIS);
+ actor.SetOrientation(Dali::Degree(270.0f), Vector3::ZAXIS);
application.SendNotification();
application.Render();
child.SetSize(100.0f, 100.0f);
child.SetAnchorPoint(AnchorPoint::CENTER);
child.SetParentOrigin(ParentOrigin::CENTER);
- child.SetRotation(Dali::Degree(90.0f), Vector3::ZAXIS);
+ child.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS);
parent.Add(child);
TouchEventFunctor touchFunctor;
map[ "leave-required" ] = true;
map[ "position-inheritance" ] = "DONT_INHERIT_POSITION";
map[ "draw-mode" ] = "STENCIL";
- map[ "inherit-rotation" ] = false;
+ map[ "inherit-orientation" ] = false;
map[ "inherit-scale" ] = false;
// Default properties
DALI_TEST_EQUALS( handle.GetLeaveRequired(), true, TEST_LOCATION );
DALI_TEST_EQUALS( handle.GetPositionInheritanceMode(), DONT_INHERIT_POSITION, TEST_LOCATION );
DALI_TEST_EQUALS( handle.GetDrawMode(), DrawMode::STENCIL, TEST_LOCATION );
- DALI_TEST_EQUALS( handle.IsRotationInherited(), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( handle.IsOrientationInherited(), false, TEST_LOCATION );
DALI_TEST_EQUALS( handle.IsScaleInherited(), false, TEST_LOCATION );
Stage::GetCurrent().Remove( handle );
actor.SetParentOrigin( ParentOrigin::TOP_RIGHT );
actor.SetSensitive( false );
actor.SetLeaveRequired( true );
- actor.SetInheritRotation( false );
+ actor.SetInheritOrientation( false );
actor.SetInheritScale( false );
actor.SetSizeMode( USE_OWN_SIZE );
actor.SetSizeModeFactor( Vector3::ONE );
DALI_TEST_EQUALS( value.GetValue( "sensitive" ).Get< bool >(), false, TEST_LOCATION );
DALI_TEST_CHECK( value.HasKey( "leave-required" ) );
DALI_TEST_EQUALS( value.GetValue( "leave-required" ).Get< bool >(), true, TEST_LOCATION );
- DALI_TEST_CHECK( value.HasKey( "inherit-rotation" ) );
- DALI_TEST_EQUALS( value.GetValue( "inherit-rotation" ).Get< bool >(), false, TEST_LOCATION );
+ DALI_TEST_CHECK( value.HasKey( "inherit-orientation" ) );
+ DALI_TEST_EQUALS( value.GetValue( "inherit-orientation" ).Get< bool >(), false, TEST_LOCATION );
DALI_TEST_CHECK( value.HasKey( "inherit-scale" ) );
DALI_TEST_EQUALS( value.GetValue( "inherit-scale" ).Get< bool >(), false, TEST_LOCATION );
DALI_TEST_CHECK( value.HasKey( "size-mode-factor" ) );
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetRotation(Dali::Degree(90.0f), Vector3::ZAXIS);
+ actor.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS);
Stage::GetCurrent().Add(actor);
// Render and notify
DALI_TEST_EQUALS( Vector2(5.0f, 5.0f), data.receivedGesture.screenPoint, 0.1, TEST_LOCATION);
// Rotate actor again and render
- actor.SetRotation(Dali::Degree(180.0f), Vector3::ZAXIS);
+ actor.SetOrientation(Dali::Degree(180.0f), Vector3::ZAXIS);
application.SendNotification();
application.Render();
DALI_TEST_EQUALS( Vector2(5.0f, 5.0f), data.receivedGesture.screenPoint, 0.1, TEST_LOCATION);
// Rotate actor again and render
- actor.SetRotation(Dali::Degree(90.0f), Vector3::YAXIS);
+ actor.SetOrientation(Dali::Degree(90.0f), Vector3::YAXIS);
application.SendNotification();
application.Render();
child.SetSize(100.0f, 100.0f);
child.SetAnchorPoint(AnchorPoint::CENTER);
child.SetParentOrigin(ParentOrigin::CENTER);
- child.SetRotation(Dali::Degree(90.0f), Vector3::ZAXIS);
+ child.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS);
parent.Add(child);
TouchEventFunctor touchFunctor;
DALI_PROPERTY( "world-position-x", FLOAT, false, false, true, Dali::Actor::Property::WORLD_POSITION_X )
DALI_PROPERTY( "world-position-y", FLOAT, false, false, true, Dali::Actor::Property::WORLD_POSITION_Y )
DALI_PROPERTY( "world-position-z", FLOAT, false, false, true, Dali::Actor::Property::WORLD_POSITION_Z )
-DALI_PROPERTY( "rotation", ROTATION, true, true, true, Dali::Actor::Property::ROTATION )
-DALI_PROPERTY( "world-rotation", ROTATION, false, false, true, Dali::Actor::Property::WORLD_ROTATION )
+DALI_PROPERTY( "orientation", ROTATION, true, true, true, Dali::Actor::Property::ORIENTATION )
+DALI_PROPERTY( "world-orientation", ROTATION, false, false, true, Dali::Actor::Property::WORLD_ORIENTATION )
DALI_PROPERTY( "scale", VECTOR3, true, true, true, Dali::Actor::Property::SCALE )
DALI_PROPERTY( "scale-x", FLOAT, true, true, true, Dali::Actor::Property::SCALE_X )
DALI_PROPERTY( "scale-y", FLOAT, true, true, true, Dali::Actor::Property::SCALE_Y )
DALI_PROPERTY( "name", STRING, true, false, false, Dali::Actor::Property::NAME )
DALI_PROPERTY( "sensitive", BOOLEAN, true, false, false, Dali::Actor::Property::SENSITIVE )
DALI_PROPERTY( "leave-required", BOOLEAN, true, false, false, Dali::Actor::Property::LEAVE_REQUIRED )
-DALI_PROPERTY( "inherit-rotation", BOOLEAN, true, false, false, Dali::Actor::Property::INHERIT_ROTATION )
+DALI_PROPERTY( "inherit-orientation", BOOLEAN, true, false, false, Dali::Actor::Property::INHERIT_ORIENTATION )
DALI_PROPERTY( "inherit-scale", BOOLEAN, true, false, false, Dali::Actor::Property::INHERIT_SCALE )
DALI_PROPERTY( "color-mode", STRING, true, false, false, Dali::Actor::Property::COLOR_MODE )
DALI_PROPERTY( "position-inheritance", STRING, true, false, false, Dali::Actor::Property::POSITION_INHERITANCE )
}
}
-void Actor::MoveBy(const Vector3& distance)
+void Actor::TranslateBy(const Vector3& distance)
{
if( NULL != mNode )
{
return mPositionInheritanceMode;
}
-void Actor::SetRotation(const Radian& angle, const Vector3& axis)
+void Actor::SetOrientation(const Radian& angle, const Vector3& axis)
{
Vector4 normalizedAxis(axis.x, axis.y, axis.z, 0.0f);
normalizedAxis.Normalize();
- Quaternion rotation(Quaternion::FromAxisAngle(normalizedAxis, angle));
+ Quaternion orientation(Quaternion::FromAxisAngle(normalizedAxis, angle));
- SetRotation(rotation);
+ SetOrientation(orientation);
}
-void Actor::SetRotation(const Quaternion& rotation)
+void Actor::SetOrientation(const Quaternion& orientation)
{
if( NULL != mNode )
{
// mNode is being used in a separate thread; queue a message to set the value & base value
- SceneGraph::NodePropertyMessage<Quaternion>::Send( mStage->GetUpdateManager(), mNode, &mNode->mRotation, &AnimatableProperty<Quaternion>::Bake, rotation );
+ SceneGraph::NodePropertyMessage<Quaternion>::Send( mStage->GetUpdateManager(), mNode, &mNode->mOrientation, &AnimatableProperty<Quaternion>::Bake, orientation );
}
}
if( NULL != mNode )
{
// mNode is being used in a separate thread; queue a message to set the value & base value
- SceneGraph::NodePropertyMessage<Quaternion>::Send( mStage->GetUpdateManager(), mNode, &mNode->mRotation, &AnimatableProperty<Quaternion>::BakeRelative, Quaternion(angle, axis) );
+ SceneGraph::NodePropertyMessage<Quaternion>::Send( mStage->GetUpdateManager(), mNode, &mNode->mOrientation, &AnimatableProperty<Quaternion>::BakeRelative, Quaternion(angle, axis) );
}
}
if( NULL != mNode )
{
// mNode is being used in a separate thread; queue a message to set the value & base value
- SceneGraph::NodePropertyMessage<Quaternion>::Send( mStage->GetUpdateManager(), mNode, &mNode->mRotation, &AnimatableProperty<Quaternion>::BakeRelative, relativeRotation );
+ SceneGraph::NodePropertyMessage<Quaternion>::Send( mStage->GetUpdateManager(), mNode, &mNode->mOrientation, &AnimatableProperty<Quaternion>::BakeRelative, relativeRotation );
}
}
-const Quaternion& Actor::GetCurrentRotation() const
+const Quaternion& Actor::GetCurrentOrientation() const
{
if( NULL != mNode )
{
// mNode is being used in a separate thread; copy the value from the previous update
- return mNode->GetRotation(mStage->GetEventBufferIndex());
+ return mNode->GetOrientation(mStage->GetEventBufferIndex());
}
return Quaternion::IDENTITY;
}
-const Quaternion& Actor::GetCurrentWorldRotation() const
+const Quaternion& Actor::GetCurrentWorldOrientation() const
{
if( NULL != mNode )
{
// mNode is being used in a separate thread; copy the value from the previous update
- return mNode->GetWorldRotation( mStage->GetEventBufferIndex() );
+ return mNode->GetWorldOrientation( mStage->GetEventBufferIndex() );
}
return Quaternion::IDENTITY;
if( NULL != mNode )
{
// World matrix is no longer updated unless there is something observing the node.
- // Need to calculate it from node's world position, rotation and scale:
+ // Need to calculate it from node's world position, orientation and scale:
BufferIndex updateBufferIndex = mStage->GetEventBufferIndex();
Matrix worldMatrix(false);
worldMatrix.SetTransformComponents( mNode->GetWorldScale( updateBufferIndex ),
- mNode->GetWorldRotation( updateBufferIndex ),
+ mNode->GetWorldOrientation( updateBufferIndex ),
mNode->GetWorldPosition( updateBufferIndex ) );
return worldMatrix;
}
}
}
-void Actor::OpacityBy(float relativeOpacity)
-{
- if( NULL != mNode )
- {
- // mNode is being used in a separate thread; queue a message to set the value & base value
- SceneGraph::NodePropertyComponentMessage<Vector4>::Send( mStage->GetUpdateManager(), mNode, &mNode->mColor, &AnimatableProperty<Vector4>::BakeWRelative, relativeOpacity );
- }
-}
-
float Actor::GetCurrentOpacity() const
{
if( NULL != mNode )
}
}
-void Actor::ColorBy(const Vector4& relativeColor)
-{
- if( NULL != mNode )
- {
- // mNode is being used in a separate thread; queue a message to set the value & base value
- SceneGraph::NodePropertyMessage<Vector4>::Send( mStage->GetUpdateManager(), mNode, &mNode->mColor, &AnimatableProperty<Vector4>::BakeRelative, relativeColor );
- }
-}
-
const Vector4& Actor::GetCurrentColor() const
{
if( NULL != mNode )
return Color::WHITE;
}
-void Actor::SetInheritRotation(bool inherit)
+void Actor::SetInheritOrientation(bool inherit)
{
// non animateable so keep local copy
- mInheritRotation = inherit;
+ mInheritOrientation = inherit;
if( NULL != mNode )
{
// mNode is being used in a separate thread; queue a message to set the value
- SetInheritRotationMessage( mStage->GetUpdateInterface(), *mNode, inherit );
+ SetInheritOrientationMessage( mStage->GetUpdateInterface(), *mNode, inherit );
}
}
-bool Actor::IsRotationInherited() const
+bool Actor::IsOrientationInherited() const
{
- return mInheritRotation;
+ return mInheritOrientation;
}
void Actor::SetSizeMode(SizeMode mode)
// Calculate the ModelView matrix
Matrix modelView(false/*don't init*/);
// need to use the components as world matrix is only updated for actors that need it
- modelView.SetTransformComponents( mNode->GetWorldScale(bufferIndex), mNode->GetWorldRotation(bufferIndex), mNode->GetWorldPosition(bufferIndex) );
+ modelView.SetTransformComponents( mNode->GetWorldScale(bufferIndex), mNode->GetWorldOrientation(bufferIndex), mNode->GetWorldPosition(bufferIndex) );
Matrix::Multiply(modelView, modelView, viewMatrix);
// Calculate the inverted ModelViewProjection matrix; this will be used for 2 unprojects
// Calculate the inverse of Model matrix
Matrix invModelMatrix(false/*don't init*/);
// need to use the components as world matrix is only updated for actors that need it
- invModelMatrix.SetInverseTransformComponents( mNode->GetWorldScale(bufferIndex), mNode->GetWorldRotation(bufferIndex), mNode->GetWorldPosition(bufferIndex) );
+ invModelMatrix.SetInverseTransformComponents( mNode->GetWorldScale(bufferIndex), mNode->GetWorldOrientation(bufferIndex), mNode->GetWorldPosition(bufferIndex) );
Vector4 rayOriginLocal(invModelMatrix * rayOrigin);
Vector4 rayDirLocal(invModelMatrix * rayDir - invModelMatrix.GetTranslation());
mDerivedRequiresHover( false ),
mDerivedRequiresMouseWheelEvent( false ),
mOnStageSignalled( false ),
- mInheritRotation( true ),
+ mInheritOrientation( true ),
mInheritScale( true ),
mDrawMode( DrawMode::NORMAL ),
mPositionInheritanceMode( Node::DEFAULT_POSITION_INHERITANCE_MODE ),
break;
}
- case Dali::Actor::Property::ROTATION:
+ case Dali::Actor::Property::ORIENTATION:
{
- SetRotation( property.Get<Quaternion>() );
+ SetOrientation( property.Get<Quaternion>() );
break;
}
break;
}
- case Dali::Actor::Property::INHERIT_ROTATION:
+ case Dali::Actor::Property::INHERIT_ORIENTATION:
{
- SetInheritRotation( property.Get<bool>() );
+ SetInheritOrientation( property.Get<bool>() );
break;
}
break;
}
- case Dali::Actor::Property::ROTATION:
+ case Dali::Actor::Property::ORIENTATION:
{
- value = GetCurrentRotation();
+ value = GetCurrentOrientation();
break;
}
- case Dali::Actor::Property::WORLD_ROTATION:
+ case Dali::Actor::Property::WORLD_ORIENTATION:
{
- value = GetCurrentWorldRotation();
+ value = GetCurrentWorldOrientation();
break;
}
break;
}
- case Dali::Actor::Property::INHERIT_ROTATION:
+ case Dali::Actor::Property::INHERIT_ORIENTATION:
{
- value = IsRotationInherited();
+ value = IsOrientationInherited();
break;
}
property = &mNode->mPosition;
break;
- case Dali::Actor::Property::ROTATION:
- property = &mNode->mRotation;
+ case Dali::Actor::Property::ORIENTATION:
+ property = &mNode->mOrientation;
break;
case Dali::Actor::Property::SCALE:
property = &mNode->mWorldPosition;
break;
- case Dali::Actor::Property::ROTATION:
- property = &mNode->mRotation;
+ case Dali::Actor::Property::ORIENTATION:
+ property = &mNode->mOrientation;
break;
- case Dali::Actor::Property::WORLD_ROTATION:
- property = &mNode->mWorldRotation;
+ case Dali::Actor::Property::WORLD_ORIENTATION:
+ property = &mNode->mWorldOrientation;
break;
case Dali::Actor::Property::SCALE:
void SetZ(float z);
/**
- * Move an actor relative to its existing position.
+ * Translate an actor relative to its existing position.
* @param[in] distance The actor will move by this distance.
*/
- void MoveBy(const Vector3& distance);
+ void TranslateBy(const Vector3& distance);
/**
* Retrieve the position of the Actor.
PositionInheritanceMode GetPositionInheritanceMode() const;
/**
- * Sets the rotation of the Actor.
- * @param [in] angleRadians The new rotation angle in radians.
- * @param [in] axis The new axis of rotation.
+ * Sets the orientation of the Actor.
+ * @param [in] angleRadians The new orientation angle in radians.
+ * @param [in] axis The new axis of orientation.
*/
- void SetRotation(const Radian& angleRadians, const Vector3& axis);
+ void SetOrientation(const Radian& angleRadians, const Vector3& axis);
/**
- * Sets the rotation of the Actor.
- * @param [in] rotation The new rotation.
+ * Sets the orientation of the Actor.
+ * @param [in] orientation The new orientation.
*/
- void SetRotation(const Quaternion& rotation);
+ void SetOrientation(const Quaternion& orientation);
/**
* Rotate an actor around its existing rotation axis.
void RotateBy(const Quaternion& relativeRotation);
/**
- * Retreive the Actor's rotation.
- * @return the rotation.
+ * Retreive the Actor's orientation.
+ * @return the orientation.
*/
- const Quaternion& GetCurrentRotation() const;
+ const Quaternion& GetCurrentOrientation() const;
/**
* Set whether a child actor inherits it's parent's orientation. Default is to inherit.
- * Switching this off means that using SetRotation() sets the actor's world orientation.
+ * Switching this off means that using SetOrientation() sets the actor's world orientation.
* @param[in] inherit - true if the actor should inherit orientation, false otherwise.
*/
- void SetInheritRotation(bool inherit);
+ void SetInheritOrientation(bool inherit);
/**
* Returns whether the actor inherit's it's parent's orientation.
* @return true if the actor inherit's it's parent orientation, false if it uses world orientation.
*/
- bool IsRotationInherited() const;
+ bool IsOrientationInherited() const;
/**
* @brief Defines how a child actors size is affected by its parents size.
const Vector3& GetSizeModeFactor() const;
/**
- * @copydoc Dali::Actor::GetCurrentWorldRotation()
+ * @copydoc Dali::Actor::GetCurrentWorldOrientation()
*/
- const Quaternion& GetCurrentWorldRotation() const;
+ const Quaternion& GetCurrentWorldOrientation() const;
/**
* Sets a scale factor applied to an actor.
void SetOpacity(float opacity);
/**
- * Apply a relative opacity change to an actor.
- * @param[in] relativeOpacity The opacity to combine with the actors existing opacity.
- */
- void OpacityBy(float relativeOpacity);
-
- /**
* Retrieve the actor's opacity.
* @return The actor's opacity.
*/
void SetColorBlue( float blue );
/**
- * Apply a relative color change to an actor.
- * @param[in] relativeColor The color to combine with the actors existing color.
- */
- void ColorBy(const Vector4& relativeColor);
-
- /**
* Retrieve the actor's color.
* @return The color.
*/
bool mDerivedRequiresHover : 1; ///< Whether the derived actor type requires hover event signals
bool mDerivedRequiresMouseWheelEvent : 1; ///< Whether the derived actor type requires mouse wheel event signals
bool mOnStageSignalled : 1; ///< Set to true before OnStageConnection signal is emitted, and false before OnStageDisconnection
- bool mInheritRotation : 1; ///< Cached: Whether the parent's rotation should be inherited.
+ bool mInheritOrientation : 1; ///< Cached: Whether the parent's orientation should be inherited.
bool mInheritScale : 1; ///< Cached: Whether the parent's scale should be inherited.
DrawMode::Type mDrawMode : 2; ///< Cached: How the actor and its children should be drawn
PositionInheritanceMode mPositionInheritanceMode : 2; ///< Cached: Determines how position is inherited
// By default Actors face in the positive Z direction in world space
// CameraActors should face in the negative Z direction, towards the other actors
- actor->SetRotation( Quaternion( Math::PI, Vector3::YAXIS ) );
+ actor->SetOrientation( Quaternion( Math::PI, Vector3::YAXIS ) );
return actor;
}
{
//Rotation animation
AddAnimatorConnector( AnimatorConnector<Quaternion>::New( actor,
- Dali::Actor::Property::ROTATION,
+ Dali::Actor::Property::ORIENTATION,
Property::INVALID_COMPONENT_INDEX,
new PathRotationFunctor( pathCopy, forward ),
alpha,
ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
AddAnimatorConnector( AnimatorConnector<Quaternion>::New( actor,
- Dali::Actor::Property::ROTATION,
+ Dali::Actor::Property::ORIENTATION,
Property::INVALID_COMPONENT_INDEX,
new RotateByAngleAxis(angle, axis),
alpha,
ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
AddAnimatorConnector( AnimatorConnector<Quaternion>::New( actor,
- Dali::Actor::Property::ROTATION,
+ Dali::Actor::Property::ORIENTATION,
Property::INVALID_COMPONENT_INDEX,
new RotateToQuaternion(rotation),
alpha,
if( mViewMode == MONO )
{
- mDefaultCamera->SetRotation( Degree( 180.0f ), Vector3::YAXIS );
+ mDefaultCamera->SetOrientation( Degree( 180.0f ), Vector3::YAXIS );
mRenderTaskList->GetTask(0).SetSourceActor( Dali::Actor() );
//Create camera and RenderTask for left eye
mRightRenderTask.Reset();
mRightCamera.Reset();
- mDefaultCamera->SetRotation( Degree( 0.0f ), Vector3::YAXIS );
+ mDefaultCamera->SetOrientation( Degree( 0.0f ), Vector3::YAXIS );
mDefaultCamera->SetType( Dali::Camera::LOOK_AT_TARGET );
mRenderTaskList->GetTask(0).SetSourceActor( Dali::Layer(mRootLayer.Get()) );
mLeftCamera->SetPerspectiveProjection( mSize, Vector2( 0.0f,stereoBase) );
mLeftCamera->SetAspectRatio( aspect );
- mLeftCamera->SetRotation( Degree(-90.0f), Vector3::ZAXIS );
+ mLeftCamera->SetOrientation( Degree(-90.0f), Vector3::ZAXIS );
mLeftCamera->SetPosition( Vector3( stereoBase, 0.0f, 0.0f ) );
mLeftRenderTask.SetViewport( Viewport(0, mSize.height * 0.5f, mSize.width, mSize.height * 0.5f) );
mRightCamera->SetPerspectiveProjection( mSize, Vector2( 0.0, -stereoBase) );
mRightCamera->SetAspectRatio( aspect );
- mRightCamera->SetRotation( Degree(-90.0f), Vector3::ZAXIS );
+ mRightCamera->SetOrientation( Degree(-90.0f), Vector3::ZAXIS );
mRightCamera->SetPosition( Vector3(-stereoBase, 0.0f, 0.0f ) );
mRightRenderTask.SetViewport( Viewport(0, 0, mSize.width, mSize.height * 0.5f ) );
mLeftCamera->SetPerspectiveProjection( Size( mSize.x * 0.5f, mSize.y ), Vector2(stereoBase,0.0f) );
mLeftCamera->SetFieldOfView( fov );
- mLeftCamera->SetRotation( Degree(0.0f), Vector3::ZAXIS );
+ mLeftCamera->SetOrientation( Degree(0.0f), Vector3::ZAXIS );
mLeftCamera->SetPosition( Vector3( stereoBase, 0.0f, 0.0f ) );
mLeftRenderTask.SetViewport( Viewport(0, 0, mSize.width * 0.5f, mSize.height ) );
mRightCamera->SetPerspectiveProjection( Size( mSize.x * 0.5f, mSize.y ), Vector2(-stereoBase,0.0f) );
mRightCamera->SetFieldOfView( fov );
- mRightCamera->SetRotation( Degree(0.0f), Vector3::ZAXIS );
+ mRightCamera->SetOrientation( Degree(0.0f), Vector3::ZAXIS );
mRightCamera->SetPosition( Vector3( -stereoBase, 0.0f, 0.0f ) );
mRightRenderTask.SetViewport( Viewport(mSize.width * 0.5f, 0, mSize.width * 0.5f, mSize.height ) );
const BufferIndex bufferIndex( mWorld.GetBufferIndex() );
mNode.BakePosition(bufferIndex, scaledPosition);
- mNode.BakeRotation(bufferIndex, rotation);
+ mNode.BakeOrientation(bufferIndex, rotation);
if( Dali::DynamicsBodyConfig::RIGID == mBody->GetType() )
{
if ( nodeDirtyFlags & TransformFlag )
{
rootNode.SetWorldPosition( updateBufferIndex, rootNode.GetPosition( updateBufferIndex ) );
- rootNode.SetWorldRotation( updateBufferIndex, rootNode.GetRotation( updateBufferIndex ) );
+ rootNode.SetWorldOrientation( updateBufferIndex, rootNode.GetOrientation( updateBufferIndex ) );
rootNode.SetWorldScale ( updateBufferIndex, rootNode.GetScale ( updateBufferIndex ) );
}
else
{
// Copy previous value, in case they changed in the previous frame
- rootNode.CopyPreviousWorldRotation( updateBufferIndex );
+ rootNode.CopyPreviousWorldOrientation( updateBufferIndex );
rootNode.CopyPreviousWorldScale( updateBufferIndex );
rootNode.CopyPreviousWorldPosition( updateBufferIndex );
}
// With a non-central anchor-point, the world rotation and scale affects the world position.
// Therefore the world rotation & scale must be updated before the world position.
- if( node.IsRotationInherited() )
+ if( node.IsOrientationInherited() )
{
- node.InheritWorldRotation( updateBufferIndex );
+ node.InheritWorldOrientation( updateBufferIndex );
}
else
{
- node.SetWorldRotation( updateBufferIndex, node.GetRotation( updateBufferIndex ) );
+ node.SetWorldOrientation( updateBufferIndex, node.GetOrientation( updateBufferIndex ) );
}
if( node.IsScaleInherited() )
else
{
// Copy inherited values, if those changed in the previous frame
- node.CopyPreviousWorldRotation( updateBufferIndex );
+ node.CopyPreviousWorldOrientation( updateBufferIndex );
node.CopyPreviousWorldScale( updateBufferIndex );
node.CopyPreviousWorldPosition( updateBufferIndex );
node.CopyPreviousSize( updateBufferIndex );
{
node.SetWorldMatrix( updateBufferIndex,
node.GetWorldScale(updateBufferIndex),
- node.GetWorldRotation(updateBufferIndex) / node.GetRotation(updateBufferIndex),
+ node.GetWorldOrientation(updateBufferIndex) / node.GetOrientation(updateBufferIndex),
node.GetWorldPosition(updateBufferIndex) - node.GetPosition(updateBufferIndex) );
}
else
{
node.SetWorldMatrix( updateBufferIndex,
node.GetWorldScale(updateBufferIndex),
- node.GetWorldRotation(updateBufferIndex),
+ node.GetWorldOrientation(updateBufferIndex),
node.GetWorldPosition(updateBufferIndex) );
}
}
{
node.SetWorldMatrix( updateBufferIndex,
node.GetWorldScale(updateBufferIndex) * scaling,
- node.GetWorldRotation(updateBufferIndex) / node.GetRotation(updateBufferIndex),
+ node.GetWorldOrientation(updateBufferIndex) / node.GetOrientation(updateBufferIndex),
node.GetWorldPosition(updateBufferIndex) - node.GetPosition(updateBufferIndex) );
}
else
{
node.SetWorldMatrix( updateBufferIndex,
node.GetWorldScale(updateBufferIndex) * scaling,
- node.GetWorldRotation(updateBufferIndex),
+ node.GetWorldOrientation(updateBufferIndex),
node.GetWorldPosition(updateBufferIndex) );
}
}
{
node.SetWorldMatrix( updateBufferIndex,
node.GetWorldScale(updateBufferIndex),
- node.GetWorldRotation(updateBufferIndex) / node.GetRotation(updateBufferIndex),
+ node.GetWorldOrientation(updateBufferIndex) / node.GetOrientation(updateBufferIndex),
node.GetWorldPosition(updateBufferIndex) - node.GetPosition(updateBufferIndex) );
}
else
{
node.SetWorldMatrix( updateBufferIndex,
node.GetWorldScale(updateBufferIndex),
- node.GetWorldRotation(updateBufferIndex),
+ node.GetWorldOrientation(updateBufferIndex),
node.GetWorldPosition(updateBufferIndex) );
}
}
const Vector3& position = node.GetPosition(updateBufferIndex);
const Vector3& scale = node.GetScale(updateBufferIndex);
const Vector3& fullPos = node.GetWorldPosition(updateBufferIndex);
- const Quaternion& rotation = node.GetRotation(updateBufferIndex);
+ const Quaternion& rotation = node.GetOrientation(updateBufferIndex);
Vector3 axis;
float angle;
rotation.ToAxisAngle(axis, angle);
<< " Anchor: " << node.GetAnchorPoint()
<< " Size: " << node.GetSize(bufferIndex)
<< " Pos: " << node.GetPosition(bufferIndex)
- << " Rot: " << node.GetRotation(bufferIndex)
+ << " Ori: " << node.GetOrientation(bufferIndex)
<< " Scale: " << node.GetScale(bufferIndex)
<< " Color: " << node.GetColor(bufferIndex)
<< " Visible: " << node.IsVisible(bufferIndex)
<< " World Pos: " << node.GetWorldPosition(bufferIndex)
- << " World Rot: " << node.GetWorldRotation(bufferIndex)
+ << " World Ori: " << node.GetWorldOrientation(bufferIndex)
<< " World Scale: " << node.GetWorldScale(bufferIndex)
<< " World Color: " << node.GetWorldColor(bufferIndex)
<< " World Matrix: " << node.GetWorldMatrix(bufferIndex)
case Dali::Camera::FREE_LOOK:
{
Matrix& viewMatrix = mViewMatrix.Get( updateBufferIndex );
- viewMatrix.SetInverseTransformComponents( Vector3::ONE, owningNode.GetWorldRotation( updateBufferIndex ),
+ viewMatrix.SetInverseTransformComponents( Vector3::ONE, owningNode.GetWorldOrientation( updateBufferIndex ),
owningNode.GetWorldPosition( updateBufferIndex ) );
mViewMatrix.SetDirty( updateBufferIndex );
break;
{
Matrix& viewMatrix = mViewMatrix.Get( updateBufferIndex );
LookAt( viewMatrix, owningNode.GetWorldPosition( updateBufferIndex ), mTargetPosition,
- owningNode.GetWorldRotation( updateBufferIndex ).Rotate( Vector3::YAXIS ) );
+ owningNode.GetWorldOrientation( updateBufferIndex ).Rotate( Vector3::YAXIS ) );
mViewMatrix.SetDirty( updateBufferIndex );
break;
}
mAnchorPoint( AnchorPoint::DEFAULT ),
mSize(), // zero initialized by default
mPosition(), // zero initialized by default
- mRotation(), // initialized to identity by default
+ mOrientation(), // initialized to identity by default
mScale( Vector3::ONE ),
mVisible( true ),
mColor( Color::WHITE ),
mWorldPosition(), // zero initialized by default
- mWorldRotation(), // initialized to identity by default
+ mWorldOrientation(), // initialized to identity by default
mWorldScale( Vector3::ONE ),
mWorldMatrix(),
mWorldColor( Color::WHITE ),
mSizeModeFactor( Vector3::ONE ),
mDirtyFlags(AllFlags),
mIsRoot( false ),
- mInheritRotation( true ),
+ mInheritOrientation( true ),
mInheritScale( true ),
mTransmitGeometryScaling( false ),
mInhibitLocalTransform( false ),
// Check whether the transform related properties have changed
if( !sizeFlag ||
!mPosition.IsClean() ||
- !mRotation.IsClean() ||
+ !mOrientation.IsClean() ||
!mScale.IsClean() ||
mParentOrigin.InputChanged() || // parent origin and anchor point rarely change
mAnchorPoint.InputChanged() )
// Reset default properties
mSize.ResetToBaseValue( updateBufferIndex );
mPosition.ResetToBaseValue( updateBufferIndex );
- mRotation.ResetToBaseValue( updateBufferIndex );
+ mOrientation.ResetToBaseValue( updateBufferIndex );
mScale.ResetToBaseValue( updateBufferIndex );
mVisible.ResetToBaseValue( updateBufferIndex );
mColor.ResetToBaseValue( updateBufferIndex );
/**
* Sets the position of the node derived from the position of all its parents.
* This method should only be called when the parent's world position is up-to-date.
- * With a non-central anchor-point, the local rotation and scale affects the world position.
- * Therefore the world rotation & scale must be updated before the world position.
+ * With a non-central anchor-point, the local orientation and scale affects the world position.
+ * Therefore the world orientation & scale must be updated before the world position.
* @pre The node has a parent.
* @param[in] updateBufferIndex The current update buffer index.
*/
finalPosition *= mParent->GetSize(updateBufferIndex);
finalPosition += mPosition[updateBufferIndex];
finalPosition *= mParent->GetWorldScale(updateBufferIndex);
- const Quaternion& parentWorldRotation = mParent->GetWorldRotation(updateBufferIndex);
- if(!parentWorldRotation.IsIdentity())
+ const Quaternion& parentWorldOrientation = mParent->GetWorldOrientation(updateBufferIndex);
+ if(!parentWorldOrientation.IsIdentity())
{
- finalPosition *= parentWorldRotation;
+ finalPosition *= parentWorldOrientation;
}
// check if a node needs to be offsetted locally (only applies when AnchorPoint is not central)
scale.z = -scale.z;
}
- // If the anchor-point is not central, then position is affected by the local rotation & scale
+ // If the anchor-point is not central, then position is affected by the local orientation & scale
localOffset *= scale;
- const Quaternion& localWorldRotation = mWorldRotation[updateBufferIndex];
- if(!localWorldRotation.IsIdentity())
+ const Quaternion& localWorldOrientation = mWorldOrientation[updateBufferIndex];
+ if(!localWorldOrientation.IsIdentity())
{
- localOffset *= localWorldRotation;
+ localOffset *= localWorldOrientation;
}
finalPosition += localOffset;
}
}
/**
- * Retrieve the local rotation of the node, relative to its parent.
+ * Retrieve the local orientation of the node, relative to its parent.
* @param[in] bufferIndex The buffer to read from.
- * @return The local rotation.
+ * @return The local orientation.
*/
- const Quaternion& GetRotation(BufferIndex bufferIndex) const
+ const Quaternion& GetOrientation(BufferIndex bufferIndex) const
{
- return mRotation[bufferIndex];
+ return mOrientation[bufferIndex];
}
/**
- * Sets both the local & base rotations of the node.
+ * Sets both the local & base orientations of the node.
* @param[in] updateBufferIndex The current update buffer index.
- * @param[in] rotation The new local & base rotation.
+ * @param[in] orientation The new local & base orientation.
*/
- void BakeRotation(BufferIndex updateBufferIndex, const Quaternion& rotation)
+ void BakeOrientation(BufferIndex updateBufferIndex, const Quaternion& orientation)
{
- mRotation.Bake( updateBufferIndex, rotation );
+ mOrientation.Bake( updateBufferIndex, orientation );
}
/**
- * Sets the rotation of the node derived from the rotation of all its parents.
+ * Sets the orientation of the node derived from the rotation of all its parents.
* @param[in] updateBufferIndex The current update buffer index.
- * @param[in] rotation The world rotation.
+ * @param[in] orientation The world orientation.
*/
- void SetWorldRotation( BufferIndex updateBufferIndex, const Quaternion& rotation )
+ void SetWorldOrientation( BufferIndex updateBufferIndex, const Quaternion& orientation )
{
- mWorldRotation.Set( updateBufferIndex, rotation );
+ mWorldOrientation.Set( updateBufferIndex, orientation );
}
/**
- * Sets the rotation of the node derived from the rotation of all its parents.
- * This method should only be called when the parents world rotation is up-to-date.
+ * Sets the orientation of the node derived from the rotation of all its parents.
+ * This method should only be called when the parents world orientation is up-to-date.
* @pre The node has a parent.
* @param[in] updateBufferIndex The current update buffer index.
*/
- void InheritWorldRotation( BufferIndex updateBufferIndex )
+ void InheritWorldOrientation( BufferIndex updateBufferIndex )
{
DALI_ASSERT_DEBUG(mParent != NULL);
- const Quaternion& localRotation = mRotation[updateBufferIndex];
+ const Quaternion& localOrientation = mOrientation[updateBufferIndex];
- if(localRotation.IsIdentity())
+ if(localOrientation.IsIdentity())
{
- mWorldRotation.Set( updateBufferIndex, mParent->GetWorldRotation(updateBufferIndex) );
+ mWorldOrientation.Set( updateBufferIndex, mParent->GetWorldOrientation(updateBufferIndex) );
}
else
{
- Quaternion finalRotation( mParent->GetWorldRotation(updateBufferIndex) );
- finalRotation *= localRotation;
- mWorldRotation.Set( updateBufferIndex, finalRotation );
+ Quaternion finalOrientation( mParent->GetWorldOrientation(updateBufferIndex) );
+ finalOrientation *= localOrientation;
+ mWorldOrientation.Set( updateBufferIndex, finalOrientation );
}
}
/**
- * Copies the previous inherited rotation, if this changed in the previous frame.
- * This method should be called instead of InheritWorldRotation i.e. if the inherited rotation
+ * Copies the previous inherited orientation, if this changed in the previous frame.
+ * This method should be called instead of InheritWorldOrientation i.e. if the inherited orientation
* does not need to be recalculated in the current frame.
* @param[in] updateBufferIndex The current update buffer index.
*/
- void CopyPreviousWorldRotation( BufferIndex updateBufferIndex )
+ void CopyPreviousWorldOrientation( BufferIndex updateBufferIndex )
{
- mWorldRotation.CopyPrevious( updateBufferIndex );
+ mWorldOrientation.CopyPrevious( updateBufferIndex );
}
/**
- * Retrieve the rotation of the node derived from the rotation of all its parents.
+ * Retrieve the orientation of the node derived from the rotation of all its parents.
* @param[in] bufferIndex The buffer to read from.
* @return The world rotation.
*/
- const Quaternion& GetWorldRotation( BufferIndex bufferIndex ) const
+ const Quaternion& GetWorldOrientation( BufferIndex bufferIndex ) const
{
- return mWorldRotation[bufferIndex];
+ return mWorldOrientation[bufferIndex];
}
/**
- * Set whether the Node inherits rotation.
- * @param[in] inherit True if the parent rotation is inherited.
+ * Set whether the Node inherits orientation.
+ * @param[in] inherit True if the parent orientation is inherited.
*/
- void SetInheritRotation(bool inherit)
+ void SetInheritOrientation(bool inherit)
{
- if (inherit != mInheritRotation)
+ if (inherit != mInheritOrientation)
{
- mInheritRotation = inherit;
+ mInheritOrientation = inherit;
SetDirtyFlag(TransformFlag);
}
}
/**
- * Query whether the node inherits rotation from its parent.
- * @return True if the parent rotation is inherited.
+ * Query whether the node inherits orientation from its parent.
+ * @return True if the parent orientation is inherited.
*/
- bool IsRotationInherited() const
+ bool IsOrientationInherited() const
{
- return mInheritRotation;
+ return mInheritOrientation;
}
/**
AnimatableProperty<Vector3> mSize; ///< Size is provided for layouting
AnimatableProperty<Vector3> mPosition; ///< Local transform; distance between parent-origin & anchor-point
- AnimatableProperty<Quaternion> mRotation; ///< Local transform; rotation relative to parent node
+ AnimatableProperty<Quaternion> mOrientation; ///< Local transform; rotation relative to parent node
AnimatableProperty<Vector3> mScale; ///< Local transform; scale relative to parent node
AnimatableProperty<bool> mVisible; ///< Visibility can be inherited from the Node hierachy
AnimatableProperty<Vector4> mColor; ///< Color can be inherited from the Node hierarchy
// Inherited properties; read-only from public API
- InheritedVector3 mWorldPosition; ///< Full inherited position
- InheritedQuaternion mWorldRotation; ///< Full inherited rotation
- InheritedVector3 mWorldScale; ///< Full inherited scale
- InheritedMatrix mWorldMatrix; ///< Full inherited world matrix
- InheritedColor mWorldColor; ///< Full inherited color
+ InheritedVector3 mWorldPosition; ///< Full inherited position
+ InheritedQuaternion mWorldOrientation; ///< Full inherited orientation
+ InheritedVector3 mWorldScale; ///< Full inherited scale
+ InheritedMatrix mWorldMatrix; ///< Full inherited world matrix
+ InheritedColor mWorldColor; ///< Full inherited color
protected:
int mDirtyFlags:10; ///< A composite set of flags for each of the Node properties
bool mIsRoot:1; ///< True if the node cannot have a parent
- bool mInheritRotation:1; ///< Whether the parent's rotation should be inherited.
+ bool mInheritOrientation:1; ///< Whether the parent's orientation should be inherited.
bool mInheritScale:1; ///< Whether the parent's scale should be inherited.
bool mTransmitGeometryScaling:1; ///< Whether geometry scaling should be applied to world transform.
bool mInhibitLocalTransform:1; ///< whether local transform should be applied.
// Messages for Node
-inline void SetInheritRotationMessage( EventToUpdate& eventToUpdate, const Node& node, bool inherit )
+inline void SetInheritOrientationMessage( EventToUpdate& eventToUpdate, const Node& node, bool inherit )
{
typedef MessageValue1< Node, bool > LocalType;
unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ) );
// Construct message in the message queue memory; note that delete should not be called on the return value
- new (slot) LocalType( &node, &Node::SetInheritRotation, inherit );
+ new (slot) LocalType( &node, &Node::SetInheritOrientation, inherit );
}
inline void SetSizeModeMessage( EventToUpdate& eventToUpdate, const Node& node, SizeMode mode )
GetImplementation(*this).SetZ(z);
}
-void Actor::MoveBy(const Vector3& distance)
+void Actor::TranslateBy(const Vector3& distance)
{
- GetImplementation(*this).MoveBy(distance);
+ GetImplementation(*this).TranslateBy(distance);
}
Vector3 Actor::GetCurrentPosition() const
return GetImplementation(*this).GetPositionInheritanceMode();
}
-void Actor::SetRotation(const Degree& angle, const Vector3& axis)
+void Actor::SetOrientation(const Degree& angle, const Vector3& axis)
{
- GetImplementation(*this).SetRotation(Radian(angle), axis);
+ GetImplementation(*this).SetOrientation(Radian(angle), axis);
}
-void Actor::SetRotation(const Radian& angle, const Vector3& axis)
+void Actor::SetOrientation(const Radian& angle, const Vector3& axis)
{
- GetImplementation(*this).SetRotation(angle, axis);
+ GetImplementation(*this).SetOrientation(angle, axis);
}
-void Actor::SetRotation(const Quaternion& rotation)
+void Actor::SetOrientation(const Quaternion& orientation)
{
- GetImplementation(*this).SetRotation(rotation);
+ GetImplementation(*this).SetOrientation(orientation);
}
void Actor::RotateBy(const Degree& angle, const Vector3& axis)
GetImplementation(*this).RotateBy(relativeRotation);
}
-Quaternion Actor::GetCurrentRotation() const
+Quaternion Actor::GetCurrentOrientation() const
{
- return GetImplementation(*this).GetCurrentRotation();
+ return GetImplementation(*this).GetCurrentOrientation();
}
-void Actor::SetInheritRotation(bool inherit)
+void Actor::SetInheritOrientation(bool inherit)
{
- GetImplementation(*this).SetInheritRotation(inherit);
+ GetImplementation(*this).SetInheritOrientation(inherit);
}
-bool Actor::IsRotationInherited() const
+bool Actor::IsOrientationInherited() const
{
- return GetImplementation(*this).IsRotationInherited();
+ return GetImplementation(*this).IsOrientationInherited();
}
-Quaternion Actor::GetCurrentWorldRotation() const
+Quaternion Actor::GetCurrentWorldOrientation() const
{
- return GetImplementation(*this).GetCurrentWorldRotation();
+ return GetImplementation(*this).GetCurrentWorldOrientation();
}
void Actor::SetScale(float scale)
GetImplementation(*this).SetOpacity(opacity);
}
-void Actor::OpacityBy(float relativeOpacity)
-{
- GetImplementation(*this).OpacityBy(relativeOpacity);
-}
-
float Actor::GetCurrentOpacity() const
{
return GetImplementation(*this).GetCurrentOpacity();
GetImplementation(*this).SetColor(color);
}
-void Actor::ColorBy(const Vector4& relativeColor)
-{
- GetImplementation(*this).ColorBy(relativeColor);
-}
-
Vector4 Actor::GetCurrentColor() const
{
return GetImplementation(*this).GetCurrentColor();
WORLD_POSITION_X, ///< name "world-position-x", type float (read-only)
WORLD_POSITION_Y, ///< name "world-position-y", type float (read-only)
WORLD_POSITION_Z, ///< name "world-position-z", type float (read-only)
- ROTATION, ///< name "rotation", type Quaternion
- WORLD_ROTATION, ///< name "world-rotation", type Quaternion (read-only)
+ ORIENTATION, ///< name "orientation", type Quaternion
+ WORLD_ORIENTATION, ///< name "world-orientation", type Quaternion (read-only)
SCALE, ///< name "scale", type Vector3
SCALE_X, ///< name "scale-x", type float
SCALE_Y, ///< name "scale-y", type float
NAME, ///< name "name", type std::string
SENSITIVE, ///< name "sensitive", type bool
LEAVE_REQUIRED, ///< name "leave-required", type bool
- INHERIT_ROTATION, ///< name "inherit-rotation", type bool
+ INHERIT_ORIENTATION, ///< name "inherit-orientation", type bool
INHERIT_SCALE, ///< name "inherit-scale", type bool
COLOR_MODE, ///< name "color-mode", type std::string
POSITION_INHERITANCE, ///< name "position-inheritance", type std::string
* bottom-right corner. The default anchor point is
* Dali::AnchorPoint::CENTER (0.5, 0.5, 0.5).
* An actor position is the distance between its parent-origin, and this anchor-point.
- * An actor's rotation is centered around its anchor-point.
+ * An actor's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.
* @see Dali::AnchorPoint for predefined anchor point values
* @pre The Actor has been initialized.
* @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentAnchorPoint().
void SetZ(float z);
/**
- * @brief Move an actor relative to its existing position.
+ * @brief Translate an actor relative to its existing position.
*
* @pre The actor has been initialized.
* @param[in] distance The actor will move by this distance.
*/
- void MoveBy(const Vector3& distance);
+ void TranslateBy(const Vector3& distance);
/**
* @brief Retrieve the position of the Actor.
PositionInheritanceMode GetPositionInheritanceMode() const;
/**
- * @brief Sets the rotation of the Actor.
+ * @brief Sets the orientation of the Actor.
*
- * An actor's rotation is centered around its anchor point.
+ * An actor's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.
* @pre The Actor has been initialized.
- * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentRotation().
- * @param [in] angle The new rotation angle in degrees.
- * @param [in] axis The new axis of rotation.
+ * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentOrientation().
+ * @param [in] angle The new orientation angle in degrees.
+ * @param [in] axis The new axis of orientation.
*/
- void SetRotation(const Degree& angle, const Vector3& axis);
+ void SetOrientation(const Degree& angle, const Vector3& axis);
/**
- * @brief Sets the rotation of the Actor.
+ * @brief Sets the orientation of the Actor.
*
- * An actor's rotation is centered around its anchor point.
+ * An actor's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.
* @pre The Actor has been initialized.
- * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentRotation().
- * @param [in] angle The new rotation angle in radians.
- * @param [in] axis The new axis of rotation.
+ * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentOrientation().
+ * @param [in] angle The new orientation angle in radians.
+ * @param [in] axis The new axis of orientation.
*/
- void SetRotation(const Radian& angle, const Vector3& axis);
+ void SetOrientation(const Radian& angle, const Vector3& axis);
/**
- * @brief Sets the rotation of the Actor.
+ * @brief Sets the orientation of the Actor.
*
+ * An actor's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.
* @pre The Actor has been initialized.
- * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentRotation().
- * @param [in] rotation The new rotation.
+ * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentOrientation().
+ * @param [in] orientation The new orientation.
*/
- void SetRotation(const Quaternion& rotation);
+ void SetOrientation(const Quaternion& orientation);
/**
* @brief Apply a relative rotation to an actor.
*
* @pre The actor has been initialized.
- * @param[in] angle The angle to the rotation to combine with the existing rotation.
- * @param[in] axis The axis of the rotation to combine with the existing rotation.
+ * @param[in] angle The angle to the rotation to combine with the existing orientation.
+ * @param[in] axis The axis of the rotation to combine with the existing orientation.
*/
void RotateBy(const Degree& angle, const Vector3& axis);
* @brief Apply a relative rotation to an actor.
*
* @pre The actor has been initialized.
- * @param[in] angle The angle to the rotation to combine with the existing rotation.
- * @param[in] axis The axis of the rotation to combine with the existing rotation.
+ * @param[in] angle The angle to the rotation to combine with the existing orientation.
+ * @param[in] axis The axis of the rotation to combine with the existing orientation.
*/
void RotateBy(const Radian& angle, const Vector3& axis);
* @brief Apply a relative rotation to an actor.
*
* @pre The actor has been initialized.
- * @param[in] relativeRotation The rotation to combine with the existing rotation.
+ * @param[in] relativeRotation The rotation to combine with the existing orientation.
*/
void RotateBy(const Quaternion& relativeRotation);
/**
- * @brief Retreive the Actor's rotation.
+ * @brief Retreive the Actor's orientation.
*
* @pre The Actor has been initialized.
- * @note This property can be animated; the return value may not match the value written with SetRotation().
- * @return The current rotation.
+ * @note This property can be animated; the return value may not match the value written with SetOrientation().
+ * @return The current orientation.
*/
- Quaternion GetCurrentRotation() const;
+ Quaternion GetCurrentOrientation() const;
/**
* @brief Set whether a child actor inherits it's parent's orientation.
*
* Default is to inherit.
- * Switching this off means that using SetRotation() sets the actor's world orientation.
+ * Switching this off means that using SetOrientation() sets the actor's world orientation.
* @pre The Actor has been initialized.
* @param[in] inherit - true if the actor should inherit orientation, false otherwise.
*/
- void SetInheritRotation(bool inherit);
+ void SetInheritOrientation(bool inherit);
/**
* @brief Returns whether the actor inherit's it's parent's orientation.
* @pre The Actor has been initialized.
* @return true if the actor inherit's it's parent orientation, false if it uses world orientation.
*/
- bool IsRotationInherited() const;
+ bool IsOrientationInherited() const;
/**
- * @brief Retrieve the world-rotation of the Actor.
+ * @brief Retrieve the world-orientation of the Actor.
*
- * @note The actor will not have a world-rotation, unless it has previously been added to the stage.
+ * @note The actor will not have a world-orientation, unless it has previously been added to the stage.
* @pre The Actor has been initialized.
- * @return The Actor's current rotation in the world.
+ * @return The Actor's current orientation in the world.
*/
- Quaternion GetCurrentWorldRotation() const;
+ Quaternion GetCurrentWorldOrientation() const;
/**
* @brief Set the scale factor applied to an actor.
void SetOpacity(float opacity);
/**
- * @brief Apply a relative opacity change to an actor.
- *
- * @pre The actor has been initialized.
- * @param[in] relativeOpacity The opacity to combine with the actors existing opacity.
- */
- void OpacityBy(float relativeOpacity);
-
- /**
* @brief Retrieve the actor's opacity.
*
* @pre The actor has been initialized.
void SetColor(const Vector4& color);
/**
- * @brief Apply a relative color change to an actor.
- *
- * @pre The actor has been initialized.
- * @param[in] relativeColor The color to combine with the actors existing color.
- */
- void ColorBy(const Vector4& relativeColor);
-
- /**
* @brief Retrieve the actor's color.
*
* Actor's own color is not clamped.
* There are two types of camera actor, FREE_LOOK and LOOK_AT_TARGET. By default
* the camera actor will be FREE_LOOK.
*
- * A FREE_LOOK camera uses actor's rotation to control where the camera is looking.
+ * A FREE_LOOK camera uses actor's orientation to control where the camera is looking.
* If no additional rotations are specified, the camera looks in the negative Z direction.
*
- * For LOOK_AT_TARGET the actor's rotation is ignored, instead the camera looks at TARGET_POSITION
+ * For LOOK_AT_TARGET the actor's orientation is ignored, instead the camera looks at TARGET_POSITION
* in world coordinates.
*
*/
/**
* @brief A function which constrains a Vector3 property, based on the local properties of an Actor.
*
- * @param[in] size The actor's current size.
- * @param[in] position The actor's current position.
- * @param[in] scale The actor's current rotation.
- * @param[in] rotation The actor's current scale.
- * @param[in] color The actor's current color.
+ * @param[in] size The actor's current size.
+ * @param[in] position The actor's current position.
+ * @param[in] orientation The actor's current orientation.
+ * @param[in] scale The actor's current scale.
+ * @param[in] color The actor's current color.
* @return The constrained property value.
*/
typedef boost::function<Vector3 (const Vector3& size,
const Vector3& position,
- const Quaternion& rotation,
+ const Quaternion& orientation,
const Vector3& scale,
const Vector4& color)> Vector3Function;
/**
* @brief A function which constrains a Vector4 property, based on the local properties of an Actor.
*
- * @param[in] size The actor's current size.
- * @param[in] position The actor's current position.
- * @param[in] scale The actor's current rotation.
- * @param[in] rotation The actor's current scale.
- * @param[in] color The actor's current color.
+ * @param[in] size The actor's current size.
+ * @param[in] position The actor's current position.
+ * @param[in] orientation The actor's current orientation.
+ * @param[in] scale The actor's current scale.
+ * @param[in] color The actor's current color.
* @return The constrained property value.
*/
typedef boost::function<Vector4 (const Vector3& size,
const Vector3& position,
- const Quaternion& rotation,
+ const Quaternion& orientation,
const Vector3& scale,
const Vector4& color)> Vector4Function;
/**
* @brief A function which constrains a Quaternion property, based on the local properties of an Actor.
*
- * @param[in] size The actor's current size.
- * @param[in] position The actor's current position.
- * @param[in] scale The actor's current rotation.
- * @param[in] rotation The actor's current scale.
- * @param[in] color The actor's current color.
+ * @param[in] size The actor's current size.
+ * @param[in] position The actor's current position.
+ * @param[in] orientation The actor's current orientation.
+ * @param[in] scale The actor's current scale.
+ * @param[in] color The actor's current color.
* @return The constrained property value.
*/
typedef boost::function<Quaternion (const Vector3& size,
const Vector3& position,
- const Quaternion& rotation,
+ const Quaternion& orientation,
const Vector3& scale,
const Vector4& color)> QuaternionFunction;
/**
* @brief A function which constrains a boolean property, based on the local properties of an Actor.
*
- * @param[in] size The actor's current size.
- * @param[in] position The actor's current position.
- * @param[in] scale The actor's current rotation.
- * @param[in] rotation The actor's current scale.
- * @param[in] color The actor's current color.
+ * @param[in] size The actor's current size.
+ * @param[in] position The actor's current position.
+ * @param[in] orientation The actor's current orientation.
+ * @param[in] scale The actor's current scale.
+ * @param[in] color The actor's current color.
* @return The constrained property value.
*/
typedef boost::function<bool (const Vector3& size,
const Vector3& position,
- const Quaternion& rotation,
+ const Quaternion& orientation,
const Vector3& scale,
const Vector4& color)> BoolFunction;
* @param[in] anchorPoint The actor's current anchor-point.
* @param[in] parentSize The parent's current size.
* @param[in] parentPosition The parent's current position.
- * @param[in] parentRotation The parent's current rotation.
+ * @param[in] parentOrientation The parent's current orientation.
* @param[in] parentScale The parent's current scale.
* @return The constrained property value.
*/
const Vector3& anchorPoint,
const Vector3& parentSize,
const Vector3& parentPosition,
- const Quaternion& parentRotation,
+ const Quaternion& parentOrientation,
const Vector3& parentScale)> Vector3Function;
/**
* @param[in] anchorPoint The actor's current anchor-point.
* @param[in] parentSize The parent's current size.
* @param[in] parentPosition The parent's current position.
- * @param[in] parentRotation The parent's current rotation.
+ * @param[in] parentOrientation The parent's current orientation.
* @param[in] parentScale The parent's current scale.
* @return The constrained property value.
*/
const Vector3& anchorPoint,
const Vector3& parentSize,
const Vector3& parentPosition,
- const Quaternion& parentRotation,
+ const Quaternion& parentOrientation,
const Vector3& parentScale)> Vector4Function;
/**
* @param[in] anchorPoint The actor's current anchor-point.
* @param[in] parentSize The parent's current size.
* @param[in] parentPosition The parent's current position.
- * @param[in] parentRotation The parent's current rotation.
+ * @param[in] parentOrientation The parent's current orientation.
* @param[in] parentScale The parent's current scale.
* @return The constrained property value.
*/
const Vector3& anchorPoint,
const Vector3& parentSize,
const Vector3& parentPosition,
- const Quaternion& parentRotation,
+ const Quaternion& parentOrientation,
const Vector3& parentScale)> QuaternionFunction;
/**
* @param[in] anchorPoint The actor's current anchor-point.
* @param[in] parentSize The parent's current size.
* @param[in] parentPosition The parent's current position.
- * @param[in] parentRotation The parent's current rotation.
+ * @param[in] parentOrientation The parent's current orientation.
* @param[in] parentScale The parent's current scale.
* @return The constrained property value.
*/
const Vector3& anchorPoint,
const Vector3& parentSize,
const Vector3& parentPosition,
- const Quaternion& parentRotation,
+ const Quaternion& parentOrientation,
const Vector3& parentScale)> BoolFunction;
} // ParentConstraint
/**
* @brief Constraint function to aim a camera at a target.
*
- * Constraint which sets camera's rotation given camera world position
+ * Constraint which sets camera's orientation given camera world position
* and a target world position. Uses target's up vector to orient the
* constrained actor along the vector between camera position and
* target position.
*
- * @param[in] current The current rotation property value
+ * @param[in] current The current orientation property value
* @param[in] targetPosition World position of target
* @param[in] cameraPosition World position of camera
- * @param[in] targetRotation World rotation of the target
+ * @param[in] targetOrientation World orientation of the target
* @return The orientation of the camera
*/
inline Quaternion LookAt( const Quaternion& current,
const PropertyInput& targetPosition,
const PropertyInput& cameraPosition,
- const PropertyInput& targetRotation )
+ const PropertyInput& targetOrientation )
{
Vector3 vForward = targetPosition.GetVector3() - cameraPosition.GetVector3();
vForward.Normalize();
- const Quaternion& targetRotationQ = targetRotation.GetQuaternion();
+ const Quaternion& targetOrientationQ = targetOrientation.GetQuaternion();
- Vector3 targetY(targetRotationQ.Rotate(Vector3::YAXIS));
+ Vector3 targetY(targetOrientationQ.Rotate(Vector3::YAXIS));
targetY.Normalize();
// Camera Right vector is perpendicular to forward & target up
* detected and responded to in signal handlers.
*
* DALi will update the physics simulation after animations and constraints, thus dynamics forces
- * will override positions and rotations applied by animations and constrints.
+ * will override positions and orientations applied by animations and constrints.
*
* Here is an example illustrating the basic steps to initialise the simulation and
* add a rigid body.
{
DALI_ASSERT_ALWAYS( Property::ROTATION == GetType() && "Property type invalid" );
- // Rotations have two representations
+ // Orientations have two representations
DALI_ASSERT_DEBUG( typeid(Quaternion) == mImpl->mValue.GetType() ||
typeid(AngleAxis) == mImpl->mValue.GetType() );
{
DALI_ASSERT_DEBUG( Property::ROTATION == GetType() && "Property type invalid" );
- // Rotations have two representations
+ // Orientations have two representations
DALI_ASSERT_DEBUG( typeid(Quaternion) == mImpl->mValue.GetType() ||
typeid(AngleAxis) == mImpl->mValue.GetType() );
Value(const Rect<int>& vectorValue);
/**
- * @brief Create an rotation property value.
+ * @brief Create an orientation property value.
*
* @param [in] angleAxis An angle-axis representing the rotation.
*/
Value(const AngleAxis& angleAxis);
/**
- * @brief Create an rotation property value.
+ * @brief Create an orientation property value.
*
* @param [in] quaternion A quaternion representing the rotation.
*/