|
SphericalCameraRotateTo Method |
Animates the camera rotation to the targetHeading and targetAttitude. The animation takes animationDurationInMilliseconds and uses easingFunction.
By default (when useShortestPath is true), the animation uses the shortest path to get to the target heading and attitude.
Namespace: Ab3d.CamerasAssembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.2.9104.2045
Syntax public virtual void RotateTo(
double targetHeading,
double targetAttitude,
int animationDurationInMilliseconds = 0,
Func<double, double> easingFunction = null,
bool useShortestPath = true
)
Parameters
- targetHeading Double
- Camera's Heading value after the animation is complete; when NaN the current Heading value is preserved
- targetAttitude Double
- Camera's Attitude value after the animation is complete; when NaN the current Attitude value is preserved
- animationDurationInMilliseconds Int32 (Optional)
- duration of animation in milliseconds
- easingFunction FuncDouble, Double (Optional)
- easing function (see Ab3d.Animation.EasingFunctions for different easing functions). When null linear interpolation is used.
- useShortestPath Boolean (Optional)
- when true (by default) the camera will be animated to use the shortest part to the target heading and attitude. When false the animation will change heading and attitude from the current to the new values without normalizing or otherwise optimizing the angles.
Remarks RotateTo animates the camera rotation to the targetHeading and targetAttitude. 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.
When useShortestPath parameter is true (by default),
the camera will be animated to use the shortest part to the target heading and attitude.
When useShortestPath is false the animation will change heading and attitude from the current to the new values without normalizing or otherwise optimizing the angles.
See Also