Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
2.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #if !defined(AFX_TORUSDLG_H__C146AA5D_38FE_11D1_AFC9_0060979D2F4E__INCLUDED_)
  9. #define AFX_TORUSDLG_H__C146AA5D_38FE_11D1_AFC9_0060979D2F4E__INCLUDED_
  10. #if _MSC_VER >= 1000
  11. #pragma once
  12. #endif // _MSC_VER >= 1000
  13. // TorusDlg.h : header file
  14. //
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CTorusDlg dialog
  17. #define ARC_MAX_POINTS 4096
  18. class CTorusDlg : public CDialog
  19. {
  20. // Construction
  21. public:
  22. CTorusDlg(Vector& bmins, Vector& bmaxs, CWnd* pParent = NULL); // standard constructor
  23. ~CTorusDlg(); // standard constructor
  24. void DrawTorusTopView( CDC *pDC );
  25. void DrawTorusCrossSection( CDC *pDC );
  26. float GetTorusCrossSectionRadius() const;
  27. BOOL bInitialized;
  28. Vector bmins, bmaxs;
  29. // Dialog Data
  30. //{{AFX_DATA(CTorusDlg)
  31. enum { IDD = IDD_TORUS };
  32. CSpinButtonCtrl m_cStartAngleSpin;
  33. CSpinButtonCtrl m_cWallWidthSpin;
  34. CEdit m_cWallWidth;
  35. CSpinButtonCtrl m_cSidesSpin;
  36. CEdit m_cSides;
  37. CSpinButtonCtrl m_cArcSpin;
  38. CEdit m_cArc;
  39. CStatic m_cPreview;
  40. CStatic m_cTopViewPreview;
  41. int m_iSides;
  42. int m_iWallWidth;
  43. float m_fArc;
  44. float m_fAngle;
  45. float m_fRotationArc;
  46. float m_fRotationAngle;
  47. int m_iRotationSides;
  48. int m_iAddHeight;
  49. float m_fCrossSectionRadius;
  50. //}}AFX_DATA
  51. void SetMaxWallWidth(int iMaxWallWidth) { m_iMaxWallWidth = iMaxWallWidth; }
  52. void SaveValues();
  53. // Overrides
  54. // ClassWizard generated virtual function overrides
  55. //{{AFX_VIRTUAL(CTorusDlg)
  56. protected:
  57. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  58. //}}AFX_VIRTUAL
  59. // Implementation
  60. protected:
  61. float MaxTorusCrossSectionRadius() const;
  62. int m_iMaxWallWidth;
  63. // Generated message map functions
  64. //{{AFX_MSG(CTorusDlg)
  65. afx_msg void OnChangeArc();
  66. afx_msg void OnChangeTorusArc();
  67. afx_msg void OnCircle();
  68. afx_msg void OnComputeRadius();
  69. afx_msg void OnUpdateSides();
  70. afx_msg void OnUpdateWallwidth();
  71. virtual BOOL OnInitDialog();
  72. afx_msg void OnPaint();
  73. afx_msg void OnTorusPreview();
  74. //}}AFX_MSG
  75. DECLARE_MESSAGE_MAP()
  76. };
  77. //{{AFX_INSERT_LOCATION}}
  78. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  79. #endif // !defined(AFX_TORUSDLG_H__C146AA5D_38FE_11D1_AFC9_0060979D2F4E__INCLUDED_)