BsBansheeSceneManager.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #pragma once
  2. #include "BsBansheeSMPrerequisites.h"
  3. #include "BsSceneManager.h"
  4. namespace BansheeEngine
  5. {
  6. /**
  7. * @brief Default scene manager implementation. Allows you to query
  8. * the scene graph for various uses.
  9. *
  10. * TODO - Update doc when I implement this properly
  11. */
  12. class BS_SM_EXPORT BansheeSceneManager : public SceneManager
  13. {
  14. public:
  15. BansheeSceneManager() {}
  16. ~BansheeSceneManager() {}
  17. /**
  18. * @brief Returns a list of all cameras in the scene.
  19. */
  20. const Vector<HCamera>& getAllCameras() const { return mCachedCameras; }
  21. /**
  22. * @brief Returns a list of all renderables visible by the provided camera.
  23. */
  24. Vector<HRenderable> getVisibleRenderables(const HCamera& camera) const;
  25. /**
  26. * @brief Update world bounds of all renderables. This should be called
  27. * at the end or beginning of every frame to ensure bounds are kept
  28. * up to date.
  29. */
  30. void updateRenderableBounds();
  31. private:
  32. /**
  33. * @brief Called by scene objects whenever a new component is added to the scene.
  34. */
  35. void notifyComponentAdded(const HComponent& component);
  36. /**
  37. * @brief Called by scene objects whenever a new component is destroyed.
  38. */
  39. void notifyComponentRemoved(const HComponent& component);
  40. Vector<HCamera> mCachedCameras;
  41. Vector<HRenderable> mRenderables;
  42. };
  43. }