AuxGeomExampleComponent.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. #pragma once
  9. #include <CommonSampleComponentBase.h>
  10. #include <AzCore/Component/TickBus.h>
  11. #include <Utils/Utils.h>
  12. #include <Utils/ImGuiSidebar.h>
  13. namespace AtomSampleViewer
  14. {
  15. class AuxGeomExampleComponent final
  16. : public CommonSampleComponentBase
  17. , public AZ::TickBus::Handler
  18. {
  19. public:
  20. AZ_COMPONENT(AuxGeomExampleComponent, "{C7AC0D17-84D9-42A2-9EBA-2358C0F13074}", CommonSampleComponentBase);
  21. static void Reflect(AZ::ReflectContext* context);
  22. AuxGeomExampleComponent();
  23. ~AuxGeomExampleComponent() override = default;
  24. // AZ::Component
  25. void Activate() override;
  26. void Deactivate() override;
  27. // AZ::TickBus::Handler
  28. void OnTick(float deltaTime, AZ::ScriptTimePoint time) override;
  29. private: // functions
  30. void LoadConfigFiles();
  31. // Functions for each display option (currently there is only one
  32. void DrawSampleOfAllAuxGeom() const;
  33. // Functions used by DrawSampleOfAllAuxGeom
  34. private: // data
  35. ImGuiSidebar m_imguiSidebar;
  36. // draw options
  37. bool m_drawBackgroundBox = true;
  38. bool m_drawThreeGridsOfPoints = true;
  39. bool m_drawAxisLines = true;
  40. bool m_drawLines = true;
  41. bool m_drawTriangles = true;
  42. bool m_drawShapes = true;
  43. bool m_drawBoxes = true;
  44. bool m_drawManyPrimitives = true;
  45. bool m_drawDepthTestPrimitives = true;
  46. bool m_draw2DWireRect = true;
  47. };
  48. } // namespace AtomSampleViewer