AccelerationStructureBuilder.h 935 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // Copyright (C) 2009-2021, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #pragma once
  6. #include <AnKi/Renderer/RendererObject.h>
  7. namespace anki
  8. {
  9. /// @addtogroup renderer
  10. /// @{
  11. /// Build acceleration structures.
  12. class AccelerationStructureBuilder : public RendererObject
  13. {
  14. public:
  15. AccelerationStructureBuilder(Renderer* r)
  16. : RendererObject(r)
  17. {
  18. }
  19. ~AccelerationStructureBuilder()
  20. {
  21. }
  22. ANKI_USE_RESULT Error init(const ConfigSet& cfg)
  23. {
  24. return Error::NONE;
  25. }
  26. void populateRenderGraph(RenderingContext& ctx);
  27. AccelerationStructureHandle getAccelerationStructureHandle() const
  28. {
  29. return m_runCtx.m_tlasHandle;
  30. }
  31. public:
  32. class
  33. {
  34. public:
  35. AccelerationStructurePtr m_tlas;
  36. AccelerationStructureHandle m_tlasHandle;
  37. } m_runCtx;
  38. void run(RenderPassWorkContext& rgraphCtx);
  39. };
  40. /// @}
  41. } // namespace anki