Changeset 10394 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Jan 26, 2007, 9:02:57 PM (18 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/cameraman.cc
r10393 r10394 11 11 ### File Specific: 12 12 main-programmer: Filip Gospodinov 13 co-programmer: 13 co-programmer: Silvan Nellen 14 14 */ 15 15 … … 28 28 CREATE_SCRIPTABLE_CLASS(CameraMan, 29 29 addMethod("changeCurrTarget", Executor2<CameraMan, lua_State*,const std::string&,const std::string&>(&CameraMan::changeCurrTarget)) 30 ->addMethod("changeTarget", Executor3<CameraMan, lua_State*, int, const std::string&,const std::string&>(&CameraMan::changeTarget))30 ->addMethod("changeTarget", Executor3<CameraMan, lua_State*, const std::string&, const std::string&,const std::string&>(&CameraMan::changeTarget)) 31 31 ->addMethod("setCam", Executor1<CameraMan, lua_State*, const std::string&>(&CameraMan::setCam)) 32 32 ->addMethod("togglFade", Executor0<CameraMan, lua_State*>(&CameraMan::togglFade)) … … 69 69 void CameraMan::createCam(const TiXmlElement* root) 70 70 { 71 printf("create Camera\n"); 71 72 //Camera* newCamera=new Camera(root); 72 73 this->cameras.push_back(new Camera(root)); … … 132 133 133 134 135 void CameraMan::changeTarget(const std::string& camName,const std::string& className, const std::string& objectName) 136 { 137 BaseObject* object = ObjectListBase::getBaseObject(className, objectName); 138 BaseObject* newCam = ObjectListBase::getBaseObject("Camera", camName); 139 if( object != NULL && object->isA(PNode::staticClassID())) 140 dynamic_cast<Camera*>(newCam)->lookAt(dynamic_cast<PNode*>(object)); 141 } 142 134 143 void CameraMan::changeCurrTarget(const std::string& className, const std::string& objectName) 135 144 { -
trunk/src/world_entities/cameraman.h
r10393 r10394 26 26 void moveCurrCam(int x, int y, int z); 27 27 void changeTarget(int camNo, const std::string& className,const std::string& objectName); 28 void changeTarget(const std::string& camName,const std::string& className, const std::string& objectName); 28 29 void changeCurrTarget(const std::string& className, const std::string& objectName); 29 30 void atachCurrTarget(PNode* target);
Note: See TracChangeset
for help on using the changeset viewer.