aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/Pos.h
blob: c2130441c043f7ad2941c85f968d46c43c45e90a (plain)
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
#pragma once
// Pos implements Comparable<Pos>
// We don't REALLY need it as it's main use it to make things easy 
// to handle in the java array/list classes, but adding to help
// maintain as much original code as possible

//class Pos //implements Comparable<Pos>
class Pos
{
public:
	int x;
	int y;
	int z;

	Pos();

	Pos(int x, int y, int z);

	Pos(Pos *position);

	//@Override
	//public boolean equals(Object other)
	bool equals(void *other);

	int hashCode();
	int compareTo(Pos *pos);
	Pos *offset(int x, int y, int z);
	void set(int x, int y, int z);
	void set(Pos *pos);

	Pos *above();
	Pos *above(int steps);
	Pos *below();
	Pos *below(int steps);
	Pos *north();
	Pos *north(int steps);
	Pos *south();
	Pos *south(int steps);
	Pos *west();
	Pos *west(int steps);
	Pos *east();
	Pos *east(int steps);

	void move(int x, int y, int z);
	void move(Pos pos);
	void moveX(int steps);
	void moveY(int steps);
	void moveZ(int steps);
	void moveUp(int steps);
	void moveUp();
	void moveDown(int steps);
	void moveDown();
	void moveEast(int steps);
	void moveEast();
	void moveWest(int steps);
	void moveWest();
	void moveNorth(int steps);
	void moveNorth();
	void moveSouth(int steps);
	void moveSouth();

	double dist(int x, int y, int z);
	double dist(Pos *pos);
	float distSqr(int x, int y, int z);
	float distSqr(Pos *pos);
};