public void RotateDelta_ForTrackball(DeltaInfo info) { var delta = info.End - info.Start; if (delta.Length == 0) { return; } matrixTransform.Rotate(new Vector3D(delta.Y, delta.X, 0), delta.Length); }
public void RotateDelta(DeltaInfo info) { var delta = info.End - info.Start; var deltaLength = delta.Length; if (deltaLength == 0) { return; } var distance = GetDistance((Vector)info.Start, delta); delta *= AxisXYLength / deltaLength; matrixTransform.Rotate(new Vector3D(delta.Y, delta.X, distance), AngleRatio * deltaLength); }