Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/tools/cameraman.h @ 10770

Last change on this file since 10770 was 10618, checked in by bknecht, 18 years ago

merged cleanup into trunk (only improvements)

File size: 2.1 KB
RevLine 
[10406]1#ifndef _CAMERAMAN_H
2#define _CAMERAMAN_H
3
4#include "base_object.h"
[10593]5#include "state.h"
6#include "camera.h"
[10406]7
8class BlackScreen;
9class Camera;
10class PNode;
11
[10596]12///! The CameraMan helps you to manage your cameras
[10406]13class CameraMan : public BaseObject {
[10593]14
[10406]15  ObjectListDeclaration(CameraMan);
16
17  public:
18    CameraMan(const TiXmlElement* root = NULL);
[10593]19 
20    /// Loading
[10480]21    virtual void loadParams(const TiXmlElement* root);
[10414]22    void createCameras(const TiXmlElement* camerasTag);
[10406]23    void createCam(const TiXmlElement* root);
[10480]24
[10593]25    /// Camera management
26    void changeTarget(const std::string& cameraName,const std::string& className, const std::string& objectName);
27    void attachCamera(const std::string& cameraName, const std::string& className, const std::string& targetEntity);
[10480]28
[10483]29    void jumpCam(const std::string& cameraName, float x, float y, float z);
[10593]30    void moveCam(const std::string& cameraName, float x, float y, float z);
[10495]31    void setRelCameraCoor(const std::string& cameraName, float x, float y, float z);
[10497]32    void setRelCameraCoorSoft(const std::string& cameraName, float x, float y, float z, float bias);
[10593]33
34    void setCam(const std::string& cameraName);
35    void setCam(Camera* newCamera);
[10406]36    void setClipRegion(float nearClip, float farClip);
[10593]37   
38    /// Managing the current camera
39    void changeCurrTarget(const std::string& className, const std::string& objectName);
40    void attachCurrCamera(const std::string& className, const std::string& targetEntity);
41    void jumpCurrCam(float x, float y, float z);
42    void moveCurrCam(float x, float y, float z);
43
44    /// Fading
45    void togglFade();
46    void initFadeBlack(); 
47
48    /// Polling
49    float getCurrCameraCoorX(){return (State::getCamera())->getAbsCoorX();}
50    float getCurrCameraCoorY(){return (State::getCamera())->getAbsCoorY();}
51    float getCurrCameraCoorZ(){return (State::getCamera())->getAbsCoorZ();}
52    const std::string& getCurrCamName(){ return (State::getCamera())->getName(); }
53
[10480]54  private:
[10593]55    float nearClip;
56    float farClip;
57    BlackScreen* fadeToBlack;
[10480]58   
[10406]59
60};
61
62#endif /* _CAMERAMAN_H */
[10593]63 
Note: See TracBrowser for help on using the repository browser.