Area.h 647 B

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. #include <Vec3.h>
  3. struct Area
  4. {
  5. int startX;
  6. int startY;
  7. int endX;
  8. int endY;
  9. int dimensionId;
  10. };
  11. enum Direction
  12. {
  13. NO_DIRECTION = 0,
  14. NORTH = 1,
  15. EAST = 2,
  16. SOUTH = 4,
  17. WEST = 8,
  18. TOP = 16,
  19. BOTTOM = 32,
  20. INSIDE = 64
  21. };
  22. typedef int Directions;
  23. #define ANY_DIRECTION NORTH | EAST | SOUTH | WEST | TOP | BOTTOM
  24. Framework::Vec3<int> getDirection(Directions dir);
  25. int getDirectionIndex(Direction dir);
  26. Direction getOppositeDirection(Direction dir);
  27. Direction getDirectionFromIndex(int index);
  28. Directions getDirectionsFromVector(Framework::Vec3<float> dir);