Click or drag to resize
AB4D logo

TargetPositionCameraAnimateTo Method

Animates the TargetPosition, Distance and CameraWidth to the specified values. The animation takes animationDurationInMilliseconds and uses the specified easingFunction.

Namespace: Ab3d.Cameras
Assembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.1.8864.1045
Syntax
C#
public void AnimateTo(
	Point3D finalTargetPosition,
	double finalDistance,
	double finalCameraWidth,
	int animationDurationInMilliseconds,
	Func<double, double> easingFunction = null
)

Parameters

finalTargetPosition  Point3D
Camera's TargetPosition value after the animation is complete
finalDistance  Double
Camera's Distance value after the animation is complete
finalCameraWidth  Double
Camera's CameraWidth value after the animation is complete
animationDurationInMilliseconds  Int32
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.
Remarks

AnimateTo animates the TargetPosition, Distance and CameraWidth to the specified values. The animation takes animationDurationInMilliseconds and uses the specified 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.

See Also