UiCommon.h 478 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef ANKI_UI_UI_COMMON_H
  2. #define ANKI_UI_UI_COMMON_H
  3. #include "anki/Math.h"
  4. #include "anki/util/Allocator.h"
  5. namespace anki {
  6. /// @addtogroup ui
  7. /// @{
  8. /// Color
  9. typedef Vec4 UiColor;
  10. /// 2D point
  11. typedef Vec2 UiPoint;
  12. /// 2D position
  13. typedef Vec2 UiPosition;
  14. /// Rectangle
  15. struct UiRect
  16. {
  17. UiPosition min;
  18. UiPosition max;
  19. UiRect(UiPosition min_, UiPosition max_)
  20. : min(min_), max(max_)
  21. {
  22. ANKI_ASSERT(min < max);
  23. }
  24. };
  25. /// @}
  26. } // end namespace anki
  27. #endif