{
if( gesture.state == Gesture::Continuing )
{
- actor.MoveBy( Vector3( gesture.displacement ) );
+ actor.TranslateBy( Vector3( gesture.displacement ) );
}
}
mPaddleImage.SetSize( mPaddleFullSize );
mWobbleProperty = mPaddle.RegisterProperty(WOBBLE_PROPERTY_NAME, 0.0f);
- Constraint wobbleConstraint = Constraint::New<Quaternion>( Actor::Property::ROTATION,
+ Constraint wobbleConstraint = Constraint::New<Quaternion>( Actor::Property::ORIENTATION,
LocalSource(mWobbleProperty),
WobbleConstraint(10.0f));
mPaddle.ApplyConstraint(wobbleConstraint);
constraint = Constraint::New<float>( angleXAxisProperty,
Source(mScrollView, scrollOvershootProperty),
- Source(mView, Actor::Property::ROTATION),
+ Source(mView, Actor::Property::ORIENTATION),
ShearEffectConstraint(stageSize, SHEAR_EFFECT_MAX_OVERSHOOT, Vector2::XAXIS) );
shaderEffect.ApplyConstraint(constraint);
constraint = Constraint::New<float>( angleYAxisProperty,
Source(mScrollView, scrollOvershootProperty),
- Source(mView, Actor::Property::ROTATION),
+ Source(mView, Actor::Property::ORIENTATION),
ShearEffectConstraint(stageSize, SHEAR_EFFECT_MAX_OVERSHOOT, Vector2::YAXIS) );
shaderEffect.ApplyConstraint(constraint);
Property::Index anglePerUnit = shaderEffect.GetPropertyIndex( shaderEffect.GetAnglePerUnitPropertyName() );
shaderEffect.ApplyConstraint( Constraint::New<Vector2>( anglePerUnit,
- Source(mView, Actor::Property::ROTATION),
+ Source(mView, Actor::Property::ORIENTATION),
CarouselEffectOrientationConstraint( angleSweep ) ) );
break;
else
{
// set the rotation to match the orientation
- mView.SetRotation( Degree( -orientation ), Vector3::ZAXIS );
+ mView.SetOrientation( Degree( -orientation ), Vector3::ZAXIS );
mView.SetSize( targetSize );
}
}
else
{
// set the rotation to match the orientation
- mView.SetRotation( Degree( -orientation ), Vector3::ZAXIS );
+ mView.SetOrientation( Degree( -orientation ), Vector3::ZAXIS );
mView.SetSize( targetSize );
}
}
cameraActor.SetNearClippingPlane(1.0f);
cameraActor.SetAspectRatio(FBOSize.width / FBOSize.height);
cameraActor.SetType(Dali::Camera::FREE_LOOK); // camera orientation based solely on actor
- cameraActor.SetRotation(Quaternion(M_PI, Vector3::YAXIS));
+ cameraActor.SetOrientation(Quaternion(M_PI, Vector3::YAXIS));
cameraActor.SetPosition(0.0f, 0.0f, ((FBOSize.height * 0.5f) / tanf(Math::PI * 0.125f)));
stage.Add(cameraActor);
{
mAnimation.Pause();
mAnimation.Clear();
- mActor.SetRotation( Quaternion() );
+ mActor.SetOrientation( Quaternion() );
}
mAnimation.Animate( mActor, mPath, mForward );
mStencilActor.SetSize(mDiameter, mDiameter);
}
- mStencilActor.SetRotation( Degree(mInitialAngle), Vector3::ZAXIS );
+ mStencilActor.SetOrientation( Degree(mInitialAngle), Vector3::ZAXIS );
mStencilActor.SetProperty( mRotationAngleIndex, static_cast<float>(mInitialSector) );
if( mRotateActors )
mView.SetPosition(Vector3(0.0f, 0.0f, -50));
mContents.SetPosition(mTranslation);
- mContents.SetRotation(CalculateWorldRotation(Radian(mLongitudinal), Radian(mAxisTilt)));
+ mContents.SetOrientation(CalculateWorldRotation(Radian(mLongitudinal), Radian(mAxisTilt)));
mContents.SetScale(mPinchScale, mPinchScale, mPinchScale);
mPanGestureDetector = PanGestureDetector::New();
mLightAnchor = Actor::New();
mLightAnchor.SetParentOrigin(ParentOrigin::CENTER);
mLightAnchor.SetAnchorPoint(AnchorPoint::CENTER);
- mLightAnchor.SetRotation(CalculateWorldRotation(Radian(mLightLongitudinal), Radian(mLightAxisTilt)));
+ mLightAnchor.SetOrientation(CalculateWorldRotation(Radian(mLightLongitudinal), Radian(mLightAxisTilt)));
// Work out a scaling factor as the initial light position was calculated for desktop
// Need to scale light position as scene actor size is based on stage size (i.e. much bigger on device)
Property::Index angleIndex = mImageActor2.RegisterProperty("angle", Property::Value(30.0f));
Source angleSrc( mImageActor2, angleIndex );
- mImageActor1.ApplyConstraint(Constraint::New<Quaternion>( Actor::Property::ROTATION, angleSrc,
+ mImageActor1.ApplyConstraint(Constraint::New<Quaternion>( Actor::Property::ORIENTATION, angleSrc,
RotationConstraint(-1.0f)));
- mImageActor3.ApplyConstraint(Constraint::New<Quaternion>( Actor::Property::ROTATION, angleSrc,
+ mImageActor3.ApplyConstraint(Constraint::New<Quaternion>( Actor::Property::ORIENTATION, angleSrc,
RotationConstraint(+1.0f)));
mSceneAnimation = Animation::New(2.5f);
mLightLongitudinal += gesture.displacement.x/4.0f;
mLightAxisTilt -= gesture.displacement.y/6.0f;
mLightAxisTilt = Clamp<float>(mLightAxisTilt, -90.0f, 90.0f);
- mLightAnchor.SetRotation(CalculateWorldRotation(Radian(mLightLongitudinal), Radian(mLightAxisTilt)));
+ mLightAnchor.SetOrientation(CalculateWorldRotation(Radian(mLightLongitudinal), Radian(mLightAxisTilt)));
break;
}
mLongitudinal += gesture.displacement.x/4.0f;
mAxisTilt -= gesture.displacement.y/6.0f;
mAxisTilt = Clamp<float>(mAxisTilt, -90.0f, 90.0f);
- mContents.SetRotation(CalculateWorldRotation(Radian(mLongitudinal), Radian(mAxisTilt)));
+ mContents.SetOrientation(CalculateWorldRotation(Radian(mLongitudinal), Radian(mAxisTilt)));
break;
}
mObjectLongitudinal += gesture.displacement.x/4.0f;
mObjectAxisTilt -= gesture.displacement.y/6.0f;
mObjectAxisTilt = Clamp<float>(mObjectAxisTilt, -90.0f, 90.0f);
- mSceneActor.SetRotation(CalculateWorldRotation(Radian(mObjectLongitudinal), Radian(mObjectAxisTilt)));
+ mSceneActor.SetOrientation(CalculateWorldRotation(Radian(mObjectLongitudinal), Radian(mObjectAxisTilt)));
break;
}
}
// Align scene so that light anchor orientation is Z Axis
mAxisTilt = -mLightAxisTilt;
mLongitudinal = -mLightLongitudinal;
- mContents.SetRotation(CalculateWorldRotation(Radian(mLongitudinal), Radian(mAxisTilt)));
+ mContents.SetOrientation(CalculateWorldRotation(Radian(mLongitudinal), Radian(mAxisTilt)));
return true;
}
Toolkit::TextView textView = Toolkit::TextView::New( tableString.text );
textView.SetStyleToCurrentText( textStyle );
- textView.SetRotation( Dali::Degree( tableString.orientation ), Vector3( 0.0f, 0.0f, 1.0f ) );
+ textView.SetOrientation( Dali::Degree( tableString.orientation ), Vector3( 0.0f, 0.0f, 1.0f ) );
Toolkit::Alignment alignmentContainer = Toolkit::Alignment::New( tableString.horizontalAlignment, tableString.verticalAlignment );
alignmentContainer.SetPadding( Toolkit::Alignment::Padding( tableString.padding, tableString.padding, tableString.padding, tableString.padding ) );
"duration": 10.0,
"properties": [{
"actor": "image", // referenced actors must exist on stage
- "property": "rotation",
+ "property": "orientation",
"value": [0, 0, -45],
"alpha-function": "EASE_IN_OUT",
"time-period": {
"styles": ["basic-text"],
"position": [0, -120, 0],
"size": [200, 200, 1],
- "rotation": [0, 0, 30],
+ "orientation": [0, 0, 30],
"signals": [{
"name": "touched",
"action": "play",
"parent-origin": "CENTER",
"anchor-point": "CENTER",
"size": [200, 200, 1],
- "rotation": [0, 0, 39],
+ "orientation": [0, 0, 39],
"position": [-150, -50, 0],
"text": "or me",
"signals": [{