Пример #1
0
 public bool Equals(VolumeCurve volumeCurve)
 {
     for (int i = 0; i < _defaultVolumePoint.Length; i++)
     {
         if (Math.Abs((float)(this.VolumePoint[i] - volumeCurve.VolumePoint[i])) >= 0.0001f)
         {
             return(false);
         }
     }
     return(true);
 }
Пример #2
0
        public void ResetMeasureVolumeCurveToDefault()
        {
            VolumeCurve volumeCurve = new VolumeCurve();

            switch (this.Index)
            {
            case 2:
                volumeCurve.SetCurvedVolume(0, 0.7f);
                volumeCurve.SetCurvedVolume(0, 0.7f);
                volumeCurve.SetCurvedVolume(0, 0.6f);
                volumeCurve.SetCurvedVolume(0, 0.6f);
                volumeCurve.SetCurvedVolume(0, 0.7f);
                volumeCurve.SetCurvedVolume(0, 0.7f);
                volumeCurve.SetCurvedVolume(0, 0.5f);
                volumeCurve.SetCurvedVolume(0, 0.5f);
                break;
            }
            this.SetMeasureVolumeCurve(0, volumeCurve);
        }
Пример #3
0
 public void SetMeasureVolumeCurve(int measureIndex, VolumeCurve volumeCurve)
 {
     if (measureIndex >= 0)
     {
         if ((measureIndex > 0) && volumeCurve.Equals(this.GetMeasureVolumeCurve(measureIndex - 1)))
         {
             this.ClearMeasureVolumeCurve(measureIndex);
         }
         else
         {
             if (this._measureVolumeCurveMap.ContainsKey(measureIndex))
             {
                 this._measureVolumeCurveMap[measureIndex] = volumeCurve;
             }
             else
             {
                 this._measureVolumeCurveMap.Add(measureIndex, volumeCurve);
             }
             McUtility.MarkModified(this.GetMeasure(measureIndex));
         }
     }
 }