private void PerspectiveButton_CheckedChanged(object sender, EventArgs e) { if (xPerspectiveButton.Checked) { mCurrentPerspective = mPerspectives[Perspective.X]; } if (yPerspectiveButton.Checked) { mCurrentPerspective = mPerspectives[Perspective.Y]; } if (zPerspectiveButton.Checked) { mCurrentPerspective = mPerspectives[Perspective.Z]; } realSpacePanel.Invalidate(); }
public CoordinatorForm() { InitializeComponent(); mPerspectives.Add(Perspective.X, new TwoDPerspective(Perspective.X)); mPerspectives.Add(Perspective.Y, new TwoDPerspective(Perspective.Y)); mPerspectives.Add(Perspective.Z, new TwoDPerspective(Perspective.Z)); mCurrentPerspective = mPerspectives[Perspective.Z]; float normalized = (mCurrentPerspective.Scale - sPerspectiveScaleMin) / sPerspectiveScaleRange; float sRange = realSpaceScale.Maximum - realSpaceScale.Minimum; realSpaceScale.Value = (int)(realSpaceScale.Minimum + normalized * sRange); heightmapPanel.MouseWheel += new MouseEventHandler(heightmapPanel_MouseWheel); realSpacePanel.MouseWheel += new MouseEventHandler(realSpaceScale_MouseWheel); eyePositionPanel.Text = "Eye Position"; virtualPositionPanel.Text = "Camera Position"; virtualOrientationPanel.Text = "Camera Orientation"; }
private void PerspectiveButton_CheckedChanged(object sender, EventArgs e) { if (xPerspectiveButton.Checked) mCurrentPerspective = mPerspectives[Perspective.X]; if (yPerspectiveButton.Checked) mCurrentPerspective = mPerspectives[Perspective.Y]; if (zPerspectiveButton.Checked) mCurrentPerspective = mPerspectives[Perspective.Z]; realSpacePanel.Invalidate(); }