Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/vs-enhencements/src/world_entities/tools/cameraman.h @ 10657

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

merged cleanup into trunk (only improvements)

File size: 2.1 KB
Line 
1#ifndef _CAMERAMAN_H
2#define _CAMERAMAN_H
3
4#include "base_object.h"
5#include "state.h"
6#include "camera.h"
7
8class BlackScreen;
9class Camera;
10class PNode;
11
12///! The CameraMan helps you to manage your cameras
13class CameraMan : public BaseObject {
14
15  ObjectListDeclaration(CameraMan);
16
17  public:
18    CameraMan(const TiXmlElement* root = NULL);
19 
20    /// Loading
21    virtual void loadParams(const TiXmlElement* root);
22    void createCameras(const TiXmlElement* camerasTag);
23    void createCam(const TiXmlElement* root);
24
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);
28
29    void jumpCam(const std::string& cameraName, float x, float y, float z);
30    void moveCam(const std::string& cameraName, float x, float y, float z);
31    void setRelCameraCoor(const std::string& cameraName, float x, float y, float z);
32    void setRelCameraCoorSoft(const std::string& cameraName, float x, float y, float z, float bias);
33
34    void setCam(const std::string& cameraName);
35    void setCam(Camera* newCamera);
36    void setClipRegion(float nearClip, float farClip);
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
54  private:
55    float nearClip;
56    float farClip;
57    BlackScreen* fadeToBlack;
58   
59
60};
61
62#endif /* _CAMERAMAN_H */
63 
Note: See TracBrowser for help on using the repository browser.