Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
May 20, 2005, 11:28:43 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: merged back the md2_loader branche manualy (a full merge was impossible).

File:
1 edited

Legend:

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

    r4228 r4245  
    3333#include "skybox.h"
    3434#include "satellite.h"
     35#include "test_entity.h"
    3536#include "terrain.h"
    3637#include "light.h"
     
    4142#include "animation_player.h"
    4243#include "particle_engine.h"
     44#include "graphics_engine.h"
    4345
    4446#include "command_node.h"
     
    5052
    5153#include "substring.h"
     54
     55
    5256
    5357using namespace std;
     
    199203
    200204  delete WorldInterface::getInstance();
    201 
    202205  delete this->nullParent;
    203206  delete this->entities;
     
    206209  delete this->particleEngine;
    207210  TextEngine::getInstance()->flush();
    208 
    209211  delete AnimationPlayer::getInstance(); // this should be at the end of the unloading sequence.
    210212  //delete garbagecollecor
     
    258260  this->localCamera = new Camera();
    259261  this->localCamera->setName ("camera");
     262 
     263  GraphicsEngine::getInstance()->displayFPS(true);
    260264}
    261265
     
    388392  this->localPlayer->addChild (this->localCamera);
    389393     
     394
    390395  lightMan->setAmbientColor(.1,.1,.1);
    391396  lightMan->addLight();
     
    395400  //  lightMan->setPosition(20, 10, -20);
    396401  //  lightMan->setDiffuseColor(0,0,0);
    397   lightMan->debug();
     402  //lightMan->debug();
    398403  lightMan->setPosition(-5.0, 10.0, -40.0);
    399404 
     
    416421  glNewList (objectList, GL_COMPILE);
    417422 
    418   trackManager->drawGraph(.01);
    419   trackManager->debug(2);
     423
     424  //trackManager->drawGraph(.01);
     425  //trackManager->debug(2);
    420426  glEndList();
    421427
     
    423429  terrain->setRelCoor(Vector(0,-10,0));
    424430  this->spawn(terrain);
     431
    425432
    426433
     
    434441 
    435442  particleEngine->addConnection(emitter, system);
    436 }
     443
     444  WorldEntity* testEntity = new TestEntity();
     445  //testEntity->setRelCoor(Vector(570, 10, -15));
     446  testEntity->setRelCoor(Vector(25, -10, -20));
     447  testEntity->setRelDir(Quaternion(M_PI, Vector(0, 1, 0)));
     448  this->spawn(testEntity);
     449  this->localPlayer->addChild(testEntity);
     450}
     451
    437452
    438453void World::loadDebugWorld(int worldID)
     
    11361151      this->trackManager->tick(this->dt);
    11371152      this->localCamera->tick(this->dt);
     1153      AnimationPlayer::getInstance()->tick(this->dtS);
     1154
     1155      particleEngine->tick(this->dtS);
    11381156      this->garbageCollector->tick(this->dtS);
    1139 
    1140       AnimationPlayer::getInstance()->tick(this->dtS);
    1141       particleEngine->tick(this->dtS);
     1157         
     1158      /* actualy the Graphics Engine should tick the world not the other way around...
     1159         but since we like the things not too complicated we got it this way around
     1160         until there is need or time to do it the other way around.
     1161         \todo: GraphicsEngine ticks world: separation of processes and data...
     1162      */
     1163      GraphicsEngine::getInstance()->tick(this->dtS);
    11421164    }
    11431165  this->lastFrame = currentFrame;
Note: See TracChangeset for help on using the changeset viewer.