Changeset 10495 in orxonox.OLD for trunk/src/world_entities/cameraman.cc
- Timestamp:
- Jan 30, 2007, 1:54:25 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/cameraman.cc
r10483 r10495 45 45 ->addMethod("jumpCurrCam", Executor3<CameraMan, lua_State*,float,float,float>(&CameraMan::jumpCurrCam)) 46 46 ->addMethod("jumpCam", Executor4<CameraMan, lua_State*,const std::string&,float,float,float>(&CameraMan::jumpCam)) 47 //->addMethod("setViewMode", Executor2<CameraMan, lua_State*,const std::string&,const std::string&>(&CameraMan::setViewMode)) 48 ->addMethod("setRelCoor", Executor4<CameraMan, lua_State*,const std::string&,float,float,float>(&CameraMan::setRelCameraCoor)) 47 49 ); 48 50 … … 89 91 } 90 92 91 93 /*void CameraMan::setViewMode(const std::string& cameraName, const std::string& viewMode) 94 { 95 BaseObject* newCam = ObjectListBase::getBaseObject("Camera", cameraName); 96 switch (viewMode) 97 { 98 default: 99 case "ViewNormal": 100 { 101 dynamic_cast<Camera*>(newCam)->setViewMode(Camera::ViewNormal); 102 break; 103 } 104 case "ViewTop": 105 { 106 dynamic_cast<Camera*>(newCam)->setViewMode(Camera::ViewTop); 107 break; 108 } 109 case "ViewBehind": 110 { 111 dynamic_cast<Camera*>(newCam)->setViewMode(Camera::ViewBehind); 112 break; 113 } 114 case "ViewFront": 115 { 116 dynamic_cast<Camera*>(newCam)->setViewMode(Camera::ViewFront); 117 break; 118 } 119 case "ViewLeft": 120 { 121 dynamic_cast<Camera*>(newCam)->setViewMode(Camera::ViewLeft); 122 break; 123 } 124 case "ViewRight": 125 { 126 dynamic_cast<Camera*>(newCam)->setViewMode(Camera::ViewRight); 127 } 128 } 129 }*/ 130 131 void CameraMan::setRelCameraCoor(const std::string& camName, float x, float y, float z) 132 { 133 BaseObject* newCam = ObjectListBase::getBaseObject("Camera", camName); 134 dynamic_cast<Camera*>(newCam)->setRelCoor(x,y,z); 135 dynamic_cast<Camera*>(newCam)->target->setRelCoor(0,0,0); 136 } 92 137 93 138
Note: See TracChangeset
for help on using the changeset viewer.