changeset 34 | 4a35f239fe5b |
parent 9 | c3fecc82ade6 |
child 35 | 024c2932a31f |
33:5e0a954f7c0b | 34:4a35f239fe5b |
---|---|
30 delete P[i]; |
30 delete P[i]; |
31 } |
31 } |
32 |
32 |
33 void Cube::move (Vector location) |
33 void Cube::move (Vector location) |
34 { |
34 { |
35 Vector *p_tmp; |
|
36 |
|
35 for (int i = 0; i < 8; i++) { |
37 for (int i = 0; i < 8; i++) { |
36 P[i] = new Vector (*P[i] + location); |
38 p_tmp = new Vector (*P[i] + location); |
39 delete P[i]; |
|
40 P[i] = p_tmp; |
|
37 } |
41 } |
38 } |
42 } |
39 |
43 |
40 void Cube::show () |
44 void Cube::show () |
41 { |
45 { |