EmitterPhysicsPropPage.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. /*
  2. ** Command & Conquer Renegade(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #if !defined(AFX_EMITTERPHYSICSPROPPAGE_H__83A8B83E_BA3B_11D2_9FFA_00104B791122__INCLUDED_)
  19. #define AFX_EMITTERPHYSICSPROPPAGE_H__83A8B83E_BA3B_11D2_9FFA_00104B791122__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. // EmitterPhysicsPropPage.h : header file
  24. //
  25. #include "Resource.H"
  26. #include "Vector3.H"
  27. // Forward delcarations
  28. class EmitterInstanceListClass;
  29. class Vector3Randomizer;
  30. /////////////////////////////////////////////////////////////////////////////
  31. // EmitterPhysicsPropPageClass dialog
  32. class EmitterPhysicsPropPageClass : public CPropertyPage
  33. {
  34. DECLARE_DYNCREATE(EmitterPhysicsPropPageClass)
  35. // Construction
  36. public:
  37. EmitterPhysicsPropPageClass (EmitterInstanceListClass *pemitter_list = NULL);
  38. ~EmitterPhysicsPropPageClass ();
  39. // Dialog Data
  40. //{{AFX_DATA(EmitterPhysicsPropPageClass)
  41. enum { IDD = IDD_PROP_PAGE_EMITTER_PHYSICS };
  42. CSpinButtonCtrl m_OutSpin;
  43. CSpinButtonCtrl m_InheritanceSpin;
  44. CSpinButtonCtrl m_VelocityZSpin;
  45. CSpinButtonCtrl m_VelocityYSpin;
  46. CSpinButtonCtrl m_VelocityXSpin;
  47. CSpinButtonCtrl m_AccelZSpin;
  48. CSpinButtonCtrl m_AccelYSpin;
  49. CSpinButtonCtrl m_AccelXSpin;
  50. //}}AFX_DATA
  51. // Overrides
  52. // ClassWizard generate virtual function overrides
  53. //{{AFX_VIRTUAL(EmitterPhysicsPropPageClass)
  54. public:
  55. virtual BOOL OnApply();
  56. protected:
  57. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  58. virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
  59. virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
  60. //}}AFX_VIRTUAL
  61. // Implementation
  62. protected:
  63. // Generated message map functions
  64. //{{AFX_MSG(EmitterPhysicsPropPageClass)
  65. virtual BOOL OnInitDialog();
  66. afx_msg void OnSpecifyVelocityRandom();
  67. //}}AFX_MSG
  68. DECLARE_MESSAGE_MAP()
  69. public:
  70. /////////////////////////////////////////////////////////
  71. //
  72. // Public methods
  73. //
  74. //
  75. // Inline accessors
  76. //
  77. EmitterInstanceListClass * Get_Emitter (void) const { return m_pEmitterList; }
  78. void Set_Emitter (EmitterInstanceListClass *pemitter_list) { m_pEmitterList = pemitter_list; Initialize (); }
  79. bool Is_Data_Valid (void) const { return m_bValid; }
  80. Vector3Randomizer * Get_Velocity_Random (void) const { return m_Randomizer; }
  81. const Vector3 & Get_Velocity (void) const { return m_Velocity; }
  82. const Vector3 & Get_Acceleration (void) const { return m_Acceleration; }
  83. float Get_Out_Factor (void) const { return m_OutFactor; }
  84. float Get_Inheritance_Factor (void) const { return m_InheritanceFactor; }
  85. protected:
  86. /////////////////////////////////////////////////////////
  87. //
  88. // Protected methods
  89. //
  90. void Initialize (void);
  91. void On_Setting_Changed (UINT ctrl_id);
  92. private:
  93. /////////////////////////////////////////////////////////
  94. //
  95. // Private member data
  96. //
  97. EmitterInstanceListClass * m_pEmitterList;
  98. bool m_bValid;
  99. Vector3 m_Velocity;
  100. Vector3 m_Acceleration;
  101. float m_OutFactor;
  102. float m_InheritanceFactor;
  103. Vector3Randomizer * m_Randomizer;
  104. };
  105. //{{AFX_INSERT_LOCATION}}
  106. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  107. #endif // !defined(AFX_EMITTERPHYSICSPROPPAGE_H__83A8B83E_BA3B_11D2_9FFA_00104B791122__INCLUDED_)