Esempio n. 1
0
 internal Uniform6DTransformation(AnimatableWrapper wrapper, Motion6D.ReferenceFrame frame,
                                  bool realtime, double[] changeFrameTime, TimeSpan forecastTime)
 {
     transform.Children.Add(rotate_uniform);            // Adds uniform rotation
     transform.Children.Add(rotate_const);              // Adds constant rptation
     transform.Children.Add(translation);               // Adds translation
     rotate_const.Rotation   = quaternionConstRotation; // Setting quaterion for constant rotation
     rotate_uniform.Rotation = angle_uniform;           // Setting axis rotation for uniform rotation
     this.wrapper            = wrapper;
     animatable           = wrapper.Animatable;
     dependencyProperty   = wrapper.DependencyProperty;
     this.frame           = frame;
     this.changeFrameTime = changeFrameTime;
     From       = 0;
     To         = 1;
     calculator = new Motion6D.Uniform6D.Uniform6DMotion(frame, rotationAxis,
                                                         changeFrameTime, forecastTime.TotalSeconds,
                                                         wrapper.Animated.CoordinateError, wrapper.Animated.AngleError);
     animated      = wrapper.Animated;
     forecast      = animated.ForecastTime;
     this.realtime = realtime;
     if (realtime)
     {
         calculator.InitializePrediction(forecast.TotalSeconds);
     }
     calculator.Change += Motion_Change;
 }
Esempio n. 2
0
 private Uniform6DTransformation(Uniform6DTransformation lm)
     : this(lm.wrapper, lm.frame, lm.realtime, lm.changeFrameTime, lm.forecast)
 {
     rotationAxis = lm.rotationAxis;
     queue        = lm.queue;
     calculator   = lm.calculator;
     currentTime  = lm.currentTime;
     startTime    = lm.startTime;
     From         = lm.From;
     To           = lm.To;
     Set();
 }