AuxGeomExampleComponent.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
  3. *
  4. * SPDX-License-Identifier: Apache-2.0 OR MIT
  5. *
  6. */
  7. #pragma once
  8. #include <CommonSampleComponentBase.h>
  9. #include <AzCore/Component/TickBus.h>
  10. #include <Utils/Utils.h>
  11. #include <Utils/ImGuiSidebar.h>
  12. namespace AtomSampleViewer
  13. {
  14. class AuxGeomExampleComponent final
  15. : public CommonSampleComponentBase
  16. , public AZ::TickBus::Handler
  17. {
  18. public:
  19. AZ_COMPONENT(AuxGeomExampleComponent, "{C7AC0D17-84D9-42A2-9EBA-2358C0F13074}", CommonSampleComponentBase);
  20. static void Reflect(AZ::ReflectContext* context);
  21. AuxGeomExampleComponent();
  22. ~AuxGeomExampleComponent() override = default;
  23. // AZ::Component
  24. void Activate() override;
  25. void Deactivate() override;
  26. // AZ::TickBus::Handler
  27. void OnTick(float deltaTime, AZ::ScriptTimePoint time) override;
  28. private: // functions
  29. void LoadConfigFiles();
  30. // Functions for each display option (currently there is only one
  31. void DrawSampleOfAllAuxGeom() const;
  32. // Functions used by DrawSampleOfAllAuxGeom
  33. private: // data
  34. ImGuiSidebar m_imguiSidebar;
  35. // draw options
  36. bool m_drawBackgroundBox = true;
  37. bool m_drawThreeGridsOfPoints = true;
  38. bool m_drawAxisLines = true;
  39. bool m_drawLines = true;
  40. bool m_drawTriangles = true;
  41. bool m_drawShapes = true;
  42. bool m_drawBoxes = true;
  43. bool m_drawManyPrimitives = true;
  44. bool m_drawDepthTestPrimitives = true;
  45. bool m_draw2DWireRect = true;
  46. };
  47. } // namespace AtomSampleViewer