Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3727 in orxonox.OLD for orxonox/trunk/src/story_entities/world.cc


Ignore:
Timestamp:
Apr 5, 2005, 7:44:05 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: added a third debug level, made SimpleAnimation singleton and restructured it to be more opengl command style

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/story_entities/world.cc

    r3710 r3727  
    390390
    391391            lightMan->getLight(0)->setParent(trackManager->getTrackNode());
     392            break;
     393          }
     394        case DEBUG_WORLD_2:
     395          {
     396            lightMan->setPosition(-5.0, 10.0, -40.0);
     397            this->nullParent = NullParent::getInstance ();
     398            this->nullParent->setName ("NullParent");
     399
     400            // !\todo old track-system has to be removed
     401
     402            //create helper for player
     403            //HelperParent* hp = new HelperParent ();
     404            /* the player has to be added to this helper */
     405
     406            // create a player
     407            this->localPlayer = new Player ();
     408            this->localPlayer->setName ("player");
     409            this->spawn (this->localPlayer);
     410            /*monitor progress*/
     411            //this->glmis->step();         
     412            this->glmis->step();
     413
     414            // bind input
     415            Orxonox *orx = Orxonox::getInstance ();
     416            orx->getLocalInput()->bind (this->localPlayer);
     417           
     418            // bind camera
     419            this->localCamera = new Camera();
     420            this->localCamera->setName ("camera");
     421            this->localCamera->lookAt(this->localPlayer);
     422            this->localCamera->setParent(this->localPlayer);
     423           
     424            /*monitor progress*/
     425            this->glmis->step();
     426
     427            // Create SkySphere
     428            this->skySphere = new Skysphere("../data/pictures/sky-replace.jpg");
     429            this->skySphere->setName("SkySphere");
     430            this->localCamera->addChild(this->skySphere);
     431            this->skySphere->setMode(PNODE_MOVEMENT);
     432
     433            /*monitor progress*/
     434            this->glmis->step();
     435
     436           
     437            WorldEntity* env = new Environment();
     438            env->setName ("env");
     439            this->spawn(env);
     440
     441           
     442            /*
     443            Vector* es = new Vector (10, 5, 0);
     444            Quaternion* qs = new Quaternion ();
     445            WorldEntity* pr = new Primitive(P_CYLINDER);
     446            pr->setName("primitive");
     447            this->spawn(pr, this->localPlayer, es, qs, PNODE_MOVEMENT);
     448            */
     449
     450            /*monitor progress*/
     451            this->glmis->step();
     452
     453            //      trackManager->setBindSlave(env);
     454            PNode* tn = trackManager->getTrackNode();
     455            tn->addChild(this->localPlayer);
     456
     457            //localCamera->setParent(TrackNode::getInstance());
     458            tn->addChild(this->localCamera);
     459            //      localCamera->lookAt(tn);
     460            this->localPlayer->setMode(PNODE_ALL);
     461            //Vector* cameraOffset = new Vector (0, 5, -10);
     462            trackManager->condition(2, LEFTRIGHT, this->localPlayer);
     463            this->glmis->step();
     464
    392465            break;
    393466          }
Note: See TracChangeset for help on using the changeset viewer.