w3dutil.h 4.8 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/max2w3d/w3dutil.h 29 10/26/00 5:59p Greg_h $ */
  19. /***********************************************************************************************
  20. *** Confidential - Westwood Studios ***
  21. ***********************************************************************************************
  22. * *
  23. * Project Name : Commando Tools - W3D export *
  24. * *
  25. * $Archive:: /Commando/Code/Tools/max2w3d/w3dutil.h $*
  26. * *
  27. * $Author:: Greg_h $*
  28. * *
  29. * $Modtime:: 10/26/00 4:40p $*
  30. * *
  31. * $Revision:: 29 $*
  32. * *
  33. *---------------------------------------------------------------------------------------------*
  34. * Functions: *
  35. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  36. #ifndef W3DUTIL_H
  37. #define W3DUTIL_H
  38. #include <Max.h>
  39. #include "utilapi.h"
  40. #include "dllmain.h"
  41. #include "resource.h"
  42. #include "util.h"
  43. #include "w3dappdata.h"
  44. #define W3DUtilityClassID Class_ID(0x3c362c97, 0x5fc73ab0)
  45. ClassDesc * Get_W3D_Utility_Desc(void);
  46. /*
  47. ** W3dExportOptionsStruct - This structure is AppData that is attached
  48. ** not to an INode, but to the exporter class itself. It stores the
  49. ** export settings so that they come up the same next time, which
  50. ** facilitates batch exporting (just use the stored settings).
  51. **
  52. ** WWScript.dlx uses this structure to tell if a scene depends on
  53. ** the HTree exported by another scene.
  54. */
  55. struct W3dExportOptionsStruct
  56. {
  57. bool ExportHierarchy;
  58. bool LoadHierarchy;
  59. bool ExportAnimation;
  60. bool ExportGeometry;
  61. // Hierarchy Export options:
  62. bool TranslationOnly;
  63. char HierarchyFilename[_MAX_PATH];
  64. char RelativeHierarchyFilename[_MAX_PATH]; // For storing in MAX file
  65. // Animation Export options:
  66. int StartFrame;
  67. int EndFrame;
  68. // Geometry Export options;
  69. bool UseVoxelizer;
  70. // Option to apply smoothing between mesh boundaries
  71. bool SmoothBetweenMeshes;
  72. int space[10]; // blank space, so compression options default proper
  73. // More Animation Options
  74. bool CompressAnimation;
  75. bool ReduceAnimation;
  76. int ReduceAnimationPercent;
  77. int CompressAnimationFlavor;
  78. float CompressAnimationTranslationError;
  79. float CompressAnimationRotationError;
  80. bool ReviewLog;
  81. // Option to prevent the exporter from exporting AABTrees with the meshes
  82. // Defined with the "inverse" sense so that older Max files default to having
  83. // AABTrees exported with their meshes.
  84. bool DisableExportAABTrees;
  85. // Option to cause the exporter to optimize mesh data. Defaulting to zero
  86. // causes older Max files to default to not messing with their mesh data.
  87. bool EnableOptimizeMeshData;
  88. // Option to cause the exporter to ignore the Export_Transform setting for
  89. // all meshes. Terrains should have all meshes exported in world space.
  90. bool EnableTerrainMode;
  91. };
  92. /*
  93. ** Functions to access the W3D AppData of any INode.
  94. ** An accessor function for each AppData we define is required.
  95. ** Our extensions to the MAXScript language (wwCopyAppData)
  96. ** uses these accessors.
  97. */
  98. W3DAppData0Struct * GetW3DAppData0 (INode *node);
  99. W3DAppData1Struct * GetW3DAppData1 (INode *node);
  100. W3DAppData2Struct * GetW3DAppData2 (INode *node);
  101. W3DDazzleAppDataStruct * GetW3DDazzleAppData(INode *node);
  102. #endif