Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10482 in orxonox.OLD for trunk/src/world_entities/cameraman.cc


Ignore:
Timestamp:
Jan 29, 2007, 2:48:59 PM (18 years ago)
Author:
snellen
Message:

cleanup in cameramanager… continued

File:
1 edited

Legend:

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

    r10481 r10482  
    150150}
    151151
    152 void CameraMan::atachCurrTarget(PNode* target)
    153 {
    154   currentCam->target->atach(target);
    155   currentCam->setViewMode(Camera::ViewNormal);
    156   State::setCamera(this->currentCam,  dynamic_cast<CameraTarget*>(target));
    157 
    158 }
    159152
    160153void CameraMan::atachCurrCameraToWorldEntity(const std::string& className, const std::string& targetEntity)
     
    164157  if(object != NULL && object->isA(PNode::staticClassID()))
    165158  {
    166    this->atachCurrTarget(dynamic_cast<PNode*>(object));
     159   this->atachTarget(this->currentCam, dynamic_cast<PNode*>(object));
    167160   return;
    168161  }
     
    233226  if( object != NULL && targetCam != NULL && object->isA(PNode::staticClassID()) )
    234227  {
    235     dynamic_cast<Camera*>(targetCam)->target->atach(dynamic_cast<PNode*>(object));
    236     dynamic_cast<Camera*>(targetCam)->setViewMode(Camera::ViewNormal);
    237     State::setCamera(dynamic_cast<Camera*>(targetCam),  dynamic_cast<CameraTarget*>(object));
     228    this->atachTarget(dynamic_cast<Camera*>(targetCam), dynamic_cast<PNode*>( object ));
    238229    return;
    239230  }
     
    304295
    305296
     297void CameraMan::atachTarget(Camera* cam ,PNode* target)
     298{
     299  cam->target->atach(target);
     300  cam->setViewMode(Camera::ViewNormal);
     301  State::setCamera( cam,  dynamic_cast<CameraTarget*>(target));
     302
     303}
     304
    306305//how to get a class fkt pointer
    307306
Note: See TracChangeset for help on using the changeset viewer.