private CATransform3D YawTransform(nfloat yawAngle) { var radians = yawAngle.ToRadians(); var yawTransform = CATransform3D.MakeRotation(radians, 0.0f, -1.0f, 0.0f); var orientationTransform = OrientationTransform(); return(orientationTransform.Concat(yawTransform)); }
public AnimationBuilder RotateDegrees(nfloat fromDegrees, nfloat toDegrees, double delaySeconds, double durationSeconds) { // chip rotation var animateRotate = CABasicAnimation.FromKeyPath("transform.rotation.z"); animateRotate.TimingFunction = this.EasingFunction; if (durationSeconds > 0) { animateRotate.Duration = durationSeconds; } if (delaySeconds > 0) { animateRotate.BeginTime = delaySeconds; } animateRotate.FillMode = CAFillMode.Forwards; animateRotate.RemovedOnCompletion = false; animateRotate.From = NSNumber.FromNFloat(fromDegrees.ToRadians()); animateRotate.To = NSNumber.FromNFloat(toDegrees.ToRadians()); this.Animations.Add(animateRotate); this.EnsureTotalDuration(delaySeconds, durationSeconds); return(this); }
private CATransform3D RollTransform(nfloat rollAngle) { var radians = rollAngle.ToRadians(); return(CATransform3D.MakeRotation(radians, 0.0f, 0.0f, 1.0f)); }