Click or drag to resize
AB4D logo

BaseCameraStartRotation Method (Double, Double)

StartRotation method immediately starts Heading and Attitude animation for this camera. To slowly start the camera rotation and than accelerating the rotation, use the StartRotation(Double, Double, Double, BaseCameraEasingFunctionDelegate) method.

Namespace:  Ab3d.Cameras
Assembly:  Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 10.1.8147.1045
Syntax
C#
public void StartRotation(
	double headingChangeInSecond,
	double attitudeChangeInSecond
)

Parameters

headingChangeInSecond
Type: SystemDouble
How many degrees the heading will be changed in one second
attitudeChangeInSecond
Type: SystemDouble
How many degrees the attitude will be changed in one second
Remarks

StartRotation method immediately starts Heading and Attitude animation for this camera.

To slowly start the camera rotation and than accelerating the rotation, use the StartRotation(Double, Double, Double, BaseCameraEasingFunctionDelegate) method.

The method can be used to simply rotate the camera around.

In contrast to the WPF animation, the Heading and Attitude values are not locked during animation. This way the camera can be still freely controlled by user with MouseCameraController or CameraControlPanel.

To check if the camera is currently being rotated, see the value of the IsRotating property. Note that after calling StopRotation(Double, BaseCameraEasingFunctionDelegate) method and specifying the decelerationSpeed, the IsRotating is still true until the camera rotation is stopped.

The animation can be stopped with StopRotation or StopRotation(Double, BaseCameraEasingFunctionDelegate) methods. It is also automatically stopped when the camera is Unloaded (when the Unload even occurs).

When StartRotation is called when the rotation is already animated, StopRotation will be called and than the animation will start again.

See Also