Counter Strike : Global Offensive Source Code
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.

61 lines
950 B

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef POINT_H
  8. #define POINT_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui/vgui.h>
  13. namespace vgui
  14. {
  15. //-----------------------------------------------------------------------------
  16. // Purpose: Basic handler for a Points in 2 dimensions
  17. // This class is fully inline
  18. //-----------------------------------------------------------------------------
  19. class Point
  20. {
  21. public:
  22. // constructors
  23. Point()
  24. {
  25. SetPoint(0, 0);
  26. }
  27. Point(int x,int y)
  28. {
  29. SetPoint(x,y);
  30. }
  31. void SetPoint(int x1, int y1)
  32. {
  33. x=x1;
  34. y=y1;
  35. }
  36. void GetPoint(int &x1, int &y1) const
  37. {
  38. x1 = x;
  39. y1 = y;
  40. }
  41. bool operator == (Point &rhs) const
  42. {
  43. return (x == rhs.x && y == rhs.y);
  44. }
  45. private:
  46. int x, y;
  47. };
  48. } // namespace vgui
  49. #endif // POINT_H