forked from tiendan/OpenGazer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPoint.h
More file actions
executable file
·27 lines (21 loc) · 745 Bytes
/
Copy pathPoint.h
File metadata and controls
executable file
·27 lines (21 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once
struct Point {
double x;
double y;
Point();
Point(double x, double y);
Point(CvPoint2D32f const &point);
Point(CvPoint const &point);
double distance(Point other) const;
double distance2f(cv::Point2f other) const;
int closestPoint(const std::vector<Point> &points) const;
void save(CvFileStorage *out, const char *name) const;
void load(CvFileStorage *in, CvFileNode *node);
void operator=(CvPoint2D32f const &point);
void operator=(CvPoint const &point);
void operator=(cv::Point2f const &point);
Point operator+(const Point &other) const;
Point operator-(const Point &other) const;
};
std::ostream &operator<< (std::ostream &out, const Point &p);
std::istream &operator>> (std::istream &in, Point &p);