Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/world_entities/camera.h @ 4490

Last change on this file since 4490 was 4490, checked in by bensch, 19 years ago

orxonox/trunk: started documentation of world-entities….
this is not really usefull, because i think, that this will change a lot with development….

File size: 1.8 KB
RevLine 
[2096]1/*!
2    \file camera.h
3    \brief Viewpoint controlling class definitions
4*/ 
[2068]5
[3224]6#ifndef _CAMERA_H
7#define _CAMERA_H
[2068]8
[3635]9#include "p_node.h"
[3641]10#include "vector.h"
[4414]11#include "event_listener.h"
[2100]12
[2636]13class World;
[3635]14class CameraTarget;
[4414]15class Event;
[2100]16
[4490]17//! an enumerator for different types of view
18typedef enum ViewMode{ VIEW_NORMAL,
19                       VIEW_BEHIND,
20                       VIEW_FRONT,
21                       VIEW_LEFT,
22                       VIEW_RIGHT,
23                       VIEW_TOP };
[3635]24
[2096]25//! Camera
26/**
[3635]27   This class controls the viewpoint from which the World is rendered.
[2096]28*/
[4414]29class Camera : public PNode, public EventListener
[3635]30{
31 public:
32  Camera(void);
33  virtual ~Camera(void);
34
35  void lookAt(PNode* target);
36  PNode* getTarget();
[3636]37
38  void setAspectRatio(float aspectRatio);
39  void setFovy(float fovy);
40  void setClipRegion(float nearClip, float farClip);
41
[3639]42  void setViewMode(ViewMode mode);
43  void tick(float dt);
[3636]44  void apply (void);
[4414]45
46  void process(const Event &event);
[4490]47
48 private:
49  CameraTarget*     target;          //!< The Target of the Camera (where this Camera Looks at)
50
51  float             fovy;            //!< The field of view Angle (in degrees).
52  float             aspectRatio;     //!< The aspect ratio (width / height).
53  float             nearClip;        //!< The near clipping plane.
54  float             farClip;         //!< The far clipping plane.
55
56  Vector toRelCoor;                  //!< The relativeCoordinate to move the camera to.
57  float toFovy;                      //!< The fovy-mode to iterate to.
[3635]58};
[2068]59
[3635]60//! A CameraTarget is where the Camera is looking at.
61class CameraTarget : public PNode
62{
[3636]63  friend class Camera;             //! The CameraTarget is a friend of Camera. noone else needs a CameraTarget, so noone else can create it.
[2551]64 
[3635]65 private:
66  CameraTarget(void);
[2636]67 
[2068]68 public:
[3635]69  virtual ~CameraTarget(void);
70};
[2068]71
72
[3224]73#endif /* _CAMERA_H */
Note: See TracBrowser for help on using the repository browser.