VisualTurnTo Method (Visual, Axis, Double, SpeedProfile) |
Turns to a target rotation.
Namespace:
Demo3D.Visuals
Assembly:
Demo3D.Core (in Demo3D.Core.dll) Version: 15.0.2.11458
Syntaxpublic void TurnTo(
Visual targetVisual,
Axis axis,
double target,
SpeedProfile speedProfile
)
Parameters
- targetVisual
- Type: Demo3D.VisualsVisual
The turn will be in this visual's coordinate space.
If the visual itself is passed in here it will rotate in the coordinate space of its parent, or the scene if there is no parent. - axis
- Type: Demo3D.CommonAxis
The turn will be around this axis (in the targetVisual's coordinate space.) - target
- Type: SystemDouble
The target rotation in degrees. - speedProfile
- Type: Demo3D.VisualsSpeedProfile
The speed profile to be used when turning.
Examples
void TurnToVADSP_OnClick(Visual sender, PickInfo pickInfo)
{
var speed = new SpeedProfile(5, 20, 5);
sender.TurnTo(sender, Axis.Y, 40, speed);
}
See Also