for(unsigned i=0; i<10; ++i)
{
GL::Color color;
- color.r = rand()*1.0/RAND_MAX;
- color.g = rand()*1.0/RAND_MAX;
- color.b = rand()*1.0/RAND_MAX;
+ unsigned h = rand()%3;
+ color.r = (h==0 ? 0.0 : rand()*1.0/RAND_MAX);
+ color.g = (h==1 ? 0.0 : rand()*1.0/RAND_MAX);
+ color.b = (h==2 ? 0.0 : rand()*1.0/RAND_MAX);
color = color*(1/max(max(color.r, color.g), color.b));
float min_d_sq = 3;
for(map<Train *, GL::Color>::const_iterator j=train_colors.begin(); j!=train_colors.end(); ++j)