DALI_TEST_EQUALS( actor.GetProjectionMode(), Dali::Camera::PERSPECTIVE_PROJECTION, TEST_LOCATION );
// Add it to the stage, then the values should be updated to reflect a 480.0f by 800.0f scene (default stage size)
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
DALI_TEST_EQUALS( 0.6f, actor.GetProperty( CameraActor::Property::ASPECT_RATIO ).Get< float >(), FLOAT_EPSILON, TEST_LOCATION );
DALI_TEST_EQUALS( 0.489957f, actor.GetProperty( CameraActor::Property::FIELD_OF_VIEW ).Get< float >(), FLOAT_EPSILON, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProjectionMode(), Dali::Camera::PERSPECTIVE_PROJECTION, TEST_LOCATION );
// Ensure these values persist after adding to the stage and an update/render pass
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
CameraActor actor = CameraActor::New( Size( 1080.0f, 1920.0f ) );
DALI_TEST_CHECK( actor );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
actor.SetOrthographicProjection( Size( 1080.0f, 1920.0f ) );
application.SendNotification();
tet_infoline( "Testing Dali::CameraActor::SetCamera()" );
CameraActor actor = CameraActor::New();
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.Render( 0 );
application.SendNotification();
tet_infoline( "Testing Dali::CameraActor DefaultProperties" );
CameraActor actor = CameraActor::New();
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
stage.Add(actor);
stage.GetRenderTaskList().GetTask(0).SetCameraActor( actor );
actor.SetAspectRatio( TEST_ASPECT_RATIO );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.Render( 0 );
application.SendNotification();
bool bValue;
TestApplication application;
CameraActor actor = CameraActor::New();
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
stage.Add(actor);
stage.GetRenderTaskList().GetTask(0).SetCameraActor( actor );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.Render( 0 );
application.SendNotification();
{ "clippingMode", Property::STRING, true, false, false, Dali::Actor::Property::CLIPPING_MODE },
{ "layoutDirection", Property::STRING, true, false, false, Dali::Actor::Property::LAYOUT_DIRECTION },
{ "inheritLayoutDirection", Property::BOOLEAN, true, false, false, Dali::Actor::Property::INHERIT_LAYOUT_DIRECTION },
+ { "opacity", Property::FLOAT, true, true, true, Dali::Actor::Property::OPACITY },
+ { "screenPosition", Property::VECTOR2, false, false, false, Dali::Actor::Property::SCREEN_POSITION },
+ { "positionUsesAnchorPoint",Property::BOOLEAN, true, false, false, Dali::Actor::Property::POSITION_USES_ANCHOR_POINT },
+ { "culled", Property::BOOLEAN, false, false, true, Dali::Actor::Property::CULLED },
+ { "id", Property::INTEGER, false, false, false, Dali::Actor::Property::ID },
+ { "hierarchyDepth", Property::INTEGER, false, false, false, Dali::Actor::Property::HIERARCHY_DEPTH },
+ { "isRoot", Property::BOOLEAN, false, false, false, Dali::Actor::Property::IS_ROOT },
+ { "isLayer", Property::BOOLEAN, false, false, false, Dali::Actor::Property::IS_LAYER },
+ { "connectedToScene", Property::BOOLEAN, false, false, false, Dali::Actor::Property::CONNECTED_TO_SCENE },
+ { "keyboardFocusable", Property::BOOLEAN, true, false, false, Dali::Actor::Property::KEYBOARD_FOCUSABLE },
{ "siblingOrder", Property::INTEGER, true, false, false, Dali::DevelActor::Property::SIBLING_ORDER },
- { "opacity", Property::FLOAT, true, true, true, Dali::DevelActor::Property::OPACITY },
- { "screenPosition", Property::VECTOR2, false, false, false, Dali::DevelActor::Property::SCREEN_POSITION },
- { "positionUsesAnchorPoint",Property::BOOLEAN, true, false, false, Dali::DevelActor::Property::POSITION_USES_ANCHOR_POINT },
- { "culled", Property::BOOLEAN, false, false, true, Dali::DevelActor::Property::CULLED },
// camera own
{ "type", Property::STRING, true, false, true, Dali::CameraActor::Property::TYPE },
{ "projectionMode", Property::STRING, true, false, true, Dali::CameraActor::Property::PROJECTION_MODE },
actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::POSITION, Vector3( 20.0f, 30.0f, 40.0f ));
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render( 0 );
Matrix resultMatrix( true );
resultMatrix.SetTransformComponents( Vector3::ONE, Quaternion::IDENTITY, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) );
- RenderTask task = Stage::GetCurrent().GetRenderTaskList().GetTask( 0 );
+ RenderTask task = application.GetScene().GetRenderTaskList().GetTask( 0 );
CameraActor cameraActor = task.GetCameraActor();
Matrix viewMatrix( false );
TestApplication application;
tet_infoline( "Testing Dali::CameraActor::ReadProjectionMatrix()" );
- CameraActor camera = Stage::GetCurrent().GetRenderTaskList().GetTask( 0u ).GetCameraActor();
+ CameraActor camera = application.GetScene().GetRenderTaskList().GetTask( 0u ).GetCameraActor();
application.SendNotification();
application.Render( 0 );
application.Render();
Texture image = Texture::New(TextureType::TEXTURE_2D, Pixel::RGBA8888, 4u, 4u);
Actor actor = CreateRenderableActor( image, RENDER_SHADOW_VERTEX_SOURCE, RENDER_SHADOW_FRAGMENT_SOURCE );
actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
Matrix projectionMatrix;
Matrix viewMatrix;
TestApplication application;
tet_infoline( "Testing Dali::Internal::CameraActor::GetSceneObjectAnimatableProperty()" );
- CameraActor camera = Stage::GetCurrent().GetRenderTaskList().GetTask( 0u ).GetCameraActor();
+ CameraActor camera = application.GetScene().GetRenderTaskList().GetTask( 0u ).GetCameraActor();
Actor actor = Actor::New();
actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
Constraint constraint = Constraint::New<Dali::Vector3>( actor, Actor::Property::POSITION, EqualToConstraint() );
constraint.AddSource( Source( camera, Actor::Property::POSITION ) );
int UtcDaliCameraActorPropertyIndices(void)
{
TestApplication application;
- CameraActor camera = Stage::GetCurrent().GetRenderTaskList().GetTask( 0u ).GetCameraActor();
+ CameraActor camera = application.GetScene().GetRenderTaskList().GetTask( 0u ).GetCameraActor();
Actor basicActor = Actor::New();
Property::IndexContainer indices;
int UtcDaliCameraActorCheckLookAtAndFreeLookViews01(void)
{
TestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
Vector2 stageSize = stage.GetSize();
CameraActor freeLookCameraActor = CameraActor::New( stageSize );
int UtcDaliCameraActorCheckLookAtAndFreeLookViews02(void)
{
TestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
Vector2 stageSize = stage.GetSize();
CameraActor freeLookCameraActor = CameraActor::New( stageSize );
int UtcDaliCameraActorCheckLookAtAndFreeLookViews03(void)
{
TestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
Vector2 stageSize = stage.GetSize();
Vector3 targetPosition( Vector3::ZERO );
{
TestApplication application;
- Stage stage = Stage::GetCurrent();
+ Integration::Scene stage = application.GetScene();
Vector3 targetPosition( Vector3::ZERO );
Vector3 cameraOffset( 0.0f, 100.0f, 100.0f );