Changeset 10343 in orxonox.OLD for branches/camera
- Timestamp:
- Jan 24, 2007, 6:12:07 PM (18 years ago)
- Location:
- branches/camera/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/camera/src/story_entities/game_world_data.cc
r10272 r10343 102 102 localCamera->setName ("GameWorld-Camera"); 103 103 State::setCamera(localCamera, localCamera->getTarget()); 104 cameraman* camMan = new cameraman();104 CameraMan* camMan = new CameraMan(); 105 105 State::setCameraman(camMan); 106 106 LightManager::getInstance(); … … 334 334 LoadParamXML(root, "GameRule", this, GameWorldData, loadGameRule); 335 335 336 LoadParam(root, "clip-region", State::getCameraman(), cameraman, setClipRegion);336 LoadParam(root, "clip-region", State::getCameraman(), CameraMan, setClipRegion); 337 337 338 338 -
branches/camera/src/util/state.cc
r10272 r10343 33 33 CameraTarget* State::cameraTarget = NULL; 34 34 35 cameraman* State::CameraMan= NULL;35 CameraMan* State::cameraManager = NULL; 36 36 37 37 PNode* State::cameraNode = NULL; … … 68 68 69 69 70 void State::setCameraman( cameraman* cm)70 void State::setCameraman(CameraMan* cm) 71 71 72 72 { 73 State:: CameraMan=cm;73 State::cameraManager=cm; 74 74 } -
branches/camera/src/util/state.h
r10272 r10343 18 18 class ObjectManager; 19 19 class GameRules; 20 class cameraman;20 class CameraMan; 21 21 class ScriptManager; 22 22 … … 48 48 /// CAMERAMANAGER /// 49 49 ///////////////////// 50 /** @param cameraman the PNode to the CameraManager,*/51 static void setCameraman( cameraman*);52 static inline cameraman* getCameraman() { return State::CameraMan; };50 /** @param CameraMan the PNode to the cameraManagerager,*/ 51 static void setCameraman(CameraMan*); 52 static inline CameraMan* getCameraman() { return State::cameraManager; }; 53 53 54 54 … … 126 126 static Camera* camera; //!< The current Camera. 127 127 static CameraTarget* cameraTarget; //!< The Camera Target. 128 static cameraman* CameraMan;128 static CameraMan* cameraManager; 129 129 static PNode* cameraNode; //!< A reference to the camera 130 130 static PNode* cameraTargetNode; //!< A reference to the cameraTarget -
branches/camera/src/world_entities/blackscreen.cc
r10342 r10343 89 89 } 90 90 91 92 93 91 94 void BlackScreen::draw() const 92 95 { … … 100 103 101 104 glBegin(GL_QUADS); 102 glVertex3f(State::getCameraNode()->getAbsCoorX()+3,State::getCameraNode()->getAbsCoorY() -100.0f, 103 State::getCameraNode()->getAbsCoorZ()-100.0f); 104 glVertex3f(State::getCameraNode()->getAbsCoorX()+3, State::getCameraNode()->getAbsCoorY()-100.0f, 105 State::getCameraNode()->getAbsCoorZ()+100.0f); 106 glVertex3f(State::getCameraNode()->getAbsCoorX()+3, State::getCameraNode()->getAbsCoorY() +100.0f, 107 State::getCameraNode()->getAbsCoorZ()+100.0f); 108 glVertex3f(State::getCameraNode()->getAbsCoorX()+3, State::getCameraNode()->getAbsCoorY()+100.0f, 109 State::getCameraNode()->getAbsCoorZ()-100.0f); 105 glVertex3f(0.,-100.0f,-100.0f); 106 glVertex3f(0., -100.0f,100.0f); 107 glVertex3f(0., 100.0f,100.0f); 108 glVertex3f(0., 100.0f,-100.0f); 110 109 111 110 glEnd(); -
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) -
branches/camera/src/world_entities/cameraman.h
r10342 r10343 8 8 #include "blackscreen.h" 9 9 10 class cameraman : public BaseObject {11 ObjectListDeclaration( cameraman);10 class CameraMan : public BaseObject { 11 ObjectListDeclaration(CameraMan); 12 12 13 13 private: … … 19 19 public: 20 20 std::vector<Camera*> cameras; 21 cameraman();21 CameraMan(); 22 22 void setCam(int CameraNo); 23 23 void createCam(); -
branches/camera/src/world_entities/test_entity.h
r10238 r10343 14 14 private: 15 15 16 cameraman* CM;16 CameraMan* CM; 17 17 18 18 public:
Note: See TracChangeset
for help on using the changeset viewer.