BsPhysicsManager.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsCorePrerequisites.h"
  5. #include "BsModule.h"
  6. namespace BansheeEngine
  7. {
  8. /** @cond INTERNAL */
  9. /** @addtogroup Physics
  10. * @{
  11. */
  12. /** Creates and destroys a specific physics implementation. */
  13. class BS_CORE_EXPORT PhysicsFactory
  14. {
  15. public:
  16. virtual ~PhysicsFactory() { }
  17. /** Initializes the physics system. */
  18. virtual void startUp(bool cooking) = 0;
  19. /** Shuts down the physics system. */
  20. virtual void shutDown() = 0;
  21. };
  22. /** Takes care of loading, initializing and shutting down of a particular physics implementation. */
  23. class BS_CORE_EXPORT PhysicsManager : public Module<PhysicsManager>
  24. {
  25. public:
  26. /**
  27. * Initializes the physics manager and a particular physics implementation.
  28. *
  29. * @param[in] pluginName Name of the plugin containing a physics implementation.
  30. * @param[in] cookign Should the cooking library be initialized with physics (normally only needed for
  31. * editor).
  32. */
  33. PhysicsManager(const String& pluginName, bool cooking);
  34. ~PhysicsManager();
  35. private:
  36. DynLib* mPlugin;
  37. PhysicsFactory* mFactory;
  38. };
  39. /** @} */
  40. /** @endcond */
  41. }