X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftransition-effects%2Fcube-transition-fold-effect-impl.cpp;h=698947850a39ddaa65273e05ddd9f7db8207982b;hp=74260d8367a044bf28f23d5c4fd965725e80b8f2;hb=b398ab61279f2fe1e96f7567cecb123c25e2edb1;hpb=e2eda444afbe82e9591fe198eef339227f90a616 diff --git a/dali-toolkit/internal/transition-effects/cube-transition-fold-effect-impl.cpp b/dali-toolkit/internal/transition-effects/cube-transition-fold-effect-impl.cpp index 74260d8..6989478 100644 --- a/dali-toolkit/internal/transition-effects/cube-transition-fold-effect-impl.cpp +++ b/dali-toolkit/internal/transition-effects/cube-transition-fold-effect-impl.cpp @@ -1,18 +1,19 @@ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Flora License, Version 1.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://floralicense.org/license/ -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // CLASS HEADER #include "cube-transition-fold-effect-impl.h" @@ -101,11 +102,11 @@ void CubeTransitionFoldEffect::OnStopTransition() idx = y*mNumColumns; for( unsigned int x = y%2; x < mNumColumns; x=x+2) { - mBoxes[idx+x].SetRotation( Radian(angle), Vector3::YAXIS ); + mBoxes[idx+x].SetOrientation( Radian(angle), Vector3::YAXIS ); } for( unsigned int x = (y+1)%2; x < mNumColumns; x=x+2) { - mBoxes[idx+x].SetRotation( Radian(-angle), Vector3::YAXIS ); + mBoxes[idx+x].SetOrientation( Radian(-angle), Vector3::YAXIS ); } } } @@ -117,18 +118,18 @@ void CubeTransitionFoldEffect::SetupAnimation(unsigned int actorIndex, float ang ImageActor frontTile = mTiles[mContainerIndex^1][actorIndex]; if ( mFirstTransition && (!mIsToNextImage) ) // for the first transition, it is going to previous image { - sideTile.SetRotation( Radian( angle), Vector3::YAXIS ); + sideTile.SetOrientation( Radian( angle), Vector3::YAXIS ); } else if( !mChangeTurningDirection ) // reset rotation, translation and color { - sideTile.MoveBy( resetTranslation ); - sideTile.SetRotation( Radian( angle), Vector3::YAXIS ); + sideTile.TranslateBy( resetTranslation ); + sideTile.SetOrientation( Radian( angle), Vector3::YAXIS ); } - mAnimation.RotateTo( currentCube, Radian( -angle ), Vector3::YAXIS, AlphaFunctions::Linear ); + mAnimation.AnimateTo( Property( currentCube, Actor::Property::ORIENTATION ), Quaternion( Radian( -angle ), Vector3::YAXIS ), AlphaFunction::LINEAR ); Vector3 position(currentCube.GetCurrentPosition()); - mAnimation.MoveTo(currentCube, Vector3( position.x*mDisplacementRatio, position.y, position.z ), AlphaFunctions::Bounce); - mAnimation.ColorTo( frontTile, HALF_BRIGHTNESS, AlphaFunctions::EaseOut ); - mAnimation.ColorTo( sideTile, FULL_BRIGHTNESS, AlphaFunctions::EaseIn ); + mAnimation.AnimateTo( Property( currentCube, Actor::Property::POSITION ), Vector3( position.x*mDisplacementRatio, position.y, position.z ), AlphaFunction::BOUNCE ); + mAnimation.AnimateTo( Property( frontTile, Actor::Property::COLOR ), HALF_BRIGHTNESS, AlphaFunction::EASE_OUT ); + mAnimation.AnimateTo( Property( sideTile, Actor::Property::COLOR ), FULL_BRIGHTNESS, AlphaFunction::EASE_IN ); } } // namespace Internal