Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10463 in orxonox.OLD for trunk


Ignore:
Timestamp:
Jan 28, 2007, 9:48:53 PM (18 years ago)
Author:
patrick
Message:

camera stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/cameraman.cc

    r10461 r10463  
    151151  BaseObject* object = ObjectListBase::getBaseObject(className, objectName);
    152152  if( object != NULL && object->isA(PNode::staticClassID()))
     153  {
    153154    cameras[camNo]->lookAt(dynamic_cast<PNode*>(object));
     155  }
    154156}
    155157
     
    162164  {
    163165    dynamic_cast<Camera*>(newCam)->lookAt(dynamic_cast<PNode*>(object));
    164     State::setCamera();
     166    this->setCam( dynamic_cast<Camera*>(newCam));
     167    State::setCamera( dynamic_cast<Camera*>(newCam),  dynamic_cast<CameraTarget*>(object));
    165168  }
    166169}
     
    170173  BaseObject* object = ObjectListBase::getBaseObject(className, objectName);
    171174  if( object != NULL && object->isA(PNode::staticClassID()))
     175  {
    172176    currentCam->lookAt(dynamic_cast<PNode*>(object));
     177    State::setCamera(this->currentCam,  dynamic_cast<CameraTarget*>(object));
     178  }
    173179}
    174180
     
    176182{
    177183  currentCam->target->atach(target);
     184  State::setCamera(this->currentCam,  dynamic_cast<CameraTarget*>(target));
     185
    178186}
    179187
     
    185193  {
    186194   this->atachCurrTarget(dynamic_cast<PNode*>(object));
     195   State::setCamera(this->currentCam,  dynamic_cast<CameraTarget*>(object));
    187196   return;
    188197  }
     
    200209  {
    201210   dynamic_cast<Camera*>(targetCam)->target->atach(dynamic_cast<PNode*>(object));
     211   State::setCamera(this->currentCam,  dynamic_cast<CameraTarget*>(object));
    202212   return;
    203213  }
Note: See TracChangeset for help on using the changeset viewer.