[10406] | 1 | #ifndef _CAMERAMAN_H |
---|
| 2 | #define _CAMERAMAN_H |
---|
| 3 | |
---|
| 4 | |
---|
| 5 | #include <vector> |
---|
| 6 | #include "base_object.h" |
---|
| 7 | |
---|
| 8 | class BlackScreen; |
---|
| 9 | class Camera; |
---|
| 10 | class PNode; |
---|
| 11 | |
---|
| 12 | class CameraMan : public BaseObject { |
---|
| 13 | ObjectListDeclaration(CameraMan); |
---|
| 14 | |
---|
| 15 | private: |
---|
| 16 | Camera* currentCam; |
---|
| 17 | float nearClip; |
---|
| 18 | float farClip; |
---|
| 19 | BlackScreen* fadeToBlack; |
---|
| 20 | |
---|
| 21 | public: |
---|
| 22 | std::vector<Camera*> cameras; |
---|
| 23 | CameraMan(const TiXmlElement* root = NULL); |
---|
| 24 | void setCam(int CameraNo); |
---|
| 25 | void setCam(const std::string& camName); |
---|
| 26 | void setCam(Camera* camera); |
---|
| 27 | |
---|
[10414] | 28 | void createCameras(const TiXmlElement* camerasTag); |
---|
[10406] | 29 | void createCam(const TiXmlElement* root); |
---|
| 30 | void moveCam(int x, int y, int z, int camNo); |
---|
| 31 | void moveCurrCam(int x, int y, int z); |
---|
| 32 | void changeTarget(int camNo, const std::string& className,const std::string& objectName); |
---|
| 33 | void changeTarget(const std::string& camName,const std::string& className, const std::string& objectName); |
---|
| 34 | void changeCurrTarget(const std::string& className, const std::string& objectName); |
---|
| 35 | void atachCurrTarget(PNode* target); |
---|
| 36 | void atachCurrCameraToWorldEntity(const std::string& className, const std::string& targetEntity); |
---|
[10416] | 37 | void atachCameraToWorldEntity(const std::string& cameraName, const std::string& className, const std::string& targetEntity); |
---|
[10413] | 38 | void detachCurrCamera(); |
---|
[10406] | 39 | void jumpCam(int x, int y, int z, int camNo); |
---|
| 40 | void jumpCurrCam(int x, int y, int z); |
---|
| 41 | void changeSpeed(float speed); |
---|
| 42 | void setClipRegion(float nearClip, float farClip); |
---|
| 43 | void togglFade(); |
---|
[10424] | 44 | void initFadeBlack(); |
---|
[10406] | 45 | |
---|
| 46 | void cameraInfo(); |
---|
| 47 | |
---|
| 48 | /// LOADING |
---|
| 49 | virtual void loadParams(const TiXmlElement* root); |
---|
| 50 | |
---|
| 51 | /// POLLING |
---|
| 52 | float getCurrCameraCoorX(); |
---|
| 53 | float getCurrCameraCoorY(); |
---|
| 54 | float getCurrCameraCoorZ(); |
---|
| 55 | bool cameraIsInVector(Camera* camera); |
---|
| 56 | |
---|
| 57 | }; |
---|
| 58 | |
---|
| 59 | #endif /* _CAMERAMAN_H */ |
---|