W3DParticleSys.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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: W3DParticleSys.h /////////////////////////////////////////////////////////
  24. ///////////////////////////////////////////////////////////////////////////////
  25. #pragma once
  26. #ifndef __W3DParticleSys_H_
  27. #define __W3DParticleSys_H_
  28. #include "GameClient/ParticleSys.h"
  29. #include "WW3D2/PointGr.h"
  30. #include "WW3D2/streak.h"
  31. #include "WW3D2/RInfo.h"
  32. #include "WWLib/BitType.h"
  33. //=============================================================================
  34. /** W3D implementation of the game display which is responsible for creating
  35. * all interaction with the screen and updating the display
  36. */
  37. class W3DParticleSystemManager : public ParticleSystemManager
  38. {
  39. public:
  40. W3DParticleSystemManager();
  41. ~W3DParticleSystemManager();
  42. virtual void doParticles(RenderInfoClass &rinfo);
  43. virtual void queueParticleRender();
  44. ///< returns the number of particles shown on screen per frame
  45. virtual Int getOnScreenParticleCount() { return m_onScreenParticleCount; }
  46. private:
  47. enum { MAX_POINTS_PER_GROUP = 512 };
  48. PointGroupClass *m_pointGroup; ///< the point group that contains all of the particles
  49. StreakLineClass *m_streakLine; ///< the streak class that contains all of the streaks
  50. ShareBufferClass<Vector3> *m_posBuffer; ///< array of particle positions
  51. ShareBufferClass<Vector4> *m_RGBABuffer; ///< array of particle color and alpha
  52. ShareBufferClass<float> *m_sizeBuffer; ///< array of particle sizes
  53. ShareBufferClass<uint8> *m_angleBuffer; ///< array of particle orientations
  54. Bool m_readyToRender; ///< if true, it is OK to render
  55. };
  56. #endif // end __W3DParticleSys_H_