viewtrans.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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. /* $Header: /Commando/Code/Tools/ViewTrans/viewtrans.h 3 7/06/98 6:27p Greg_h $ */
  19. /***********************************************************************************************
  20. *** Confidential - Westwood Studios ***
  21. ***********************************************************************************************
  22. * *
  23. * Project Name : Matrix Viewer Utility *
  24. * *
  25. * File Name : VIEWTRANS.H *
  26. * *
  27. * Programmer : Greg Hjelstrom *
  28. * *
  29. * Start Date : 02/25/97 *
  30. * *
  31. * Last Update : February 25, 1997 [GH] *
  32. * *
  33. *---------------------------------------------------------------------------------------------*
  34. * Functions: *
  35. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  36. #ifndef VIEWTRANS_H
  37. #define VIEWTRANS_H
  38. #include <Max.h>
  39. #include <Quat.h>
  40. #include <UTILAPI.H>
  41. /****************************************************************************
  42. ** Globals
  43. */
  44. class TransViewerUtility;
  45. class UtilityClassDesc;
  46. extern HINSTANCE hInstance;
  47. extern TransViewerUtility TheUtility;
  48. extern UtilityClassDesc UtilityDesc;
  49. #define CATEGORY_NAME _T("Westwood Tools")
  50. #define ROLLUP_PAGE_TITLE _T("Transformation Viewer")
  51. #define VIEWTRANS_CLASS_NAME _T("Transformation Viewer")
  52. #define VIEWTRANS_CLASS_ID Class_ID(0x4e607ad, 0x155612cc)
  53. /*****************************************************************************
  54. *
  55. * Class declaration for TransViewerUtility.
  56. *
  57. * This utility simply displays the transformation matrices of the currently
  58. * selected node.
  59. *
  60. *****************************************************************************/
  61. class TransViewerUtility : public UtilityObj
  62. {
  63. public:
  64. TransViewerUtility();
  65. void OnInitDialog(HWND hWnd, LPARAM lParam);
  66. void BeginEditParams(Interface *ip, IUtil *iu);
  67. void EndEditParams(Interface *ip, IUtil *iu);
  68. void SelectionSetChanged(Interface *ip,IUtil *iu);
  69. void DeleteThis() {}
  70. void Display_Data
  71. (
  72. Matrix3 &nodetm,
  73. Matrix3 &objtm,
  74. Point3 &objoffpos,
  75. Quat &objoffrot,
  76. ScaleValue &objoffscl
  77. );
  78. // Keep ahold of pointer to our interfaces to MAX.
  79. IUtil *iu;
  80. Interface *ip;
  81. // Window handle to the dialog box.
  82. HWND hPanel;
  83. private:
  84. // windows Dialog Proc which manipulates this class's data.
  85. friend BOOL CALLBACK UtilityDlgProc(HWND hDlg, UINT message,
  86. WPARAM wParam, LPARAM lParam);
  87. };
  88. /*****************************************************************************
  89. *
  90. * Class Description
  91. *
  92. *****************************************************************************/
  93. class UtilityClassDesc : public ClassDesc
  94. {
  95. public:
  96. int IsPublic() {return 1;}
  97. void * Create(BOOL loading = FALSE) {return &TheUtility;}
  98. const TCHAR * ClassName() {return VIEWTRANS_CLASS_NAME;}
  99. SClass_ID SuperClassID() {return UTILITY_CLASS_ID;}
  100. Class_ID ClassID() {return VIEWTRANS_CLASS_ID;}
  101. const TCHAR* Category() {return CATEGORY_NAME;}
  102. };
  103. #endif /*VIEWTRANS_H*/