OGS
LineSegment.h
Go to the documentation of this file.
1
10#pragma once
11
12#include "Point.h"
13
14namespace GeoLib
15{
16
17class LineSegment final
18{
19public:
25 LineSegment(GeoLib::Point* const a, GeoLib::Point* const b,
26 bool point_mem_management_by_line_segment = false);
27
28 LineSegment(LineSegment&& line_segment);
29 LineSegment(LineSegment const& line_segment);
30
32
34 LineSegment& operator=(LineSegment&& line_segment);
35
36 GeoLib::Point const& getBeginPoint() const;
38
39 GeoLib::Point const& getEndPoint() const;
41
42private:
43 GeoLib::Point* _a = nullptr;
44 GeoLib::Point* _b = nullptr;
46};
47
48std::ostream& operator<<(std::ostream& os, LineSegment const& s);
49
50std::ostream& operator<<(std::ostream& os,
51 std::pair<GeoLib::LineSegment const&,
52 GeoLib::LineSegment const&> const& seg_pair);
53
60bool operator==(LineSegment const& s0, LineSegment const& s1);
61
62} // namespace GeoLib
Definition of the Point class.
bool _point_mem_management_by_line_segment
Definition LineSegment.h:45
GeoLib::Point const & getBeginPoint() const
GeoLib::Point * _b
Definition LineSegment.h:44
LineSegment & operator=(LineSegment const &rhs)
GeoLib::Point const & getEndPoint() const
LineSegment(GeoLib::Point *const a, GeoLib::Point *const b, bool point_mem_management_by_line_segment=false)
GeoLib::Point * _a
Definition LineSegment.h:43
bool operator==(LineSegment const &s0, LineSegment const &s1)
std::ostream & operator<<(std::ostream &os, LineSegment const &s)