BsPhysicsManager.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. /** @addtogroup Physics-Internal
  9. * @{
  10. */
  11. /** Creates and destroys a specific physics implementation. */
  12. class BS_CORE_EXPORT PhysicsFactory
  13. {
  14. public:
  15. virtual ~PhysicsFactory() { }
  16. /** Initializes the physics system. */
  17. virtual void startUp(bool cooking) = 0;
  18. /** Shuts down the physics system. */
  19. virtual void shutDown() = 0;
  20. };
  21. /** Takes care of loading, initializing and shutting down of a particular physics implementation. */
  22. class BS_CORE_EXPORT PhysicsManager : public Module<PhysicsManager>
  23. {
  24. public:
  25. /**
  26. * Initializes the physics manager and a particular physics implementation.
  27. *
  28. * @param[in] pluginName Name of the plugin containing a physics implementation.
  29. * @param[in] cooking Should the cooking library be initialized with physics (normally only needed for
  30. * editor).
  31. */
  32. PhysicsManager(const String& pluginName, bool cooking);
  33. ~PhysicsManager();
  34. private:
  35. DynLib* mPlugin;
  36. PhysicsFactory* mFactory;
  37. };
  38. /** @} */
  39. }