Free |
public virtual void RotateTo( Point3D targetCameraPosition, Vector3D targetUpDirection, int animationDurationInMilliseconds = 0, Func<double, double> easingFunction = null, FreeCameraAnimationNodeFreeCameraAnimationTypes animationType = FreeCameraAnimationNodeFreeCameraAnimationTypes.SphericalInterpolation )
RotateTo method animates the CameraPosition and UpDirection to the targetCameraPosition and targetUpDirection. The rotation preserves the TargetPosition and the distance between CameraPosition and TargetPosition. The animation takes animationDurationInMilliseconds and uses easingFunction.
This methods stops any existing animation or rotation that is currently running (except those that are running on AnimationController defined by the user; not in this camera).
easingFunction parameter can be set to any Func that takes a double value and returns another double values (both in range from 0 to 1). It is possible to use a predefined list of easing functions that are defined in Ab3d.Animation.EasingFunctions). When easingFunction parameter is null then linear interpolation is used.
By default (when animationType is SphericalInterpolation), the animation uses spherical interpolation instead of linear interpolation to come from the current to the target position.