Point.h
Go to the documentation of this file.
1 
10 #ifndef _utl_Point_h_
11 #define _utl_Point_h_
12 
13 
14 #include <utl/BasicVector.h>
15 #include <utl/CoordinateSystem.h>
16 
17 
18 namespace utl {
19 
20  class Vector;
21 
22 
32  class Point : public PointBase {
33 
34  public:
35  Point() : PointBase() { }
36 
38  Point(const double x, const double y, const double z,
39  const CoordinateSystemPtr& theCoordinateSystem)
40  : PointBase(x, y, z, theCoordinateSystem)
41  { }
42 
44  Point(const double p1, const double p2, const double p3,
45  const CoordinateSystemPtr& theCoordinateSystem,
46  const CoordinateType& theType)
47  : PointBase(p1, p2, p3, theCoordinateSystem, theType)
48  { }
49 
50  private:
52  Point(const PointBase::DataType& thePoint,
53  const CoordinateSystemPtr& theCoordinateSystem)
54  : PointBase(thePoint, theCoordinateSystem)
55  { }
56 
57  friend class TransformationPolicy;
58 
59  friend Point operator+(const Point& l, const Vector& r);
60  friend Point operator+(const Vector& l, const Point& r);
61  friend Point operator-(const Point& l, const Vector& r);
62  friend Vector operator-(const Point& l, const Point& r);
63  friend Point& operator+=(Point& p, const Vector& v);
64  friend Point& operator-=(Point& p, const Vector& v);
65 
66  };
67 
68 }
69 
70 
71 #ifdef _utl_Vector_h_
72 #include <utl/OperationsPV.h>
73 #endif
74 
75 
76 #endif
HepVector DataType
Definition: BasicVector.h:45
Point object.
Definition: Point.h:32
friend Point operator-(const Point &l, const Vector &r)
Definition: OperationsPV.h:37
friend Point & operator-=(Point &p, const Vector &v)
Definition: OperationsPV.h:65
Point(const PointBase::DataType &thePoint, const CoordinateSystemPtr &theCoordinateSystem)
Constructor from internal components for use by operators.
Definition: Point.h:52
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
Basic vector class template for geometry.
Definition: BasicVector.h:42
friend Point & operator+=(Point &p, const Vector &v)
Definition: OperationsPV.h:55
friend Point operator+(const Point &l, const Vector &r)
Definition: OperationsPV.h:19
Point(const double x, const double y, const double z, const CoordinateSystemPtr &theCoordinateSystem)
Construct point from coordinates in a given coordinate system.
Definition: Point.h:38
Point(const double p1, const double p2, const double p3, const CoordinateSystemPtr &theCoordinateSystem, const CoordinateType &theType)
Construct a point from arbitrary representation.
Definition: Point.h:44
Base class for classes indicating coordinate types.
Definition: BasicVector.h:48
Vector object.
Definition: Vector.h:30
Point()
Definition: Point.h:35

, generated on Tue Sep 26 2023.