Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: Hover should be Time Independant

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