Area.h 653 B

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