ParticleSystemTranslatorManager.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * Copyright (C) 2022 The V-Gears Team
  3. *
  4. * This file is part of V-Gears
  5. *
  6. * V-Gears is free software: you can redistribute it and/or modify it under
  7. * terms of the GNU General Public License as published by the Free Software
  8. * Foundation, version 3.0 (GPLv3) of the License.
  9. *
  10. * V-Gears 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. #pragma once
  16. #include <OgreScriptTranslator.h>
  17. #include <OgreSingleton.h>
  18. #include "ParticleEmitterTranslator.h"
  19. #include "ParticleRendererTranslator.h"
  20. #include "ParticleSystemTranslator.h"
  21. #include "ParticleTechniqueTranslator.h"
  22. /**
  23. * The particle system translator manager.
  24. */
  25. class ParticleSystemTranslatorManager : public Ogre::ScriptTranslatorManager{
  26. public:
  27. /**
  28. * Get the translator count.
  29. *
  30. * @return The translator count.
  31. */
  32. size_t getNumTranslators() const;
  33. /**
  34. * Retreieves the translator for a node.
  35. *
  36. * @param node[in] The node for whose type to get the translator.
  37. * @return The translator for the type of NODE, of nullptr if there is
  38. * no translator for it's type of node.
  39. */
  40. Ogre::ScriptTranslator *getTranslator(
  41. const Ogre::AbstractNodePtr &node
  42. );
  43. private:
  44. /**
  45. * The particle emitter translator.
  46. */
  47. ParticleEmitterTranslator emitter_translator_;
  48. /**
  49. * The renderer translator.
  50. */
  51. ParticleRendererTranslator renderer_translator_;
  52. /**
  53. * The particle system translator.
  54. */
  55. ParticleSystemTranslator particle_system_translator_;
  56. /**
  57. * The technique translator.
  58. */
  59. ParticleTechniqueTranslator technique_translator_;
  60. };