Exemple #1
0
        private void StartRealtimePrivate(double time, DateTime start)
        {
            startTime           = start;
            this.Duration       = forecast;
            this.RepeatBehavior = new RepeatBehavior(1);
            calculator.StartRealtime(time);
            this.Completed += Linear6DMotion_RealtimeAnimationCompleted;
            System.Windows.Media.Media3D.Vector3D v =
                new System.Windows.Media.Media3D.Vector3D(rotationAxis[0],
                                                          rotationAxis[1], rotationAxis[2]);
            angle_uniform.Axis  = v;
            angle_uniform.Angle = 0;
            double[]   quaternion = calculator.QuaternionBegin;
            double[]   coord      = calculator.Begin;
            Quaternion qua        = new Quaternion(quaternion[1], quaternion[2], quaternion[3], quaternion[0]);

            quaternionConstRotation.Quaternion = qua;
            translation.OffsetX = coord[0];
            translation.OffsetY = coord[1];
            translation.OffsetZ = coord[2];
            From = 0;
            To   = 1;
            animatable.BeginAnimation(dependencyProperty, this);
        }