private void checkBoxVar_CheckedChanged(object sender, EventArgs e)
 {
     if (checkBoxVar.Checked)
     {
         labelInicial.Text = "Inicial";
         labelFinal.Text = "Final";
         Final = new WigglerKeyFrame();
         propertyGridFinal.SelectedObject = Final;
         propertyGridFinal.Enabled = true;
     }
     else
     {
         labelInicial.Text = "Absoluto";
         labelFinal.Text = "";
         propertyGridFinal.SelectedObject = null;
         propertyGridFinal.Enabled = false;
     }
 }
        WigglerKeyFrame Lerp(float step, WigglerKeyFrame that)
        {
            WigglerKeyFrame ret = new WigglerKeyFrame();

            ret.MinX = Lerp(step, this.MinX, that.MinX);
            ret.MaxX = Lerp(step, this.MaxX, that.MaxX);
            ret.MinY = Lerp(step, this.MinY, that.MinY);
            ret.MaxY = Lerp(step, this.MaxY, that.MaxY);
            ret.MinRotation = Lerp(step, this.MinRotation, that.MinRotation);
            ret.MaxRotation = Lerp(step, this.MaxRotation, that.MaxRotation);
            ret.MinScale = Lerp(step, this.MinScale, that.MinScale);
            ret.MaxScale = Lerp(step, this.MaxScale, that.MaxScale);

            return ret;
        }
        public MainForm(Vegas vegas)
        {
            InitializeComponent();
            MyVegas = vegas;

            Inicial = new WigglerKeyFrame();

            propertyGridInicial.SelectedObject = Inicial;
            propertyGridFinal.SelectedObject = null;
        }
 public void RandomizeRelative(VideoMotionKeyframe k, Random r, float step, WigglerKeyFrame f)
 {
     WigglerKeyFrame tmp = Lerp(step, f);
     tmp.Randomize(k, r);
 }