-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGeoPoint.cpp
More file actions
42 lines (33 loc) · 748 Bytes
/
GeoPoint.cpp
File metadata and controls
42 lines (33 loc) · 748 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* File: GeoPoint.cpp
* Author: zoizoi
*
* Created on 19 December 2010, 22:21
*/
#include "GeoPoint.h"
GeoPoint::GeoPoint(int i) {
index = i;
neighbourCount = 0;
}
GeoPoint::GeoPoint(int i, float _x, float _y, float _z){
x=_x;y=_y;z=_z;
index = i;
neighbourCount = 0;
}
GeoPoint::GeoPoint(const GeoPoint& orig) {
}
GeoPoint::~GeoPoint() {
}
void GeoPoint::addNeighbour(int nei) {
for (int i = 0; i < neighbourCount; i++) {
if (neighbours[i] == nei) return;
}
neighbours[neighbourCount++] = nei;
}
float* GeoPoint::getPoint(float scale){
float* pos=new float[3]();
pos[0] = scale*x;
pos[1] = scale*y;
pos[2] = scale*z;
return pos;
}