AuxGeomExampleComponent.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
  3. * its licensors.
  4. *
  5. * For complete copyright and license terms please see the LICENSE at the root of this
  6. * distribution (the "License"). All use of this software is governed by the License,
  7. * or, if provided, by the license below or the license accompanying this file. Do not
  8. * remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
  9. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. *
  11. */
  12. #pragma once
  13. #include <CommonSampleComponentBase.h>
  14. #include <AzCore/Component/TickBus.h>
  15. #include <Utils/Utils.h>
  16. #include <Utils/ImGuiSidebar.h>
  17. namespace AtomSampleViewer
  18. {
  19. class AuxGeomExampleComponent final
  20. : public CommonSampleComponentBase
  21. , public AZ::TickBus::Handler
  22. {
  23. public:
  24. AZ_COMPONENT(AuxGeomExampleComponent, "{C7AC0D17-84D9-42A2-9EBA-2358C0F13074}", CommonSampleComponentBase);
  25. static void Reflect(AZ::ReflectContext* context);
  26. AuxGeomExampleComponent();
  27. ~AuxGeomExampleComponent() override = default;
  28. // AZ::Component
  29. void Activate() override;
  30. void Deactivate() override;
  31. // AZ::TickBus::Handler
  32. void OnTick(float deltaTime, AZ::ScriptTimePoint time) override;
  33. private: // functions
  34. void LoadConfigFiles();
  35. // Functions for each display option (currently there is only one
  36. void DrawSampleOfAllAuxGeom() const;
  37. // Functions used by DrawSampleOfAllAuxGeom
  38. private: // data
  39. ImGuiSidebar m_imguiSidebar;
  40. // draw options
  41. bool m_drawBackgroundBox = true;
  42. bool m_drawThreeGridsOfPoints = true;
  43. bool m_drawAxisLines = true;
  44. bool m_drawLines = true;
  45. bool m_drawTriangles = true;
  46. bool m_drawShapes = true;
  47. bool m_drawBoxes = true;
  48. bool m_drawManyPrimitives = true;
  49. bool m_drawDepthTestPrimitives = true;
  50. bool m_draw2DWireRect = true;
  51. };
  52. } // namespace AtomSampleViewer