6
Point () : mX (0), mY (0) {}
7
Point (float x, float y) : mX (x), mY (y) {}
9
inline float x () const { return mX; }
10
inline float y () const { return mY; }
12
inline void setX (float x) { mX = x; }
13
inline void setY (float y) { mY = y; }
15
void set (float x, float y) { mX = x; mY = y; }
17
inline void add (const Point &p) { mX += p.x (); mY += p.y (); }
19
Point &operator= (const Point &p);
20
bool operator== (const Point &p) const;
21
bool operator!= (const Point &p) const;
32
Point3d () : mX (0), mY (0), mZ (0) {}
33
Point3d (float x, float y, float z) : mX (x), mY (y), mZ (z) {}
35
inline float x () const { return mX; }
36
inline float y () const { return mY; }
37
inline float z () const { return mZ; }
39
inline void setX (float x) { mX = x; }
40
inline void setY (float y) { mY = y; }
41
inline void setZ (float z) { mZ = z; }
43
inline void set (float x, float y, float z) { mX = x; mY = y; mZ = z; }
45
inline void add (const Point3d &p)
46
{ mX += p.x (); mY += p.y (); mZ += p.z (); }
47
inline void add (float x, float y, float z)
48
{ mX += x; mY += y; mZ += z; }
50
Point3d &operator= (const Point3d &p);
51
bool operator== (const Point3d &p) const;
52
bool operator!= (const Point3d &p) const;
58
typedef Point3d Vector3d;
60
/* XXX: change this to CompRect */
67
Point::operator= (const Point &p)
69
mX = p.x (); mY = p.y ();
74
Point::operator== (const Point &p) const
76
return (mX == p.x () && mY == p.y ());
80
Point::operator!= (const Point &p) const
86
Point3d::operator= (const Point3d &p)
88
mX = p.x (); mY = p.y (); mZ = p.z ();
93
Point3d::operator== (const Point3d &p) const
95
return (mX == p.x () && mY == p.y () && mZ == p.z ());
99
Point3d::operator!= (const Point3d &p) const
101
return !(*this == p);
b'\\ No newline at end of file'