Open Source Tomb Raider Engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Selector.h 748B

123456789101112131415161718192021222324252627282930313233
  1. /*!
  2. * \file include/Selector.h
  3. * \brief Selector Window
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _SELECTOR_H_
  8. #define _SELECTOR_H_
  9. #include <array>
  10. class Selector {
  11. public:
  12. static void displaySelection();
  13. static void display();
  14. static bool isVisible() { return visible; }
  15. static void setVisible(bool v) { visible = v; }
  16. static void handleMouseClick(unsigned int x, unsigned int y, KeyboardButton button, bool released);
  17. private:
  18. static bool visible;
  19. static WorldObjects lastClickedObject;
  20. static std::array<bool, WorldObjectCount> clickOnObject;
  21. static glm::i32vec2 rayScreen;
  22. static glm::vec3 rayWorld, lastIntersectPos, lastIntersectNorm;
  23. static unsigned long lastIndexA, lastIndexB;
  24. };
  25. #endif