Esempio n. 1
0
 public bool NearlySimilar(EntryFLY other)
 {
     return(CameraPosition.NearEqual(other.CameraPosition) &&
            CameraNormalizedRight.NearEqual(other.CameraNormalizedRight) &&
            CameraNormalizedUp.NearEqual(other.CameraNormalizedUp) &&
            CameraNormalizedBackward.NearEqual(other.CameraNormalizedBackward));
 }
Esempio n. 2
0
 private void SetViewToFly(EntryFLY entry)
 {
     entry.CameraPosition           = Program.MainForm.renderer.Camera.Position;
     entry.CameraNormalizedRight    = Program.MainForm.renderer.Camera.Right;
     entry.CameraNormalizedUp       = Program.MainForm.renderer.Camera.Up;
     entry.CameraNormalizedBackward = -Program.MainForm.renderer.Camera.Forward;
 }
Esempio n. 3
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            var entry = new EntryFLY()
            {
                FrameNumer = listBoxFlyEntries.Items.Count
            };

            SetViewToFly(entry);
            listBoxFlyEntries.Items.Add(entry);
        }
Esempio n. 4
0
        public void Record()
        {
            var newFly = new EntryFLY
            {
                FrameNumer = listBoxFlyEntries.Items.Count,
                ApertureX  = 0.98f,
                ApertureY  = 0.735f,
                Focal      = 26.69057f
            };

            SetViewToFly(newFly);

            var lastIndex = listBoxFlyEntries.Items.Count - 1;

            if (lastIndex < 0 || !((EntryFLY)listBoxFlyEntries.Items[lastIndex]).NearlySimilar(newFly))
            {
                switcher = !switcher;
                if (switcher)
                {
                    listBoxFlyEntries.Items.Add(newFly);
                }
                labelFrame.Text = "Frame: " + newFly.FrameNumer;
            }
        }