Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 18, 2007, 6:03:54 PM (16 years ago)
Author:
landauf
Message:

added some randomly generated (rotating) asteroids

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/Main.cc

    r618 r622  
    123123      orx->start();
    124124#else
     125/*
     126for (int i = 0; i < 500; i++)
     127{
     128int x = rand() % 40000 - 20000;
     129int y = rand() % 40000 - 20000;
     130int z = rand() % 40000 - 20000;
     131
     132int scale = rand() % 100 + 20;
     133
     134int version = rand() % 6 + 1;
     135
     136float rotx = float(rand()) / RAND_MAX;
     137float roty = float(rand()) / RAND_MAX;
     138float rotz = float(rand()) / RAND_MAX;
     139
     140int axis = rand() % 3 + 1;
     141
     142if (axis == 1)
     143  rotx = 0;
     144if (axis == 2)
     145  roty = 0;
     146if (axis == 3)
     147  rotz = 0;
     148
     149int rotation = rand() % 40 + 10;
     150
     151//    <Model position="1000,1500,0" scale="50" mesh="ast1.mesh" rotationAxis="0,1.25,0" rotationRate="70" />
     152std::cout << "    <Model position=\"" << x << "," << y << "," << z << "\" scale=\"" << scale << "\" mesh=\"ast" << version << ".mesh\" rotationAxis=\"" << rotx << "," << roty << "," << rotz << "\" rotationRate=\"" << rotation << "\" />" << std::endl;
     153
     154
     155}
     156*/
    125157      orx->init(argc, argv, "");
    126158      orx->start();
Note: See TracChangeset for help on using the changeset viewer.