X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftransition-effects%2Fcube-transition-effect-impl.cpp;h=29fd9e814ad68cc16b56902b611b8571d033970c;hb=610495b8647d1a25c98bf0773ccc0dd6d1996263;hp=460ea31527f0b559385e6e6ceea0f74b4b517de1;hpb=84d36f3df81b55d0c7ae20db8005a28742fa4060;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/transition-effects/cube-transition-effect-impl.cpp b/dali-toolkit/internal/transition-effects/cube-transition-effect-impl.cpp index 460ea31..29fd9e8 100644 --- a/dali-toolkit/internal/transition-effects/cube-transition-effect-impl.cpp +++ b/dali-toolkit/internal/transition-effects/cube-transition-effect-impl.cpp @@ -82,7 +82,7 @@ const char* FRAGMENT_SHADER = DALI_COMPOSE_SHADER( Actor CreateTile( const Vector4& samplerRect ) { Actor tile = Actor::New(); - tile.SetAnchorPoint( AnchorPoint::CENTER ); + tile.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); tile.RegisterProperty( "uTextureRect", samplerRect ); return tile; } @@ -113,8 +113,8 @@ void CubeTransitionEffect::SetTargetRight( unsigned int idx ) mBoxes[ idx ].SetProperty(Actor::Property::PARENT_ORIGIN_Z, 1.0f - mTileSize.x * 0.5f ); - mTargetTiles[ idx ].SetParentOrigin( Vector3( 1.f, 0.5f, 0.5f) ); - mTargetTiles[ idx ].SetOrientation( Degree( 90.f ), Vector3::YAXIS ); + mTargetTiles[ idx ].SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 1.f, 0.5f, 0.5f) ); + mTargetTiles[ idx ].SetProperty( Actor::Property::ORIENTATION, Quaternion( Degree( 90.f ), Vector3::YAXIS ) ); } void CubeTransitionEffect::SetTargetLeft( unsigned int idx ) @@ -123,8 +123,8 @@ void CubeTransitionEffect::SetTargetLeft( unsigned int idx ) mBoxes[ idx ].SetProperty(Actor::Property::PARENT_ORIGIN_Z, 1.0f - mTileSize.x * 0.5f ); - mTargetTiles[ idx ].SetParentOrigin( Vector3( 0.f, 0.5f, 0.5f) ); - mTargetTiles[ idx ].SetOrientation( Degree( -90.f ), Vector3::YAXIS ); + mTargetTiles[ idx ].SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.f, 0.5f, 0.5f) ); + mTargetTiles[ idx ].SetProperty( Actor::Property::ORIENTATION, Quaternion( Degree( -90.f ), Vector3::YAXIS ) ); } void CubeTransitionEffect::SetTargetBottom( unsigned int idx ) @@ -133,8 +133,8 @@ void CubeTransitionEffect::SetTargetBottom( unsigned int idx ) mBoxes[ idx ].SetProperty(Actor::Property::PARENT_ORIGIN_Z, 1.0f - mTileSize.y * 0.5f ); - mTargetTiles[ idx ].SetParentOrigin( Vector3( 0.5f, 0.f, 0.5f) ); - mTargetTiles[ idx ].SetOrientation( Degree( 90.f ), Vector3::XAXIS ); + mTargetTiles[ idx ].SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, 0.f, 0.5f) ); + mTargetTiles[ idx ].SetProperty( Actor::Property::ORIENTATION, Quaternion( Degree( 90.f ), Vector3::XAXIS ) ); } void CubeTransitionEffect::SetTargetTop( unsigned int idx ) @@ -143,8 +143,8 @@ void CubeTransitionEffect::SetTargetTop( unsigned int idx ) mBoxes[ idx ].SetProperty(Actor::Property::PARENT_ORIGIN_Z, 1.0f - mTileSize.y * 0.5f ); - mTargetTiles[ idx ].SetParentOrigin( Vector3( 0.5f, 1.f, 0.5f) ); - mTargetTiles[ idx ].SetOrientation( Degree( -90.f ), Vector3::XAXIS ); + mTargetTiles[ idx ].SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, 1.f, 0.5f) ); + mTargetTiles[ idx ].SetProperty( Actor::Property::ORIENTATION, Quaternion( Degree( -90.f ), Vector3::XAXIS ) ); } void CubeTransitionEffect::OnRelayout( const Vector2& size, RelayoutContainer& container ) @@ -199,8 +199,8 @@ void CubeTransitionEffect::Initialize() //create the box parents mBoxRoot = Actor::New(); - mBoxRoot.SetParentOrigin( ParentOrigin::CENTER ); - mBoxRoot.SetAnchorPoint( AnchorPoint::CENTER ); + mBoxRoot.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + mBoxRoot.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mCurrentTiles.clear(); mTargetTiles.clear(); @@ -221,7 +221,7 @@ void CubeTransitionEffect::Initialize() Actor currentTile = CreateTile( textureRect ); currentTile.SetProperty( Actor::Property::COLOR, FULL_BRIGHTNESS ); - currentTile.SetParentOrigin( ParentOrigin::CENTER ); + currentTile.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mCurrentTiles.push_back( currentTile ); Actor targetTile = CreateTile( textureRect ); @@ -229,8 +229,8 @@ void CubeTransitionEffect::Initialize() mTargetTiles.push_back( targetTile ); Actor box = Actor::New(); - box.SetParentOrigin( anchor + offset ); - box.SetAnchorPoint( AnchorPoint::CENTER ); + box.SetProperty( Actor::Property::PARENT_ORIGIN, anchor + offset ); + box.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); box.Add( currentTile ); box.Add( targetTile ); @@ -244,7 +244,7 @@ void CubeTransitionEffect::Initialize() OnInitialize(); } -void CubeTransitionEffect::OnStageConnection( int depth ) +void CubeTransitionEffect::OnSceneConnection( int depth ) { Geometry geometry = VisualFactoryCache::CreateQuadGeometry(); Shader shader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER ); @@ -261,10 +261,10 @@ void CubeTransitionEffect::OnStageConnection( int depth ) mCurrentRenderer.SetProperty( Renderer::Property::DEPTH_INDEX, depth ); Self().AddRenderer( mCurrentRenderer ); - Control::OnStageConnection( depth ); + Control::OnSceneConnection( depth ); } -void CubeTransitionEffect::OnStageDisconnection() +void CubeTransitionEffect::OnSceneDisconnection() { if( mCurrentRenderer ) { @@ -286,7 +286,7 @@ void CubeTransitionEffect::OnStageDisconnection() mTargetRenderer.Reset(); } - Control::OnStageDisconnection(); + Control::OnSceneDisconnection(); } void CubeTransitionEffect::SetTransitionDuration( float duration ) @@ -338,7 +338,7 @@ void CubeTransitionEffect::SetTargetTexture( Texture texture ) void CubeTransitionEffect::StartTransition( bool toNextImage ) { - Vector3 size = Self().GetCurrentSize(); + Vector3 size = Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ); if( toNextImage ) { StartTransition( Vector2(size.x* 0.5f, size.y*0.5f), Vector2( -10.f, 0.f ) ); @@ -378,7 +378,7 @@ void CubeTransitionEffect::StartTransition( Vector2 panPosition, Vector2 panDisp for( ActorArray::iterator it = mCurrentTiles.begin(); it != mCurrentTiles.end(); ++it ) { - it->SetParentOrigin( Vector3( 0.5f, 0.5f, 1.0f) ); + it->SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, 0.5f, 1.0f) ); it->SetProperty( Actor::Property::ORIENTATION, Quaternion( Radian( 0.0f ), Vector3::XAXIS ) ); it->AddRenderer( mCurrentRenderer ); } @@ -440,7 +440,7 @@ void CubeTransitionEffect::ResetToInitialState() for( ActorArray::iterator it = mCurrentTiles.begin(); it != mCurrentTiles.end(); ++it ) { - it->SetParentOrigin( Vector3( 0.5f, 0.5f, 1.0f) ); + it->SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, 0.5f, 1.0f) ); it->SetProperty( Actor::Property::ORIENTATION, Quaternion( Radian( 0.0f ), Vector3::XAXIS ) ); it->SetProperty( Actor::Property::COLOR, FULL_BRIGHTNESS ); }