forked from codysauermann/GeometricDataStructures2D
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSegment2D.h
More file actions
22 lines (22 loc) · 684 Bytes
/
Copy pathSegment2D.h
File metadata and controls
22 lines (22 loc) · 684 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef SEGMENT2D_H
#define SEGMENT2D_H
#include "SimplePoint2D.h"
struct Segment2D
{
SimplePoint2D leftEndPoint, rightEndPoint;
Segment2D();
Segment2D(const Segment2D& s);
Segment2D(SimplePoint2D l, SimplePoint2D r);
Segment2D(Segment2D&& s);
Segment2D& operator=(const Segment2D& s);
Segment2D& operator=(Segment2D&& s);
bool operator<(const Segment2D& s);
bool operator<=(const Segment2D& s);
bool operator==(const Segment2D& s);
bool operator>=(const Segment2D& s);
bool operator>(const Segment2D& s);
bool operator!=(const Segment2D& s);
std::pair<bool, SimplePoint2D> findIntersection(Segment2D s);
bool poiOnSeg(SimplePoint2D p);
};
#endif