VisualTurnTo(Visual, Axis, Double, Double) Method |
Turns to a target rotation. If the targetVisual is the same as the rotating visual, the target rotation will be away from the visual's initial rotation.
Namespace: Demo3D.VisualsAssembly: Demo3D.Core (in Demo3D.Core.dll) Version: 19.00.00
Syntaxpublic void TurnTo(
Visual targetVisual,
Axis axis,
double target,
double speed
)
Parameters
- targetVisual Visual
- 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 Axis
- The turn will be around this axis (in the targetVisual's coordinate space.)
- target Double
- The target rotation in degrees.
- speed Double
- The speed to be used when turning in degrees per second.
Example
void TurnToVADD_OnClick(Visual sender, PickInfo pickInfo)
{
sender.TurnTo(sender, Axis.Y, 40, 20);
}
See Also