forked from codygibb/animus-visualizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEPVector.pde
42 lines (37 loc) · 885 Bytes
/
EPVector.pde
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
class EPVector extends PVector {
PVector temp;
EPVector(float x, float y, float z) {
super(x, y, z);
temp = new PVector();
}
EPVector() {
super(0, 0, 0);
temp = new PVector();
}
void rotateX(float angle) {
temp.x = super.y;
temp.y = super.z;
temp.rotate(angle);
super.y = temp.x;
super.z = temp.y;
}
void rotateY(float angle) {
temp.x = super.x;
temp.y = super.z;
temp.rotate(angle);
super.x = temp.x;
super.z = temp.y;
}
void rotateZ(float angle) {
temp.x = super.x;
temp.y = super.y;
temp.rotate(angle);
super.x = temp.x;
super.y = temp.y;
}
void set(int x, int y, int z){
super.x = x;
super.y = y;
super.z = z;
}
}