BsRenderableProxy.h 776 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #pragma once
  2. #include "BsCorePrerequisites.h"
  3. #include "BsMaterial.h"
  4. #include "BsBounds.h"
  5. #include "BsMatrix4.h"
  6. namespace BansheeEngine
  7. {
  8. // TODO UNDOCUMENTED
  9. class BS_CORE_EXPORT RenderableElement
  10. {
  11. public:
  12. RenderableElement();
  13. void markBoundsDirty() { mBoundsDirty = true; }
  14. void markBoundsClean() { mBoundsDirty = false; }
  15. bool getBoundsDirty() const { return mBoundsDirty; }
  16. Bounds calculateWorldBounds();
  17. UINT32 id;
  18. Matrix4 worldTransform;
  19. MeshRenderDataPtr mesh;
  20. Material::CoreProxyPtr material;
  21. UINT64 layer;
  22. private:
  23. bool mBoundsDirty;
  24. };
  25. class BS_CORE_EXPORT RenderableProxy
  26. {
  27. public:
  28. ~RenderableProxy();
  29. Vector<RenderableElement*> renderableElements;
  30. };
  31. typedef std::shared_ptr<RenderableProxy> RenderableProxyPtr;
  32. }