MeshDeformDefs.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /*
  2. ** Command & Conquer Generals(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. *** Confidential - Westwood Studios ***
  20. ***********************************************************************************************
  21. * *
  22. * Project Name : Commando / G 3D engine *
  23. * *
  24. * File Name : MeshDeformDefs.h *
  25. * *
  26. * Programmer : Patrick Smith *
  27. * *
  28. * Start Date : 04/28/99 *
  29. * *
  30. * Last Update :
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #ifndef __MESH_DEFORM_DEFS_H
  36. #define __MESH_DEFORM_DEFS_H
  37. #include <Max.H>
  38. #include "Vector.H"
  39. ///////////////////////////////////////////////////////////////////////////
  40. //
  41. // Constants
  42. //
  43. ///////////////////////////////////////////////////////////////////////////
  44. typedef enum
  45. {
  46. VERT_POSITION = 1,
  47. VERT_COLORS = 2,
  48. BOTH = VERT_POSITION | VERT_COLORS
  49. } DEFORM_CHANNELS;
  50. ///////////////////////////////////////////////////////////////////////////
  51. //
  52. // Structures
  53. //
  54. ///////////////////////////////////////////////////////////////////////////
  55. ///////////////////////////////////////////////////////////////////////////
  56. //
  57. // VERT_INFO
  58. //
  59. // Used to represent position or color information for a vertex.
  60. //
  61. ///////////////////////////////////////////////////////////////////////////
  62. typedef struct _VERT_INFO
  63. {
  64. _VERT_INFO (void)
  65. : index (0),
  66. color_index (0),
  67. value (0,0,0) { }
  68. _VERT_INFO (int vert_index, const Point3 &point, int vert_color_index = 0)
  69. : index (vert_index),
  70. color_index (vert_color_index),
  71. value (point) { }
  72. UINT index;
  73. UINT color_index;
  74. Point3 value;
  75. // Don't care, DynamicVectorClass needs these
  76. bool operator== (const _VERT_INFO &src) { return false; }
  77. bool operator!= (const _VERT_INFO &src) { return true; }
  78. } VERT_INFO;
  79. ///////////////////////////////////////////////////////////////////////////
  80. //
  81. // Typedefs
  82. //
  83. ///////////////////////////////////////////////////////////////////////////
  84. typedef DynamicVectorClass<VERT_INFO> DEFORM_LIST;
  85. #endif //__MESH_DEFORM_DEFS_H