-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMapnode.h
70 lines (48 loc) · 1023 Bytes
/
Mapnode.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
58
59
60
61
62
63
64
65
66
67
68
69
70
/**-------------start of Mapnode2d.cpp------------------**/
#ifndef MAPNODE_H
#define MAPNODE_H
#include <stdio.h>
struct Mapnode2d
{
unsigned int x, y;
float cost;
Mapnode2d *parent;
Mapnode2d();
Mapnode2d (const Mapnode2d & v);
const Mapnode2d & operator= (const Mapnode2d & v)
{
x = v.x;
y = v.y;
cost = v.cost;
parent = NULL;
return *this;
}
void load (FILE * fp);
void save (FILE * fp) const;
void print (FILE * fp) const;
};
struct Mapnode3d
{
unsigned int x, y;
int theta; //mathematically correct degrees (east is 0 degrees)
int checkValue;
float cost;
Mapnode3d *parent;
Mapnode3d();
Mapnode3d (const Mapnode3d & v);
const Mapnode3d & operator= (const Mapnode3d & v)
{
x = v.x;
y = v.y;
theta = v.theta;
checkValue = v.checkValue;
cost = v.cost;
parent = NULL;
return *this;
}
void load (FILE * fp);
void save (FILE * fp) const;
void print (FILE * fp) const;
};
#endif //mapnode2d.h
/**---------end of Mapnode2d.h -----------------**/