GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
Point.h
1 /*
2  * GDevelop Core
3  * Copyright 2008-2016 Florian Rival ([email protected]). All rights
4  * reserved. This project is released under the MIT License.
5  */
6 
7 #ifndef GDCORE_POINT_H
8 #define GDCORE_POINT_H
9 #include "GDCore/String.h"
10 
16 class GD_CORE_API Point {
17  public:
18  Point(const gd::String& name_);
19  virtual ~Point(){};
20 
24  void SetName(const gd::String& name_) { name = name_; }
25 
29  const gd::String& GetName() const { return name; }
30 
34  void SetXY(double x_, double y_) {
35  x = x_;
36  y = y_;
37  }
38 
42  void SetX(double x_) { x = x_; }
43 
47  void SetY(double y_) { y = y_; }
48 
52  double GetX() const { return x; }
53 
57  double GetY() const { return y; }
58 
59  private:
60  gd::String name;
61  double x;
62  double y;
63 };
64 
65 #endif // GDCORE_POINT_H
Named point used by Sprite.
Definition: Point.h:16
void SetXY(double x_, double y_)
Definition: Point.h:34
void SetX(double x_)
Definition: Point.h:42
double GetY() const
Definition: Point.h:57
void SetY(double y_)
Definition: Point.h:47
const gd::String & GetName() const
Definition: Point.h:29
double GetX() const
Definition: Point.h:52
void SetName(const gd::String &name_)
Definition: Point.h:24
String represents an UTF8 encoded string.
Definition: String.h:31