OGS
Point.h
Go to the documentation of this file.
1 
15 #pragma once
16 
17 #include <memory>
18 
19 // GeoLib
20 #include "GeoObject.h"
21 
22 // MathLib
23 #include "MathLib/Point3dWithID.h"
24 
25 namespace GeoLib
26 {
31 // forward declaration
32 class PointVec;
33 
35 {
36 public:
37  Point() = default;
38 
39  Point(double x1, double x2, double x3,
40  std::size_t id = std::numeric_limits<std::size_t>::max())
41  : MathLib::Point3dWithID(std::array<double, 3>({{x1, x2, x3}}), id)
42  {
43  }
44 
45  Point(MathLib::Point3d const& x, std::size_t id)
46  : MathLib::Point3dWithID(x, id)
47  {
48  }
49 
50  explicit Point(std::array<double, 3> const& x,
51  std::size_t id = std::numeric_limits<std::size_t>::max())
52  : MathLib::Point3dWithID(x, id)
53  {
54  }
55 
57  GEOTYPE getGeoType() const override { return GEOTYPE::POINT; }
58 
59 protected:
60  friend PointVec;
61 };
62 
63 } // namespace GeoLib
Base class for classes Point, Polyline, Surface.
Definition of the Point3d class.
friend PointVec
Definition: Point.h:60
Point()=default
Point(std::array< double, 3 > const &x, std::size_t id=std::numeric_limits< std::size_t >::max())
Definition: Point.h:50
Point(MathLib::Point3d const &x, std::size_t id)
Definition: Point.h:45
Point(double x1, double x2, double x3, std::size_t id=std::numeric_limits< std::size_t >::max())
Definition: Point.h:39
GEOTYPE getGeoType() const override
return a geometry type
Definition: Point.h:57
GEOTYPE
Definition: GeoType.h:25