OperationsPV.h
Go to the documentation of this file.
1 
9 #ifndef _utl_OperationsPV_h_
10 #define _utl_OperationsPV_h_
11 
12 
13 
14 namespace utl {
15 
16 
17  inline
18  Point
19  operator+(const Point& l, const Vector& r)
20  {
21  r.TransformTo(l.fCoordinateSystem);
22  return Point(l.fVector + r.fVector, l.fCoordinateSystem);
23  }
24 
25 
26  inline
27  Point
28  operator+(const Vector& l, const Point& r)
29  {
30  r.TransformTo(l.fCoordinateSystem);
31  return Point(l.fVector + r.fVector, l.fCoordinateSystem);
32  }
33 
34 
35  inline
36  Point
37  operator-(const Point& l, const Vector& r)
38  {
39  r.TransformTo(l.fCoordinateSystem);
40  return Point(l.fVector - r.fVector, l.fCoordinateSystem);
41  }
42 
43 
44  inline
45  Vector
46  operator-(const Point& l, const Point& r)
47  {
48  r.TransformTo(l.fCoordinateSystem);
49  return Vector(l.fVector - r.fVector, l.fCoordinateSystem);
50  }
51 
52 
53  inline
54  Point&
55  operator+=(Point& p, const Vector& v)
56  {
57  v.TransformTo(p.fCoordinateSystem);
58  p.fVector += v.fVector;
59  return p;
60  }
61 
62 
63  inline
64  Point&
65  operator-=(Point& p, const Vector& v)
66  {
67  v.TransformTo(p.fCoordinateSystem);
68  p.fVector -= v.fVector;
69  return p;
70  }
71 
72 
73 } // utl
74 
75 
76 #endif // _utl_OperationsPV_h_
77 
78 // Configure (x)emacs for this file ...
79 // Local Variables:
80 // mode:c++
81 // compile-command: "make -C .. -k"
82 // End:
Point operator-(const Point &l, const Vector &r)
Definition: OperationsPV.h:37
Point object.
Definition: Point.h:32
fs::path operator+(const fs::path &thePath, const string &extra)
Definition: FileName.cc:73
Point & operator-=(Point &p, const Vector &v)
Definition: OperationsPV.h:65
DataType fVector
Definition: BasicVector.h:360
Point & operator+=(Point &p, const Vector &v)
Definition: OperationsPV.h:55
CoordinateSystemPtr fCoordinateSystem
Definition: BasicVector.h:359
Vector object.
Definition: Vector.h:30

, generated on Tue Sep 26 2023.