Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10379 in orxonox.OLD for trunk/src/story_entities


Ignore:
Timestamp:
Jan 26, 2007, 10:58:31 AM (18 years ago)
Author:
patrick
Message:

merged branche camera to trunk. resolved many conflicts as in the other projects too

Location:
trunk/src/story_entities
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/story_entities/game_world.cc

    r10376 r10379  
    449449
    450450    /* update tick the rest */
    451     this->dataTank->localCamera->tick(this->dtS);
     451    State::getCamera()->tick(this->dtS);
    452452    AnimationPlayer::getInstance()->tick(this->dtS);
    453453    PhysicsEngine::getInstance()->tick(this->dtS);
     
    578578void GameWorld::applyCameraSettings()
    579579{
    580   this->dataTank->localCamera->apply ();
    581   this->dataTank->localCamera->project ();
     580
     581  State::getCamera()->apply ();
     582  State::getCamera()->project ();
    582583  GraphicsEngine::storeMatrices();
    583584}
  • trunk/src/story_entities/game_world_data.cc

    r10317 r10379  
    3030#include "player.h"
    3131#include "camera.h"
     32#include "cameraman.h"
    3233#include "terrain.h"
    3334#include "skybox.h"
     
    7071  this->glmis = NULL;
    7172
    72   this->localCamera = NULL;
     73
    7374  this->localPlayer = NULL;
    7475  this->sky = NULL;
     
    9899
    99100  PNode::getNullParent();
    100   this->localCamera = new Camera();
    101   this->localCamera->setName ("GameWorld-Camera");
    102   State::setCamera(this->localCamera, this->localCamera->getTarget());
    103 
     101  Camera* localCamera = new Camera();
     102    localCamera->setName ("GameWorld-Camera");
     103  State::setCamera(localCamera, localCamera->getTarget());
     104  CameraMan* camMan = new CameraMan();
     105  State::setCameraman(camMan);
    104106  LightManager::getInstance();
    105107
     
    283285  State::setPlayer(NULL);
    284286  this->localPlayer = NULL;
    285   this->localCamera = NULL;
    286287  State::setCamera(NULL, NULL);
    287288  this->sky = NULL;
     
    333334  LoadParamXML(root, "GameRule", this, GameWorldData, loadGameRule);
    334335
    335   LoadParam(root, "clip-region", this->localCamera, Camera, setClipRegion);
     336  LoadParam(root, "clip-region", State::getCameraman(), CameraMan, setClipRegion);
    336337
    337338
     
    339340  //LoadParamXML(root, "PhysicsEngine", PhysicsEngine::getInstance(), PhysicsEngine, loadParams);
    340341
    341   if( this->sky != NULL)
    342     this->localCamera->addChild(this->sky);
    343   OrxSound::SoundEngine::getInstance()->setListener(this->localCamera);
     342
     343  OrxSound::SoundEngine::getInstance()->setListener(State::getCamera());
    344344
    345345  return ErrorMessage();
  • trunk/src/story_entities/game_world_data.h

    r9869 r10379  
    5656    GLMenuImageScreen*            glmis;          //!< The Level-Loader Display
    5757
    58     Camera*                       localCamera;    //!< The current camera
     58
    5959    Player*                       localPlayer;    //!< The player, you fly through the level.
    6060    WorldEntity*                  sky;            //!< The environmental sky of orxonox
  • trunk/src/story_entities/menu/game_menu.cc

    r10368 r10379  
    110110  this->subscribeEvent(ES_MENU, SDLK_ESCAPE);
    111111
    112   this->dataTank->localCamera->setRelCoor(this->cameraVector);
     112  State::getCamera()->setRelCoor(this->cameraVector);
    113113  //this->dataTank->localCamera->setFovy(60);
    114114
     
    391391  Quaternion q(/*0.00005*/ dt * .1, Vector(0.0, 1.0, 0.0));
    392392  this->cameraVector = q.apply(this->cameraVector);
    393   this->dataTank->localCamera->setRelCoor(this->cameraVector);
    394   this->dataTank->localCamera->getTarget()->setRelCoorSoft(0,0,0);
     393  State::getCamera()->setRelCoor(this->cameraVector);
     394  State::getCamera()->getTarget()->setRelCoorSoft(0,0,0);
    395395}
    396396
Note: See TracChangeset for help on using the changeset viewer.