Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2007, 6:16:08 PM (18 years ago)
Author:
gfilip
Message:

evrything finally solved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/camera/src/world_entities/cameraman.cc

    r10259 r10272  
    2121#include "sound_engine.h"
    2222
     23ObjectListDefinition(cameraman);
     24
    2325
    2426cameraman::cameraman()
    2527{
     28  this->registerObject(this, cameraman::_objectList);
     29
     30  this->nearClip = 1.0;
     31  this->farClip = 1000.0;
     32
    2633  currentCam=State::getCamera();
    2734  this->cameras.push_back(currentCam);
    28   currentCam->target->detach();
    2935  State::setCamera(currentCam, currentCam->getTarget());
     36//   currentCam->setClipRegion(nearClip, farClip);
    3037}
    3138
     
    3643  this->cameras.push_back(new Camera());
    3744  cameras[cameras.size()-1]->target->detach();
    38 
    39 
    40 
    41   cout << cameras[1]->getAbsCoorX() << "," << cameras[1]->getAbsCoorY() << "," << cameras[1]->getAbsCoorZ() << endl << cameras[1]->target->getAbsCoorX() << endl;
     45  cameras[cameras.size()-1]->setClipRegion(nearClip, farClip);
    4246
    4347}
     
    97101
    98102
     103
     104void cameraman::setClipRegion(float nearCli, float farCli)
     105{
     106  this->nearClip=nearCli;
     107  this->farClip=farCli;
     108
     109  for(int i = 0; i < this->cameras.size(); i++)
     110    cameras[i]->setClipRegion(nearCli, farCli);
     111}
     112
     113
    99114void cameraman::jumpCurrCam(int x, int y, int z)
    100115{
Note: See TracChangeset for help on using the changeset viewer.