SplineTestDoc.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. // SplineTestDoc.h : interface of the CSplineTestDoc class
  19. //
  20. /////////////////////////////////////////////////////////////////////////////
  21. #if !defined(AFX_SPLINETESTDOC_H__2AE09FDB_FBEF_11D2_9BD9_00A0C9988171__INCLUDED_)
  22. #define AFX_SPLINETESTDOC_H__2AE09FDB_FBEF_11D2_9BD9_00A0C9988171__INCLUDED_
  23. #if _MSC_VER > 1000
  24. #pragma once
  25. #endif // _MSC_VER > 1000
  26. #include "vector.h"
  27. class Curve3DClass;
  28. class Vector3;
  29. class CSplineTestDoc : public CDocument
  30. {
  31. protected: // create from serialization only
  32. CSplineTestDoc();
  33. DECLARE_DYNCREATE(CSplineTestDoc)
  34. // Attributes
  35. public:
  36. // Operations
  37. public:
  38. // Overrides
  39. // ClassWizard generated virtual function overrides
  40. //{{AFX_VIRTUAL(CSplineTestDoc)
  41. public:
  42. virtual BOOL OnNewDocument();
  43. virtual void Serialize(CArchive& ar);
  44. //}}AFX_VIRTUAL
  45. // Implementation
  46. public:
  47. virtual ~CSplineTestDoc();
  48. #ifdef _DEBUG
  49. virtual void AssertValid() const;
  50. virtual void Dump(CDumpContext& dc) const;
  51. #endif
  52. enum { LINEAR=0,CATMULL_ROM,CARDINAL,TCB,VEHICLE };
  53. void Reset_Curve(void);
  54. void Set_Curve_Type(int type);
  55. int Get_Curve_Type(void);
  56. Curve3DClass * Get_Curve(void);
  57. bool Grab_Point(const Vector3 & pos);
  58. bool Drag_Point(const Vector3 & pos);
  59. bool Release_Point(void);
  60. bool Is_Dragging(void);
  61. bool Add_Point(const Vector3 & pos);
  62. void Edit_Point(const Vector3 & pos);
  63. void Simulate_Turn_Radius (void);
  64. protected:
  65. int Pick(const Vector3 & pos);
  66. Curve3DClass * Create_Curve(int type);
  67. int CurveType;
  68. Curve3DClass * Curve;
  69. int DragIndex;
  70. // Generated message map functions
  71. protected:
  72. //{{AFX_MSG(CSplineTestDoc)
  73. // NOTE - the ClassWizard will add and remove member functions here.
  74. // DO NOT EDIT what you see in these blocks of generated code !
  75. //}}AFX_MSG
  76. DECLARE_MESSAGE_MAP()
  77. };
  78. /////////////////////////////////////////////////////////////////////////////
  79. //{{AFX_INSERT_LOCATION}}
  80. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  81. #endif // !defined(AFX_SPLINETESTDOC_H__2AE09FDB_FBEF_11D2_9BD9_00A0C9988171__INCLUDED_)