[10192] | 1 | #ifndef _CAMERAMAN_H |
---|
| 2 | #define _CAMERAMAN_H |
---|
| 3 | |
---|
| 4 | #include "p_node.h" |
---|
[10197] | 5 | #include "camera.h" |
---|
[10206] | 6 | #include <vector> |
---|
[10272] | 7 | #include "base_object.h" |
---|
[10330] | 8 | #include "blackscreen.h" |
---|
[10192] | 9 | |
---|
[10343] | 10 | class CameraMan : public BaseObject { |
---|
| 11 | ObjectListDeclaration(CameraMan); |
---|
[10192] | 12 | |
---|
| 13 | private: |
---|
[10197] | 14 | Camera* currentCam; |
---|
[10272] | 15 | float nearClip; |
---|
| 16 | float farClip; |
---|
[10342] | 17 | BlackScreen* fadeToBlack; |
---|
[10192] | 18 | |
---|
| 19 | public: |
---|
[10257] | 20 | std::vector<Camera*> cameras; |
---|
[10390] | 21 | CameraMan(const TiXmlElement* root = NULL); |
---|
[10193] | 22 | void setCam(int CameraNo); |
---|
[10393] | 23 | void setCam(const std::string& camName); |
---|
[10390] | 24 | void createCam(const TiXmlElement* root); |
---|
[10204] | 25 | void moveCam(int x, int y, int z, int camNo); |
---|
| 26 | void moveCurrCam(int x, int y, int z); |
---|
[10388] | 27 | void changeTarget(int camNo, const std::string& className,const std::string& objectName); |
---|
[10394] | 28 | void changeTarget(const std::string& camName,const std::string& className, const std::string& objectName); |
---|
[10388] | 29 | void changeCurrTarget(const std::string& className, const std::string& objectName); |
---|
[10236] | 30 | void atachCurrTarget(PNode* target); |
---|
[10199] | 31 | void jumpCam(int x, int y, int z, int camNo); |
---|
[10204] | 32 | void jumpCurrCam(int x, int y, int z); |
---|
| 33 | void changeSpeed(float speed); |
---|
[10272] | 34 | void setClipRegion(float nearClip, float farClip); |
---|
[10330] | 35 | void togglFade(); |
---|
[10390] | 36 | |
---|
| 37 | /// LOADING |
---|
| 38 | virtual void loadParams(const TiXmlElement* root); |
---|
| 39 | |
---|
[10393] | 40 | /// POLLING |
---|
[10390] | 41 | float getCurrCameraCoorX(){ return this->currentCam->getAbsCoorX(); } |
---|
| 42 | float getCurrCameraCoorY(){ return this->currentCam->getAbsCoorY(); } |
---|
| 43 | float getCurrCameraCoorZ(){ return this->currentCam->getAbsCoorZ(); } |
---|
[10393] | 44 | bool cameraIsInVector(Camera* camera); |
---|
[10192] | 45 | |
---|
| 46 | }; |
---|
| 47 | |
---|
[10195] | 48 | #endif /* _CAMERAMAN_H */ |
---|