VisualTurnTo Method (Axis, Double, SpeedProfile, RotationDirection) |
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: 18.04.00
Syntaxpublic void TurnTo(
Axis axis,
double target,
SpeedProfile speedProfile,
RotationDirection direction
)
Parameters
- axis
- Type: Demo3D.CommonAxis
The turn will be around this axis. - target
- Type: SystemDouble
The target rotation in degrees. - speedProfile
- Type: Demo3D.VisualsSpeedProfile
The speed profile to be used when turning. - direction
- Type: Demo3D.VisualsRotationDirection
The direction in which to rotate.
The positive clockwise direction is taken to be the clockwise direction when looking 'down' the axis arrow.
Examples
void TurnToADSPRD_OnClick(Visual sender, PickInfo pickInfo)
{
var speed = new SpeedProfile(5, 20, 5);
sender.TurnTo(Axis.Y, 40, speed, RotationDirection.Clockwise);
}
See Also