/* orxonox - the future of 3D-vertical-scrollers Copyright (C) 2004 orx This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ### File Specific: main-programmer: Filip Gospodinov co-programmer: */ #include "shell_command.h" #include "cameraman.h" #include "game_world_data.h" #include "state.h" #include "iostream.h" cameraman::cameraman() { currentCam=State::getCamera(); this->cameras.push_back(currentCam); currentCam->target->detach(); State::setCamera(currentCam, currentCam->getTarget()); } void cameraman::createCam() { // Camera* newCamera=new Camera(); this->cameras.push_back(new Camera()); cameras[cameras.size()-1]->target->detach(); cout << cameras[1]->getAbsCoorX() << "," << cameras[1]->getAbsCoorY() << "," << cameras[1]->getAbsCoorZ() << endl << cameras[1]->target->getAbsCoorX() << endl; } void cameraman::setCam(int cameraNo) { if (cameraNogetTarget()); } } void cameraman::testCam() { cameras[1]->lookAt(currentCam->getTarget()); cameras[1]->setParentSoft(currentCam->getParent()); } void cameraman::moveCurrCam(int x, int y, int z) { currentCam->target->trans(x,y,z); } void cameraman::moveCam(int x, int y, int z, int camNo) { cameras[camNo]->target->trans(x,y,z); } void cameraman::changeTarget(int camNo, PNode* target) { cameras[camNo]->lookAt(target); } void cameraman::changeCurrTarget(PNode* target) { currentCam->lookAt(target); } void cameraman::atachCurrTarget(PNode* target) { currentCam->target->atach(target); } void cameraman::jumpCam(int x, int y, int z, int camNo) { cameras[camNo]->target->jump(x, y, z); } void cameraman::jumpCurrCam(int x, int y, int z) { currentCam->target->jump(x, y, z); }