为3d立方体创建“平移”

时间:2014-07-17 13:23:08

标签: c# wpf

我有一个3D立方体,我想知道我怎么能为此做PAN?

我设法创建缩放和旋转。

我需要一个3d对象的例子,

你能帮助我吗?

抱歉我的英文

编辑:

private void Button_Click_6(object sender, RoutedEventArgs e)
    {

        RotateTransform3D myRotateTransform = new RotateTransform3D(new AxisAngleRotation3D(new Vector3D(0, 0, 0), 1));

        DoubleAnimation myAnimation = new DoubleAnimation();
        myAnimation.From = 1;
        myAnimation.To = 361;
        myAnimation.Duration = new Duration(TimeSpan.FromMilliseconds(5000));
        myAnimation.RepeatBehavior = RepeatBehavior.Forever;

        myRotateTransform.Rotation.BeginAnimation(AxisAngleRotation3D.AngleProperty, myAnimation);


        BoxOR9GR10.Transform = myRotateTransform;
    }

0 个答案:

没有答案