#ifndef _CAMERAMAN_H #define _CAMERAMAN_H #include "base_object.h" #include "state.h" #include "camera.h" class BlackScreen; class Camera; class PNode; ///! The CameraMan helps you to manage your cameras class CameraMan : public BaseObject { ObjectListDeclaration(CameraMan); public: CameraMan(const TiXmlElement* root = NULL); /// Loading virtual void loadParams(const TiXmlElement* root); void createCameras(const TiXmlElement* camerasTag); void createCam(const TiXmlElement* root); /// Camera management void changeTarget(const std::string& cameraName,const std::string& className, const std::string& objectName); void attachCamera(const std::string& cameraName, const std::string& className, const std::string& targetEntity); void jumpCam(const std::string& cameraName, float x, float y, float z); void moveCam(const std::string& cameraName, float x, float y, float z); void setRelCameraCoor(const std::string& cameraName, float x, float y, float z); void setRelCameraCoorSoft(const std::string& cameraName, float x, float y, float z, float bias); void setCam(const std::string& cameraName); void setCam(Camera* newCamera); void setClipRegion(float nearClip, float farClip); /// Managing the current camera void changeCurrTarget(const std::string& className, const std::string& objectName); void attachCurrCamera(const std::string& className, const std::string& targetEntity); void jumpCurrCam(float x, float y, float z); void moveCurrCam(float x, float y, float z); /// Fading void togglFade(); void initFadeBlack(); /// Polling float getCurrCameraCoorX(){return (State::getCamera())->getAbsCoorX();} float getCurrCameraCoorY(){return (State::getCamera())->getAbsCoorY();} float getCurrCameraCoorZ(){return (State::getCamera())->getAbsCoorZ();} const std::string& getCurrCamName(){ return (State::getCamera())->getName(); } private: float nearClip; float farClip; BlackScreen* fadeToBlack; }; #endif /* _CAMERAMAN_H */