pmc/cube.cc
changeset 35 024c2932a31f
parent 34 4a35f239fe5b
child 36 f52a9deddfc0
equal deleted inserted replaced
34:4a35f239fe5b 35:024c2932a31f
    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;
    35     Vector *p_tmp;
    36 
    36 
    37     for (int i = 0; i < 8; i++) {
    37     for (int i = 0; i < 8; i++) {
    38         p_tmp = new Vector (*P[i] + location);
    38         p_tmp = new Vector (*P[i] + location);
    39 		delete P[i];
    39         delete P[i];
    40 		P[i] = p_tmp;
    40         P[i] = p_tmp;
    41     }
    41     }
    42 }
    42 }
    43 
    43 
    44 void Cube::show ()
    44 void Cube::show ()
    45 {
    45 {