W3DModelDraw.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529
  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. // //
  20. // (c) 2001-2003 Electronic Arts Inc. //
  21. // //
  22. ////////////////////////////////////////////////////////////////////////////////
  23. // FILE: W3DModelDraw.h /////////////////////////////////////////////////////////////////////////
  24. // Author: Colin Day, November 2001
  25. // Desc: Default client update module
  26. ///////////////////////////////////////////////////////////////////////////////////////////////////
  27. #pragma once
  28. #ifndef __W3DModelDraw_H_
  29. #define __W3DModelDraw_H_
  30. // INCLUDES ///////////////////////////////////////////////////////////////////////////////////////
  31. #include "Common/ModelState.h"
  32. #include "Common/DrawModule.h"
  33. #ifdef BRUTAL_TIMING_HACK // hack for collecting model timing info. jba.
  34. class RenderObjClass {
  35. public:
  36. enum AnimMode
  37. {
  38. ANIM_MODE_MANUAL = 0,
  39. ANIM_MODE_LOOP,
  40. ANIM_MODE_ONCE,
  41. ANIM_MODE_LOOP_PINGPONG,
  42. ANIM_MODE_LOOP_BACKWARDS, //make sure only backwards playing animations after this one
  43. ANIM_MODE_ONCE_BACKWARDS,
  44. };
  45. };
  46. #else
  47. #include "WW3D2/RendObj.h"
  48. #endif
  49. #include "Common/SparseMatchFinder.h"
  50. #include "GameClient/ParticleSys.h"
  51. #include "Common/STLTypedefs.h"
  52. // FORWARD REFERENCES /////////////////////////////////////////////////////////////////////////////
  53. class Thing;
  54. class RenderObjClass;
  55. class Shadow;
  56. class TerrainTracksRenderObjClass;
  57. class HAnimClass;
  58. enum GameLODLevel;
  59. //-------------------------------------------------------------------------------------------------
  60. /** The default client update module */
  61. //-------------------------------------------------------------------------------------------------
  62. //-------------------------------------------------------------------------------------------------
  63. typedef UnsignedInt64 TransitionSig;
  64. const TransitionSig NO_TRANSITION = 0;
  65. inline TransitionSig buildTransitionSig(NameKeyType src, NameKeyType dst)
  66. {
  67. return (((UnsignedInt64)src) << 32) | ((UnsignedInt64)dst);
  68. }
  69. inline NameKeyType recoverSrcState(TransitionSig sig)
  70. {
  71. return (NameKeyType)((sig >> 32) & 0xffffffff);
  72. }
  73. inline NameKeyType recoverDstState(TransitionSig sig)
  74. {
  75. return (NameKeyType)((sig) & 0xffffffff);
  76. }
  77. //-------------------------------------------------------------------------------------------------
  78. // please do not define RETAIN_ANIM_HANDLES. It prevents us from ever releasing animations.
  79. // old code should be deleting by mid-Jan 2003. (srj)
  80. #define NO_RETAIN_ANIM_HANDLES
  81. //-------------------------------------------------------------------------------------------------
  82. class W3DAnimationInfo
  83. {
  84. private:
  85. AsciiString m_name;
  86. #ifdef RETAIN_ANIM_HANDLES
  87. mutable HAnimClass* m_handle;
  88. #endif
  89. Real m_distanceCovered; // if nonzero, the distance covered by a single loop of the anim
  90. mutable Real m_naturalDurationInMsec;
  91. Bool m_isIdleAnim; // if true, we pick another animation at random when this one completes
  92. public:
  93. W3DAnimationInfo(const AsciiString& name, Bool isIdle, Real distanceCovered);
  94. W3DAnimationInfo(const W3DAnimationInfo &r);
  95. W3DAnimationInfo &operator=(const W3DAnimationInfo& r);
  96. ~W3DAnimationInfo();
  97. HAnimClass* getAnimHandle() const;
  98. const AsciiString& getName() const { return m_name; }
  99. Bool isIdleAnim() const { return m_isIdleAnim; }
  100. Real getDistanceCovered() const { return m_distanceCovered; }
  101. Real getNaturalDurationInMsec() const { return m_naturalDurationInMsec; }
  102. };
  103. typedef std::vector<W3DAnimationInfo> W3DAnimationVector;
  104. //-------------------------------------------------------------------------------------------------
  105. struct ParticleSysBoneInfo
  106. {
  107. AsciiString boneName;
  108. const ParticleSystemTemplate* particleSystemTemplate;
  109. };
  110. typedef std::vector<ParticleSysBoneInfo> ParticleSysBoneInfoVector;
  111. //-------------------------------------------------------------------------------------------------
  112. struct PristineBoneInfo
  113. {
  114. Matrix3D mtx;
  115. Int boneIndex;
  116. };
  117. //typedef std::hash_map< NameKeyType, PristineBoneInfo, rts::hash<NameKeyType>, rts::equal_to<NameKeyType> > PristineBoneInfoMap;
  118. typedef std::map< NameKeyType, PristineBoneInfo, std::less<NameKeyType> > PristineBoneInfoMap;
  119. //-------------------------------------------------------------------------------------------------
  120. struct ModelConditionInfo
  121. {
  122. struct HideShowSubObjInfo
  123. {
  124. AsciiString subObjName;
  125. Bool hide;
  126. };
  127. struct TurretInfo
  128. {
  129. // read from INI
  130. NameKeyType m_turretAngleNameKey;
  131. NameKeyType m_turretPitchNameKey;
  132. Real m_turretArtAngle;
  133. Real m_turretArtPitch;
  134. // calculated at runtime
  135. Int m_turretAngleBone;
  136. Int m_turretPitchBone;
  137. void clear()
  138. {
  139. m_turretAngleNameKey = NAMEKEY_INVALID;
  140. m_turretPitchNameKey = NAMEKEY_INVALID;
  141. m_turretArtAngle = 0;
  142. m_turretArtPitch = 0;
  143. m_turretAngleBone = 0;
  144. m_turretPitchBone = 0;
  145. }
  146. };
  147. struct WeaponBarrelInfo
  148. {
  149. Int m_recoilBone; ///< the W3D bone for this barrel (zero == no bone)
  150. Int m_fxBone; ///< the FX bone for this barrel (zero == no bone)
  151. Int m_muzzleFlashBone; ///< the muzzle-flash subobj bone for this barrel (zero == none)
  152. Matrix3D m_projectileOffsetMtx; ///< where the projectile fires from
  153. #if defined(_DEBUG) || defined(_INTERNAL)
  154. AsciiString m_muzzleFlashBoneName;
  155. #endif
  156. WeaponBarrelInfo()
  157. {
  158. clear();
  159. }
  160. void clear()
  161. {
  162. m_recoilBone = 0;
  163. m_fxBone = 0;
  164. m_muzzleFlashBone = 0;
  165. m_projectileOffsetMtx.Make_Identity();
  166. #if defined(_DEBUG) || defined(_INTERNAL)
  167. m_muzzleFlashBoneName.clear();
  168. #endif
  169. }
  170. void setMuzzleFlashHidden(RenderObjClass *fullObject, Bool hide) const;
  171. };
  172. typedef std::vector<WeaponBarrelInfo> WeaponBarrelInfoVec;
  173. #if defined(_DEBUG) || defined(_INTERNAL)
  174. AsciiString m_description;
  175. #endif
  176. std::vector<ModelConditionFlags> m_conditionsYesVec;
  177. AsciiString m_modelName;
  178. std::vector<HideShowSubObjInfo> m_hideShowVec;
  179. mutable std::vector<AsciiString> m_publicBones;
  180. AsciiString m_weaponFireFXBoneName[WEAPONSLOT_COUNT];
  181. AsciiString m_weaponRecoilBoneName[WEAPONSLOT_COUNT];
  182. AsciiString m_weaponMuzzleFlashName[WEAPONSLOT_COUNT];
  183. AsciiString m_weaponProjectileLaunchBoneName[WEAPONSLOT_COUNT];
  184. AsciiString m_weaponProjectileHideShowName[WEAPONSLOT_COUNT];
  185. W3DAnimationVector m_animations;
  186. NameKeyType m_transitionKey;
  187. NameKeyType m_allowToFinishKey;
  188. Int m_flags;
  189. Int m_iniReadFlags; // not read from ini, but used for helping with default states
  190. RenderObjClass::AnimMode m_mode;
  191. ParticleSysBoneInfoVector m_particleSysBones; ///< Bone names and attached particle systems.
  192. TransitionSig m_transitionSig;
  193. Real m_animMinSpeedFactor; //Min speed factor (randomized each time it's played)
  194. Real m_animMaxSpeedFactor; //Max speed factor (randomized each time it's played)
  195. mutable PristineBoneInfoMap m_pristineBones;
  196. mutable TurretInfo m_turrets[MAX_TURRETS];
  197. mutable WeaponBarrelInfoVec m_weaponBarrelInfoVec[WEAPONSLOT_COUNT];
  198. mutable Bool m_hasRecoilBonesOrMuzzleFlashes[WEAPONSLOT_COUNT];
  199. mutable Byte m_validStuff;
  200. enum
  201. {
  202. PRISTINE_BONES_VALID = 0x0001,
  203. TURRETS_VALID = 0x0002,
  204. HAS_PROJECTILE_BONES = 0x0004,
  205. BARRELS_VALID = 0x0008,
  206. PUBLIC_BONES_VALID = 0x0010
  207. };
  208. inline ModelConditionInfo()
  209. {
  210. clear();
  211. }
  212. void clear();
  213. void loadAnimations() const;
  214. void preloadAssets( TimeOfDay timeOfDay, Real scale ); ///< preload any assets for time of day
  215. inline Int getConditionsYesCount() const { DEBUG_ASSERTCRASH(m_conditionsYesVec.size() > 0, ("empty m_conditionsYesVec.size(), see srj")); return m_conditionsYesVec.size(); }
  216. inline const ModelConditionFlags& getNthConditionsYes(Int i) const { return m_conditionsYesVec[i]; }
  217. #if defined(_DEBUG) || defined(_INTERNAL)
  218. inline AsciiString getDescription() const { return m_description; }
  219. #endif
  220. const Matrix3D* findPristineBone(NameKeyType boneName, Int* boneIndex) const;
  221. Bool findPristineBonePos(NameKeyType boneName, Coord3D& pos) const;
  222. void addPublicBone(const AsciiString& boneName) const;
  223. Bool matchesMode(Bool night, Bool snowy) const;
  224. void validateStuff(RenderObjClass* robj, Real scale, const std::vector<AsciiString>& extraPublicBones) const;
  225. private:
  226. void validateWeaponBarrelInfo() const;
  227. void validateTurretInfo() const;
  228. void validateCachedBones(RenderObjClass* robj, Real scale) const;
  229. };
  230. typedef std::vector<ModelConditionInfo> ModelConditionVector;
  231. //-------------------------------------------------------------------------------------------------
  232. //typedef std::hash_map< TransitionSig, ModelConditionInfo, std::hash<TransitionSig>, std::equal_to<TransitionSig> > TransitionMap;
  233. typedef std::map< TransitionSig, ModelConditionInfo, std::less<TransitionSig> > TransitionMap;
  234. //-------------------------------------------------------------------------------------------------
  235. // this is more efficient and also helps solve a projectile-launch-offset problem for double-upgraded
  236. // technicals. it is not within risk, however, and WILL NOT WORK if the attach-to-module is animated
  237. // in any meaningful way, so be careful. (srj)
  238. #define CACHE_ATTACH_BONE
  239. //-------------------------------------------------------------------------------------------------
  240. class W3DModelDrawModuleData : public ModuleData
  241. {
  242. public:
  243. mutable ModelConditionVector m_conditionStates;
  244. mutable SparseMatchFinder< ModelConditionInfo, ModelConditionFlags >
  245. m_conditionStateMap;
  246. mutable TransitionMap m_transitionMap;
  247. std::vector<AsciiString> m_extraPublicBones;
  248. AsciiString m_trackFile; ///< if present, leaves tracks using this texture
  249. AsciiString m_attachToDrawableBone;
  250. #ifdef CACHE_ATTACH_BONE
  251. mutable Vector3 m_attachToDrawableBoneOffset;
  252. #endif
  253. Int m_defaultState;
  254. Int m_projectileBoneFeedbackEnabledSlots; ///< Hide and show the launch bone geometries according to clip status adjustments.
  255. Real m_initialRecoil;
  256. Real m_maxRecoil;
  257. Real m_recoilDamping;
  258. Real m_recoilSettle;
  259. StaticGameLODLevel m_minLODRequired; ///< minumum game LOD level necessary to use this module.
  260. ModelConditionFlags m_ignoreConditionStates;
  261. Bool m_okToChangeModelColor;
  262. Bool m_animationsRequirePower;///< Should UnderPowered disable type pause animations in this draw module?
  263. #ifdef CACHE_ATTACH_BONE
  264. mutable Bool m_attachToDrawableBoneOffsetValid;
  265. #endif
  266. mutable Byte m_validated;
  267. Bool m_particlesAttachedToAnimatedBones;
  268. Bool m_receivesDynamicLights; ///< just like it sounds... it sets a property of Drawable, actually
  269. W3DModelDrawModuleData();
  270. ~W3DModelDrawModuleData();
  271. void validateStuffForTimeAndWeather(const Drawable* draw, Bool night, Bool snowy) const;
  272. static void buildFieldParse(MultiIniFieldParse& p);
  273. AsciiString getBestModelNameForWB(const ModelConditionFlags& c) const;
  274. const ModelConditionInfo* findBestInfo(const ModelConditionFlags& c) const;
  275. void preloadAssets( TimeOfDay timeOfDay, Real scale ) const;
  276. #ifdef CACHE_ATTACH_BONE
  277. const Vector3* getAttachToDrawableBoneOffset(const Drawable* draw) const;
  278. #endif
  279. // ugh, hack
  280. virtual const W3DModelDrawModuleData* getAsW3DModelDrawModuleData() const { return this; }
  281. virtual StaticGameLODLevel getMinimumRequiredGameLOD() const { return m_minLODRequired;}
  282. private:
  283. static void parseConditionState( INI* ini, void *instance, void * /*store*/, const void* /*userData*/ );
  284. public:
  285. virtual void crc( Xfer *xfer );
  286. virtual void xfer( Xfer *xfer );
  287. virtual void loadPostProcess( void );
  288. };
  289. //-------------------------------------------------------------------------------------------------
  290. class W3DModelDraw : public DrawModule, public ObjectDrawInterface
  291. {
  292. MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( W3DModelDraw, "W3DModelDraw" )
  293. MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( W3DModelDraw, W3DModelDrawModuleData )
  294. public:
  295. W3DModelDraw( Thing *thing, const ModuleData* moduleData );
  296. // virtual destructor prototype provided by memory pool declaration
  297. /// preloading assets
  298. virtual void preloadAssets( TimeOfDay timeOfDay );
  299. /// the draw method
  300. virtual void doDrawModule(const Matrix3D* transformMtx);
  301. virtual void setShadowsEnabled(Bool enable);
  302. virtual void releaseShadows(void); ///< frees all shadow resources used by this module - used by Options screen.
  303. virtual void allocateShadows(void); ///< create shadow resources if not already present. Used by Options screen.
  304. #if defined(_DEBUG) || defined(_INTERNAL)
  305. virtual void getRenderCost(RenderCost & rc) const; ///< estimates the render cost of this draw module
  306. void getRenderCostRecursive(RenderCost & rc,RenderObjClass * robj) const;
  307. #endif
  308. virtual void setFullyObscuredByShroud(Bool fullyObscured);
  309. virtual void setTerrainDecal(TerrainDecalType type);
  310. virtual Bool isVisible() const;
  311. virtual void reactToTransformChange(const Matrix3D* oldMtx, const Coord3D* oldPos, Real oldAngle);
  312. virtual void reactToGeometryChange() { }
  313. // this method must ONLY be called from the client, NEVER From the logic, not even indirectly.
  314. virtual Bool clientOnly_getRenderObjInfo(Coord3D* pos, Real* boundingSphereRadius, Matrix3D* transform) const;
  315. virtual Bool clientOnly_getRenderObjBoundBox(OBBoxClass * boundbox) const;
  316. virtual Bool clientOnly_getRenderObjBoneTransform(const AsciiString & boneName,Matrix3D * set_tm) const;
  317. virtual Int getPristineBonePositionsForConditionState(const ModelConditionFlags& condition, const char* boneNamePrefix, Int startIndex, Coord3D* positions, Matrix3D* transforms, Int maxBones) const;
  318. virtual Int getCurrentBonePositions(const char* boneNamePrefix, Int startIndex, Coord3D* positions, Matrix3D* transforms, Int maxBones) const;
  319. virtual Bool getCurrentWorldspaceClientBonePositions(const char* boneName, Matrix3D& transform) const;
  320. virtual Bool getProjectileLaunchOffset(const ModelConditionFlags& condition, WeaponSlotType wslot, Int specificBarrelToUse, Matrix3D* launchPos, WhichTurretType tur, Coord3D* turretRotPos, Coord3D* turretPitchPos = NULL) const;
  321. virtual void updateProjectileClipStatus( UnsignedInt shotsRemaining, UnsignedInt maxShots, WeaponSlotType slot ); ///< This will do the show/hide work if ProjectileBoneFeedbackEnabled is set.
  322. virtual void updateDrawModuleSupplyStatus( Int maxSupply, Int currentSupply ); ///< This will do visual feedback on Supplies carried
  323. virtual void notifyDrawModuleDependencyCleared( ){}///< if you were waiting for something before you drew, it's ready now
  324. virtual void setHidden(Bool h);
  325. virtual void replaceModelConditionState(const ModelConditionFlags& c);
  326. virtual void replaceIndicatorColor(Color color);
  327. virtual Bool handleWeaponFireFX(WeaponSlotType wslot, Int specificBarrelToUse, const FXList* fxl, Real weaponSpeed, const Coord3D* victimPos, Real damageRadius);
  328. virtual Int getBarrelCount(WeaponSlotType wslot) const;
  329. virtual void setSelectable(Bool selectable); // Change the selectability of the model.
  330. /**
  331. This call says, "I want the current animation (if any) to take n frames to complete a single cycle".
  332. If it's a looping anim, each loop will take n frames. someday, we may want to add the option to insert
  333. "pad" frames at the start and/or end, but for now, we always just "stretch" the animation to fit.
  334. Note that you must call this AFTER setting the condition codes.
  335. */
  336. virtual void setAnimationLoopDuration(UnsignedInt numFrames);
  337. /**
  338. similar to the above, but assumes that the current state is a "ONCE",
  339. and is smart about transition states... if there is a transition state
  340. "inbetween", it is included in the completion time.
  341. */
  342. virtual void setAnimationCompletionTime(UnsignedInt numFrames);
  343. /**
  344. This call is used to pause or resume an animation.
  345. */
  346. virtual void setPauseAnimation(Bool pauseAnim);
  347. //Kris: Manually set a drawable's current animation to specific frame.
  348. virtual void setAnimationFrame( int frame );
  349. virtual void updateSubObjects();
  350. virtual void showSubObject( const AsciiString& name, Bool show );
  351. #ifdef ALLOW_ANIM_INQUIRIES
  352. // srj sez: not sure if this is a good idea, for net sync reasons...
  353. virtual Real getAnimationScrubScalar( void ) const;
  354. #endif
  355. virtual ObjectDrawInterface* getObjectDrawInterface() { return this; }
  356. virtual const ObjectDrawInterface* getObjectDrawInterface() const { return this; }
  357. ///@todo: I had to make this public because W3DDevice needs access for casting shadows -MW
  358. inline RenderObjClass *getRenderObject() { return m_renderObject; }
  359. virtual Bool updateBonesForClientParticleSystems( void );///< this will reposition particle systems on the fly ML
  360. virtual void onDrawableBoundToObject();
  361. virtual void setTerrainDecalSize(Real x, Real y);
  362. virtual void setTerrainDecalOpacity(Real o);
  363. protected:
  364. virtual void onRenderObjRecreated(void){};
  365. inline const ModelConditionInfo* getCurState() const { return m_curState; }
  366. void setModelState(const ModelConditionInfo* newState);
  367. const ModelConditionInfo* findBestInfo(const ModelConditionFlags& c) const;
  368. void handleClientTurretPositioning();
  369. void handleClientRecoil();
  370. void recalcBonesForClientParticleSystems();
  371. void stopClientParticleSystems();
  372. void doHideShowSubObjs(const std::vector<ModelConditionInfo::HideShowSubObjInfo>* vec);
  373. virtual void adjustTransformMtx(Matrix3D& mtx) const;
  374. Real getCurAnimDistanceCovered() const;
  375. Bool setCurAnimDurationInMsec(Real duration);
  376. inline Bool getFullyObscuredByShroud() const { return m_fullyObscuredByShroud; }
  377. private:
  378. struct WeaponRecoilInfo
  379. {
  380. enum RecoilState
  381. {
  382. IDLE, RECOIL_START, RECOIL, SETTLE
  383. };
  384. RecoilState m_state; ///< what state this gun is in
  385. Real m_shift; ///< how far the gun barrel has recoiled
  386. Real m_recoilRate; ///< how fast the gun barrel is recoiling
  387. WeaponRecoilInfo()
  388. {
  389. clear();
  390. }
  391. void clear()
  392. {
  393. m_state = IDLE;
  394. m_shift = 0.0f;
  395. m_recoilRate = 0.0f;
  396. }
  397. };
  398. struct ParticleSysTrackerType
  399. {
  400. ParticleSystemID id;
  401. Int boneIndex;
  402. };
  403. typedef std::vector<WeaponRecoilInfo> WeaponRecoilInfoVec;
  404. typedef std::vector<ParticleSysTrackerType> ParticleSystemIDVec;
  405. //typedef std::vector<ParticleSystemID> ParticleSystemIDVec;
  406. const ModelConditionInfo* m_curState;
  407. const ModelConditionInfo* m_nextState;
  408. UnsignedInt m_nextStateAnimLoopDuration;
  409. Int m_hexColor;
  410. Int m_whichAnimInCurState; ///< the index of the currently playing anim in cur state (if any)
  411. WeaponRecoilInfoVec m_weaponRecoilInfoVec[WEAPONSLOT_COUNT];
  412. Bool m_needRecalcBoneParticleSystems;
  413. Bool m_fullyObscuredByShroud;
  414. Bool m_shadowEnabled; ///< cached state of shadow. Used to determine if shadows should be enabled via options screen.
  415. RenderObjClass* m_renderObject; ///< W3D Render object for this drawable
  416. Shadow* m_shadow; ///< Updates/Renders shadows of this object
  417. Shadow* m_terrainDecal;
  418. TerrainTracksRenderObjClass* m_trackRenderObject; ///< This is rendered under object
  419. ParticleSystemIDVec m_particleSystemIDs; ///< The ID numbers of the particle systems currently running.
  420. std::vector<ModelConditionInfo::HideShowSubObjInfo> m_subObjectVec;
  421. Bool m_hideHeadlights;
  422. Bool m_pauseAnimation;
  423. Int m_animationMode;
  424. void adjustAnimation(const ModelConditionInfo* prevState, Real prevAnimFraction);
  425. Real getCurrentAnimFraction() const;
  426. void applyCorrectModelStateAnimation();
  427. const ModelConditionInfo* findTransitionForSig(TransitionSig sig) const;
  428. void rebuildWeaponRecoilInfo(const ModelConditionInfo* state);
  429. void doHideShowProjectileObjects( UnsignedInt showCount, UnsignedInt maxCount, WeaponSlotType slot );///< Means effectively, show m of n.
  430. void nukeCurrentRender(Matrix3D* xform);
  431. void doStartOrStopParticleSys();
  432. void adjustAnimSpeedToMovementSpeed();
  433. static void hideAllMuzzleFlashes(const ModelConditionInfo* state, RenderObjClass* renderObject);
  434. void hideAllHeadlights(Bool hide);
  435. #if defined(_DEBUG) || defined(_INTERNAL) //art wants to see buildings without flags as a test.
  436. void hideGarrisonFlags(Bool hide);
  437. #endif
  438. };
  439. #endif // __W3DModelDraw_H_