VisualRotate Method (Visual, Axis, SpeedProfile, RotationDirection) |
Namespace: Demo3D.Visuals
public void Rotate( Visual targetVisual, Axis axis, SpeedProfile speedProfile, RotationDirection direction )
// This example will rotate a visual (sender) around the Y axis of visual target1 when clicked, // at a speed of 360 degrees per second (1 revolution per second), after accelerating to this speed // at 180 deg/s^2, in the clockwise direction. The deceleration component of the speed profile is not used. [Auto] SimpleVisualPropertyValue<Visual> target; [Auto("OnClick")] void RotateVASpRd_OnClick(Visual sender, PickInfo pickInfo) { var speed = new SpeedProfile(360, 180, 10); sender.Rotate(target.Visual, Axis.Y, speed, RotationDirection.Clockwise); }