Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10483 in orxonox.OLD for trunk


Ignore:
Timestamp:
Jan 29, 2007, 3:05:56 PM (18 years ago)
Author:
snellen
Message:

implemented jumpCam in CameraMan

Location:
trunk/src/world_entities
Files:
2 edited

Legend:

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

    r10482 r10483  
    4444                        ->addMethod("getCurrCameraCoorZ", Executor0ret<CameraMan, lua_State*,float>(&CameraMan::getCurrCameraCoorZ))
    4545                        ->addMethod("jumpCurrCam", Executor3<CameraMan, lua_State*,float,float,float>(&CameraMan::jumpCurrCam))
     46                        ->addMethod("jumpCam", Executor4<CameraMan, lua_State*,const std::string&,float,float,float>(&CameraMan::jumpCam))
    4647                       );
    4748
     
    240241}
    241242
     243
     244void CameraMan::jumpCam(const std::string& cameraName, float x, float y, float z)
     245{
     246  BaseObject* targetCam = ObjectListBase::getBaseObject("Camera", cameraName);
     247  if( targetCam != NULL )
     248  {
     249    dynamic_cast<Camera*>(targetCam)->target->jump( x, y, z );
     250  }
     251
     252}
    242253
    243254
  • trunk/src/world_entities/cameraman.h

    r10482 r10483  
    5454    void atachCameraToWorldEntity(const std::string& cameraName, const std::string& className, const std::string& targetEntity);
    5555    void jumpCam(int x, int y, int z, int camNo);
     56    void jumpCam(const std::string& cameraName, float x, float y, float z);
    5657   
    5758    void changeSpeed(float speed);
Note: See TracChangeset for help on using the changeset viewer.