Ejemplo n.º 1
0
        public FormILFMatrixCalculator(RotationMatrix matrix)
        {
            this.m_Device = null;
              this.m_Mesh = null;
              this.m_Paused = false;

              InitializeComponent();

              this.m_FormRenderSurface = new FormILFRenderSurface();
              this.panelRenderSurface.Controls.Add(this.m_FormRenderSurface);
              this.m_FormRenderSurface.Visible = true;

              if (!this.InitializeGraphics()) {
            MessageBox.Show("Failed to initialize Direct3D.", "TRE Explorer", MessageBoxButtons.OK, MessageBoxIcon.Error);
              }

              EulerAngles eulerAngles = matrix.ToEulerAngles();

              this.trackBarXPitch.Value = eulerAngles.xPitch;
              this.trackBarYYaw.Value = eulerAngles.yYaw;
              this.trackBarZRoll.Value = eulerAngles.zRoll;

              this.m_OriginalXPitch = eulerAngles.xPitch;
              this.m_OriginalYYaw = eulerAngles.yYaw;
              this.m_OriginalZRoll = eulerAngles.zRoll;

              this.UpdateMatrix();
        }
Ejemplo n.º 2
0
        public EulerAngles(RotationMatrix rotationMatrix)
        {
            EulerAngles eulerAngles = rotationMatrix.ToEulerAngles();

              this.m_xPitch = eulerAngles.xPitch;
              this.m_yYaw = eulerAngles.yYaw;
              this.m_zRoll = eulerAngles.zRoll;
        }