public bool NearlySimilar(EntryFLY other) { return(CameraPosition.NearEqual(other.CameraPosition) && CameraNormalizedRight.NearEqual(other.CameraNormalizedRight) && CameraNormalizedUp.NearEqual(other.CameraNormalizedUp) && CameraNormalizedBackward.NearEqual(other.CameraNormalizedBackward)); }
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; }
private void buttonAdd_Click(object sender, EventArgs e) { var entry = new EntryFLY() { FrameNumer = listBoxFlyEntries.Items.Count }; SetViewToFly(entry); listBoxFlyEntries.Items.Add(entry); }
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; } }