geometryexportcontext.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /*
  2. ** Command & Conquer Generals Zero Hour(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 : Max2W3D *
  23. * *
  24. * $Archive:: /Commando/Code/Tools/max2w3d/geometryexportcontext.h $*
  25. * *
  26. * Original Author:: Greg Hjelstrom *
  27. * *
  28. * $Author:: Greg_h $*
  29. * *
  30. * $Modtime:: 10/19/00 11:32a $*
  31. * *
  32. * $Revision:: 1 $*
  33. * *
  34. *---------------------------------------------------------------------------------------------*
  35. * Functions: *
  36. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  37. #ifndef GEOMETRYEXPORTCONTEXT_H
  38. #define GEOMETRYEXPORTCONTEXT_H
  39. #include <Max.h>
  40. class ChunkSaveClass;
  41. class MaxWorldInfoClass;
  42. class HierarchySaveClass;
  43. class INodeListClass;
  44. class Progress_Meter_Class;
  45. struct W3dExportOptionsStruct;
  46. /**
  47. ** ExportContextClass
  48. ** This class encapsulates a bunch of datastructures needed during the geometry export
  49. ** process.
  50. ** NOTE: The user must plug in a valid ProgressMeter before each export operation.
  51. */
  52. class GeometryExportContextClass
  53. {
  54. public:
  55. GeometryExportContextClass( char * model_name,
  56. ChunkSaveClass & csave,
  57. MaxWorldInfoClass & world_info,
  58. W3dExportOptionsStruct & options,
  59. HierarchySaveClass * htree,
  60. INode * origin,
  61. INodeListClass * origin_list,
  62. TimeValue curtime,
  63. unsigned int *materialColors
  64. ) :
  65. CSave(csave),
  66. WorldInfo(world_info),
  67. Options(options),
  68. CurTime(curtime),
  69. HTree(htree),
  70. OriginList(origin_list),
  71. Origin(origin),
  72. OriginTransform(1),
  73. ProgressMeter(NULL),
  74. materialColors(materialColors),
  75. numMaterialColors(0),
  76. numHouseColors(0),
  77. materialColorTexture(NULL)
  78. {
  79. ModelName = strdup(model_name);
  80. OriginTransform = Origin->GetNodeTM(CurTime);
  81. }
  82. ~GeometryExportContextClass(void)
  83. {
  84. delete[] ModelName;
  85. }
  86. char * ModelName;
  87. ChunkSaveClass & CSave;
  88. MaxWorldInfoClass & WorldInfo;
  89. W3dExportOptionsStruct & Options;
  90. TimeValue CurTime;
  91. HierarchySaveClass * HTree;
  92. INodeListClass * OriginList;
  93. INode * Origin;
  94. Matrix3 OriginTransform;
  95. Progress_Meter_Class * ProgressMeter;
  96. unsigned int * materialColors; ///MW: holds all used material colors.
  97. int numMaterialColors; ///MW: number of used material colors.
  98. int numHouseColors; ///MW: number of used house colors
  99. char * materialColorTexture; //MW: texture to hold material colors
  100. };
  101. #endif //GEOMETRYEXPORTCONTEXT_H