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