BsRenderableProxy.cpp 487 B

12345678910111213141516171819202122232425
  1. #include "BsRenderableProxy.h"
  2. namespace BansheeEngine
  3. {
  4. RenderableElement::RenderableElement()
  5. :mBoundsDirty(false), id(0), mesh(nullptr)
  6. { }
  7. Bounds RenderableElement::calculateWorldBounds()
  8. {
  9. if (mesh == nullptr)
  10. return Bounds();
  11. Bounds worldBounds = mesh->bounds;
  12. worldBounds.transformAffine(worldTransform);
  13. return worldBounds;
  14. }
  15. RenderableProxy::~RenderableProxy()
  16. {
  17. for (auto& renderableElement : renderableElements)
  18. bs_delete(renderableElement);
  19. }
  20. }