-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPointRepository.h
57 lines (48 loc) · 2.01 KB
/
PointRepository.h
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//
// Created by rkindela on 12-04-2018.
//
#ifndef PMTOOL_POINTREPOSITORY_H
#define PMTOOL_POINTREPOSITORY_H
#include "Point.h"
#include <iostream>
#include <vector>
#include "Vector3D.h"
using namespace std;
class PointRepository {
private:
static PointRepository* pointRepository;
std::vector<POINT*> pointList;
PointRepository();
public:
static PointRepository* instance();
void add(POINT* p);
POINT* getPoint(int pointPosition);
Vector3D* getVector3dFromPoints(int pointA, int pointB);
int area2(int pointA, int pointB, int pointC);
int generalArea2(const vector<int> &pointcloud);
int volume6(int pointA, int pointB, int pointC, int pointD);
int middleAngleCos(int pointA, int pointB, int pointC);
int squareMagnitude(int pointA, int pointB);
float angleCos(int pointA, int pointB, int pointC, int pointD);
bool areIntersected(int pointA, int pointB, int pointC, int pointD);
bool isInCircunsphere(int pointA, int pointB, int pointC, int pointD);
bool onSegment(int p, int q, int r);
int computeLexicographicOrder(int a, int b);
int getPointCount() const;
int getLowerMostXCoord(const std::vector<int> &pointCloud);
int getLowerMostYCoord(const std::vector<int> &pointCloud);
int getLowerMostZCoord(const std::vector<int> &pointCloud);
int getUpperMostXCoord(const std::vector<int> &pointCloud);
int getUpperMostYCoord(const std::vector<int> &pointCloud);
int getUpperMostZCoord(const std::vector<int> &pointCloud);
int getMaximumAreaCoord(const std::vector<int> &pointCloud, int a, int b);
int getCentralPointPosition(const std::vector<int> &pointCloud, int n);
std::vector<int> getSortedPolarAngles(std::vector<int>& pointCloud);
std::vector<int> getIndexes();
void remove(int pos);
void clear();
int pivotePosition;
~PointRepository();
friend std::ostream& operator<<(std::ostream& os, const PointRepository* pr);
};
#endif //PMTOOL_POINTREPOSITORY_H