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
24
25namespace GeoLib
26{
27// forward declaration
28class PointVec;
29
31{
32public:
33 Point() = default;
34
35 Point(double x1, double x2, double x3,
36 std::size_t id = std::numeric_limits<std::size_t>::max())
37 : MathLib::Point3dWithID(std::array<double, 3>({{x1, x2, x3}}), id)
38 {
39 }
40
41 Point(MathLib::Point3d const& x, std::size_t id)
42 : MathLib::Point3dWithID(x, id)
43 {
44 }
45
46 explicit Point(std::array<double, 3> const& x,
47 std::size_t id = std::numeric_limits<std::size_t>::max())
48 : MathLib::Point3dWithID(x, id)
49 {
50 }
51
53 GEOTYPE getGeoType() const override { return GEOTYPE::POINT; }
54
55protected:
56 friend PointVec;
57};
58
59} // namespace GeoLib
Base class for classes Point, Polyline, Surface.
Definition of the Point3d class.
friend PointVec
Definition Point.h:56
Point()=default
Point(std::array< double, 3 > const &x, std::size_t id=std::numeric_limits< std::size_t >::max())
Definition Point.h:46
Point(MathLib::Point3d const &x, std::size_t id)
Definition Point.h:41
Point(double x1, double x2, double x3, std::size_t id=std::numeric_limits< std::size_t >::max())
Definition Point.h:35
GEOTYPE getGeoType() const override
return a geometry type
Definition Point.h:53
GEOTYPE
Definition GeoType.h:23