Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10388 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Jan 26, 2007, 6:32:54 PM (18 years ago)
Author:
snellen
Message:

made camera and cameraman scriptable

Location:
trunk/src/world_entities
Files:
3 edited

Legend:

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

    r10387 r10388  
    2222#include "vector.h"
    2323#include "targets.h"
    24 
    25 
     24#include "script_class.h"
    2625
    2726
    2827ObjectListDefinition(Camera);
    2928
     29CREATE_SCRIPTABLE_CLASS(Camera,
     30                        addMethod("setAbsCoor", Executor3<PNode, lua_State*,float,float,float>(&PNode::setAbsCoor))
     31                        ->addMethod("getAbsCoorX", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorX))
     32                        ->addMethod("getAbsCoorY", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorY))
     33                        ->addMethod("getAbsCoorZ", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorZ))
     34                       );
    3035
    3136/**
  • trunk/src/world_entities/cameraman.cc

    r10379 r10388  
    2020#include "sound_engine.h"
    2121#include <string>
     22#include "script_class.h"
    2223
    2324ObjectListDefinition(CameraMan);
     25
     26
     27CREATE_SCRIPTABLE_CLASS(CameraMan,
     28                        addMethod("changeCurrTarget", Executor2<CameraMan, lua_State*,const std::string&,const std::string&>(&CameraMan::changeCurrTarget))
     29                        ->addMethod("changeTarget", Executor3<CameraMan, lua_State*, int, const std::string&,const std::string&>(&CameraMan::changeTarget))
     30                        ->addMethod("togglFade", Executor0<CameraMan, lua_State*>(&CameraMan::togglFade))
     31                       );
    2432
    2533
     
    7583
    7684
    77 void CameraMan::changeTarget(int camNo, std::string className, std::string objectName)
     85void CameraMan::changeTarget(int camNo,const std::string& className, const std::string& objectName)
    7886{
    7987  BaseObject* object = ObjectListBase::getBaseObject(className, objectName);
     
    8391
    8492
    85 void CameraMan::changeCurrTarget(std::string className, std::string objectName)
     93void CameraMan::changeCurrTarget(const std::string& className, const std::string& objectName)
    8694{
    8795  BaseObject* object = ObjectListBase::getBaseObject(className, objectName);
  • trunk/src/world_entities/cameraman.h

    r10379 r10388  
    2424    void moveCam(int x, int y, int z,  int camNo);
    2525    void moveCurrCam(int x, int y, int z);
    26     void changeTarget(int camNo, std::string className, std::string objectName);
    27     void changeCurrTarget(std::string className, std::string objectName);
     26    void changeTarget(int camNo, const std::string& className,const std::string& objectName);
     27    void changeCurrTarget(const std::string& className, const std::string& objectName);
    2828    void atachCurrTarget(PNode* target);
    2929    void jumpCam(int x, int y, int z, int camNo);
Note: See TracChangeset for help on using the changeset viewer.