/// <summary> /// Create an exponential smoothing joint with default configuration values. /// </summary> /// <param name="jointType">The joint type to create</param> public ExponentialJoint(JointType jointType) : base(jointType) { var parms = new ExponentialSmoothingParameters(); _smoothing = parms.Smoothing; _correction = parms.Correction; _prediction = parms.Prediction; _jitterRadius = parms.JitterRadius; _maxDeviationRadius = parms.MaxDeviationRadius; _history = new FilterDoubleExponentialData(); }
/// <summary> /// Create an exponential smoothing joint with custom configuration values. /// </summary> /// <param name="jointType">The joint type to create</param> /// <param name="parameters">An <c>ExponentialSmoothingParameters</c> object</param> public ExponentialJoint(JointType jointType, ISmootherParameters parameters = null) : base(jointType) { var parms = parameters as ExponentialSmoothingParameters; if (parms == null) parms = new ExponentialSmoothingParameters(); _smoothing = parms.Smoothing; _correction = parms.Correction; _prediction = parms.Prediction; // Check for divide by zero. Use an epsilon of a 10th of a millimeter _jitterRadius = Math.Max(0.0001f, parms.JitterRadius); _maxDeviationRadius = parms.MaxDeviationRadius; _history = new FilterDoubleExponentialData(); }
/// <summary> /// Create an exponential smoothing joint with custom configuration values. /// </summary> /// <param name="jointType">The joint type to create</param> /// <param name="parameters">An <c>ExponentialSmoothingParameters</c> object</param> public ExponentialJoint(JointType jointType, ISmootherParameters parameters = null) : base(jointType) { var parms = parameters as ExponentialSmoothingParameters; if (parms == null) { parms = new ExponentialSmoothingParameters(); } _smoothing = parms.Smoothing; _correction = parms.Correction; _prediction = parms.Prediction; // Check for divide by zero. Use an epsilon of a 10th of a millimeter _jitterRadius = Math.Max(0.0001f, parms.JitterRadius); _maxDeviationRadius = parms.MaxDeviationRadius; _history = new FilterDoubleExponentialData(); }