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