Changeset 10593 in orxonox.OLD for branches/cleanup/src/world_entities/tools/cameraman.h
- Timestamp:
- Feb 14, 2007, 7:27:23 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cleanup/src/world_entities/tools/cameraman.h
r10591 r10593 2 2 #define _CAMERAMAN_H 3 3 4 5 #include <vector>6 4 #include "base_object.h" 5 #include "state.h" 6 #include "camera.h" 7 7 8 8 class BlackScreen; … … 11 11 12 12 class CameraMan : public BaseObject { 13 13 14 ObjectListDeclaration(CameraMan); 14 15 15 private:16 Camera* currentCam;17 float nearClip;18 float farClip;19 BlackScreen* fadeToBlack;20 21 16 public: 22 std::vector<Camera*> cameras;23 17 CameraMan(const TiXmlElement* root = NULL); 24 void setCam(unsigned int CameraNo); 25 void setCam(const std::string& camName); 26 void setCam(Camera* camera); 27 28 /// LOADING 18 19 /// Loading 29 20 virtual void loadParams(const TiXmlElement* root); 30 21 void createCameras(const TiXmlElement* camerasTag); 31 22 void createCam(const TiXmlElement* root); 32 23 33 /// POLLING 34 float getCurrCameraCoorX(); 35 float getCurrCameraCoorY(); 36 float getCurrCameraCoorZ(); 37 const Camera* getCurrentCam() const { return this->currentCam; } 38 Camera* getCurrentCam() { return this->currentCam; } 24 /// Camera management 25 void changeTarget(const std::string& cameraName,const std::string& className, const std::string& objectName); 26 void attachCamera(const std::string& cameraName, const std::string& className, const std::string& targetEntity); 39 27 40 41 /// Current camera42 void moveCurrCam(int x, int y, int z);43 void changeCurrTarget(const std::string& className, const std::string& objectName);44 void atachCurrCameraToWorldEntity(const std::string& className, const std::string& targetEntity);45 void detachCurrCamera();46 void jumpCurrCam(float x, float y, float z);47 void togglFade();48 void initFadeBlack();49 50 /// Camera51 void moveCam(int x, int y, int z, int camNo);52 void changeTarget(int camNo, const std::string& className,const std::string& objectName);53 void changeTarget(const std::string& camName,const std::string& className, const std::string& objectName);54 void atachCameraToWorldEntity(const std::string& cameraName, const std::string& className, const std::string& targetEntity);55 void jumpCam(int x, int y, int z, int camNo);56 28 void jumpCam(const std::string& cameraName, float x, float y, float z); 29 void moveCam(const std::string& cameraName, float x, float y, float z); 57 30 void setRelCameraCoor(const std::string& cameraName, float x, float y, float z); 58 31 void setRelCameraCoorSoft(const std::string& cameraName, float x, float y, float z, float bias); 59 //void setViewMode(const std::string& camName, const std::string& viewMode); 60 void pauseCamera(const std::string& camName, bool stop); 61 62 void changeSpeed(float speed); 32 33 void setCam(const std::string& cameraName); 34 void setCam(Camera* newCamera); 63 35 void setClipRegion(float nearClip, float farClip); 64 void cameraInfo(); 65 36 37 /// Managing the current camera 38 void changeCurrTarget(const std::string& className, const std::string& objectName); 39 void attachCurrCamera(const std::string& className, const std::string& targetEntity); 40 void jumpCurrCam(float x, float y, float z); 41 void moveCurrCam(float x, float y, float z); 42 43 /// Fading 44 void togglFade(); 45 void initFadeBlack(); 46 47 /// Polling 48 float getCurrCameraCoorX(){return (State::getCamera())->getAbsCoorX();} 49 float getCurrCameraCoorY(){return (State::getCamera())->getAbsCoorY();} 50 float getCurrCameraCoorZ(){return (State::getCamera())->getAbsCoorZ();} 51 const std::string& getCurrCamName(){ return (State::getCamera())->getName(); } 52 66 53 private: 67 bool cameraIsInVector(Camera* camera); 68 void atachTarget(Camera* cam, PNode* pnode); 54 float nearClip; 55 float farClip; 56 BlackScreen* fadeToBlack; 69 57 70 58 … … 72 60 73 61 #endif /* _CAMERAMAN_H */ 62
Note: See TracChangeset
for help on using the changeset viewer.