Area.h 636 B

1234567891011121314151617181920212223242526272829303132
  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. };
  21. typedef int Directions;
  22. #define ANY_DIRECTION NORTH | EAST | SOUTH | WEST | TOP | BOTTOM
  23. Direction getOppositeDirection( Direction dir );
  24. Directions getDirections( Framework::Vec3<float> currentPos, Framework::Vec3<float> otherPos );
  25. Framework::Vec3<int> getDirection( Directions dir );
  26. int getDirectionIndex( Direction dir );
  27. Direction getDirectionFromIndex( int index );