示例#1
0
 // switch to new proximity database -- just for demo purposes
 void newPD (ProximityDatabase& pd)
 {
     // delete this boid's token in the old proximity database
     delete proximityToken;
     
     // allocate a token for this boid in the proximity database
     proximityToken = pd.allocateToken (this);
 }
示例#2
0
void Boid::newPD( ProximityDatabase& pd ) {
    delete proximityToken;
    proximityToken = pd.allocateToken(this);
}