Changeset 10495 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Jan 30, 2007, 1:54:25 AM (18 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/camera.cc
r10478 r10495 26 26 #include "state.h" 27 27 28 #include "debug.h" 29 28 30 29 31 ObjectListDefinition(Camera); … … 103 105 { 104 106 this->setParent(this->entityTrack->getTrackNode()); 105 this->setRelCoor(0,0,0);107 //this->setRelCoor(0,0,0); 106 108 } 107 109 } … … 215 217 this->viewVector = (this->target->getAbsCoor() - this->getAbsCoor()).getNormalized(); 216 218 this->frustumPlane = Plane(this->viewVector, this->getAbsCoor() + this->viewVector * 0.1); 217 this->upVector = 219 this->upVector = this->getAbsDirV(); 218 220 219 221 // iteration for fovy … … 223 225 224 226 if(this->entityTrack) 227 { 228 //PRINTF(0)("tickytackytucky\n"); 225 229 this->entityTrack->tick(dt); 226 230 //this->setAbsCoor(this->entityTrack->getTrackNode()->getAbsCoor()); 231 } 227 232 228 233 -
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 -
trunk/src/world_entities/cameraman.h
r10483 r10495 55 55 void jumpCam(int x, int y, int z, int camNo); 56 56 void jumpCam(const std::string& cameraName, float x, float y, float z); 57 void setRelCameraCoor(const std::string& cameraName, float x, float y, float z); 58 //void setViewMode(const std::string& camName, const std::string& viewMode); 57 59 58 60 void changeSpeed(float speed);
Note: See TracChangeset
for help on using the changeset viewer.