VisualRotate Method (Visual, Axis, SpeedProfile) |
Namespace: Demo3D.Visuals
public void Rotate( Visual targetVisual, Axis axis, SpeedProfile speedProfile )
// 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. The deceleration component of the speed profile is not used. [Auto] SimpleVisualPropertyValue<Visual> target1; [Auto("OnClick")] void RotateVASp_OnClick(Visual sender, PickInfo pickInfo) { var speed = new SpeedProfile(360, 180, 10); sender.Rotate(target1.Visual, Axis.Y, speed); }