/// <summary> /// rotate slab with specific angle /// </summary> /// <param name="xAngle">rotate angle in X direction</param> /// <param name="yAngle">rotate angle in Y direction</param> public void RotateFloor(double xAngle, double yAngle) { if (0 == xAngle && 0 == yAngle) { return; } m_rotateAngleX += xAngle; m_rotateAngleY += yAngle; Matrix4 rotateX = Matrix4.RotateX(m_rotateAngleX); Matrix4 rotateY = Matrix4.RotateY(m_rotateAngleY); Matrix4 rotateMatrix = Matrix4.Multiply(rotateX, rotateY); m_rotateMatrix = Matrix4.Multiply(m_MoveToPictureBoxCenter.Inverse(), rotateMatrix); m_rotateMatrix = Matrix4.Multiply(m_rotateMatrix, m_MoveToPictureBoxCenter); }