Click or drag to resize

VisualTurnTo(Axis, Double, SpeedProfile, RotationDirection) Method

Turns to a target rotation. An acceleration or deceleration of zero is handled as infinity, meaning the top speed is instantly reached, and movement is immediately stopped respectively.

Namespace: Demo3D.Visuals
Assembly: Demo3D.Core (in Demo3D.Core.dll) Version: 19.00.00
Syntax
C#
public void TurnTo(
	Axis axis,
	double target,
	SpeedProfile speedProfile,
	RotationDirection direction
)

Parameters

axis  Axis
The turn will be around this axis.
target  Double
The target rotation in degrees.
speedProfile  SpeedProfile
The speed profile to be used when turning.
direction  RotationDirection
The direction in which to rotate. The positive clockwise direction is taken to be the clockwise direction when looking 'down' the axis arrow.
Example
C#
// This example will turn a visual 40 degrees around the Y axis,
// at a given speed profile, and in the clockwise direction.
void TurnToADSPRD_OnClick(Visual sender, PickInfo pickInfo)
{
    var speed = new SpeedProfile(5, 20, 5);
    sender.TurnTo(Axis.Y, 40, speed, RotationDirection.Clockwise);
}
See Also