widgets.h 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. /***********************************************************************************************
  19. *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
  20. ***********************************************************************************************
  21. * *
  22. * Project Name : WWPhys *
  23. * *
  24. * $Archive:: /Commando/Code/wwphys/widgets.h $*
  25. * *
  26. * Author:: Greg Hjelstrom *
  27. * *
  28. * $Modtime:: 7/29/99 11:25a $*
  29. * *
  30. * $Revision:: 2 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #if defined(_MSC_VER)
  36. #pragma once
  37. #endif
  38. #ifndef WIDGETS_H
  39. #define WIDGETS_H
  40. class RenderObjClass;
  41. /*
  42. ** Debug Widgets. These render objects will be used by the physics debugging code
  43. ** to render bounding boxes, force vectors, co-ordinate axes, etc. These are meant
  44. ** to be rendered immediately and then released because someone else could come along
  45. ** and get a pointer to the same object.
  46. */
  47. class WidgetSystem
  48. {
  49. public:
  50. enum WidgetType
  51. {
  52. WIDGET_AABOX = 0, // an AABoxRenderObjClass
  53. WIDGET_OBBOX, // an OBBoxRenderObjClass
  54. WIDGET_VECTOR, // a skin, designed to point along -z (use with lookat) with bones Point0, Point1
  55. WIDGET_AXES, // a mesh with red,green,and blue axes for +x,+y,+z
  56. WIDGET_POINT, // a 0.1m sphere
  57. NUM_WIDGETS
  58. };
  59. static void Init_Debug_Widgets(void);
  60. static void Release_Debug_Widgets(void);
  61. static RenderObjClass * Get_Debug_Widget(WidgetType id);
  62. protected:
  63. /*
  64. ** Debug widgets. These are render objects that are used to aid in debugging
  65. ** the physics system. They are allocated in Init_Debug_Widgets and released
  66. ** in Release_Debug_Widgets. Users can get at them through the Get_Debug_Widget
  67. ** call. They are meant to be rendered immediately and released.
  68. */
  69. #ifdef WWDEBUG
  70. static RenderObjClass * DebugWidgets[NUM_WIDGETS];
  71. #endif
  72. };
  73. #endif