Area.h 649 B

1234567891011121314151617181920212223242526272829303132333435
  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. Direction getOppositeDirection(Direction dir);
  25. Directions getDirections(
  26. Framework::Vec3<float> currentPos, Framework::Vec3<float> otherPos);
  27. Framework::Vec3<int> getDirection(Directions dir);
  28. int getDirectionIndex(Direction dir);
  29. Direction getDirectionFromIndex(int index);