Changeset 10343 in orxonox.OLD for branches/camera/src/world_entities/cameraman.cc
- Timestamp:
- Jan 24, 2007, 6:12:07 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/camera/src/world_entities/cameraman.cc
r10342 r10343 18 18 #include "game_world_data.h" 19 19 #include "state.h" 20 #include "iostream.h"21 20 #include "sound_engine.h" 22 21 #include <string> 23 22 24 ObjectListDefinition( cameraman);23 ObjectListDefinition(CameraMan); 25 24 26 25 27 cameraman::cameraman()26 CameraMan::CameraMan() 28 27 { 29 this->registerObject(this, cameraman::_objectList);28 this->registerObject(this, CameraMan::_objectList); 30 29 31 30 this->nearClip = 1.0; … … 39 38 40 39 41 void cameraman::createCam()40 void CameraMan::createCam() 42 41 { 43 42 // Camera* newCamera=new Camera(); … … 48 47 } 49 48 50 void cameraman::setCam(int cameraNo)49 void CameraMan::setCam(int cameraNo) 51 50 { 52 51 if (cameraNo<cameras.size()) … … 55 54 State::setCamera(currentCam, currentCam->getTarget()); 56 55 OrxSound::SoundEngine::getInstance()->setListener(currentCam); 57 56 this->fadeToBlack->setParent(this->currentCam); 57 this->fadeToBlack->setRelCoor(3., 0., 0.); 58 58 } 59 59 … … 61 61 62 62 63 void cameraman::testCam()63 void CameraMan::testCam() 64 64 { 65 65 cameras[1]->lookAt(currentCam->getTarget()); … … 68 68 69 69 70 void cameraman::moveCurrCam(int x, int y, int z)70 void CameraMan::moveCurrCam(int x, int y, int z) 71 71 { 72 72 currentCam->target->trans(x,y,z); … … 74 74 75 75 76 void cameraman::moveCam(int x, int y, int z, int camNo)76 void CameraMan::moveCam(int x, int y, int z, int camNo) 77 77 { 78 78 cameras[camNo]->target->trans(x,y,z); … … 80 80 81 81 82 void cameraman::changeTarget(int camNo, std::string className, std::string objectName)82 void CameraMan::changeTarget(int camNo, std::string className, std::string objectName) 83 83 { 84 84 BaseObject* object = ObjectListBase::getBaseObject(className, objectName); … … 88 88 89 89 90 void cameraman::changeCurrTarget(std::string className, std::string objectName)90 void CameraMan::changeCurrTarget(std::string className, std::string objectName) 91 91 { 92 92 BaseObject* object = ObjectListBase::getBaseObject(className, objectName); … … 95 95 } 96 96 97 void cameraman::atachCurrTarget(PNode* target)97 void CameraMan::atachCurrTarget(PNode* target) 98 98 { 99 99 currentCam->target->atach(target); 100 100 } 101 101 102 void cameraman::jumpCam(int x, int y, int z, int camNo)102 void CameraMan::jumpCam(int x, int y, int z, int camNo) 103 103 { 104 104 cameras[camNo]->target->jump(x, y, z); … … 107 107 108 108 109 void cameraman::setClipRegion(float nearCli, float farCli)109 void CameraMan::setClipRegion(float nearCli, float farCli) 110 110 { 111 111 this->nearClip=nearCli; … … 117 117 118 118 119 void cameraman::jumpCurrCam(int x, int y, int z)119 void CameraMan::jumpCurrCam(int x, int y, int z) 120 120 { 121 121 currentCam->target->jump(x, y, z); … … 125 125 126 126 127 void cameraman::togglFade()127 void CameraMan::togglFade() 128 128 { 129 129 if( this->fadeToBlack)
Note: See TracChangeset
for help on using the changeset viewer.