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