AuxGeomFeatureProcessorInterface.cpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <Atom/RPI.Public/AuxGeom/AuxGeomFeatureProcessorInterface.h>
  9. #include <Atom/RPI.Public/RPISystemInterface.h>
  10. #include <Atom/RPI.Public/Scene.h>
  11. namespace AZ
  12. {
  13. namespace RPI
  14. {
  15. AuxGeomDrawPtr AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(const ScenePtr scenePtr)
  16. {
  17. return GetDrawQueueForScene(scenePtr.get());
  18. }
  19. AuxGeomDrawPtr AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(const Scene* scene)
  20. {
  21. AZ_Assert(scene, "invalid scene pointer");
  22. if (auto auxGeomFP = scene->GetFeatureProcessor<AuxGeomFeatureProcessorInterface>())
  23. {
  24. return auxGeomFP->GetDrawQueue();
  25. }
  26. else
  27. {
  28. return nullptr;
  29. }
  30. }
  31. }
  32. }