Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/camera.h @ 3554

Last change on this file since 3554 was 3551, checked in by patrick, 20 years ago

orxonox/trunk: renamed all timing functions to tick() - cleanede up world

File size: 1.4 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
[3365]9#include "world_entity.h"
[2100]10
[2636]11class World;
[2100]12
[2096]13//! Camera
14/**
[2636]15   This class controls the viewpoint from which the World is rendered. To use the
16   Camera it has to be bound to a WorldEntity which serves as the reference focus
17   point. The Camera itself calls the WorldEntity::get_lookat() and
18   World::calc_camera_pos() functions to calculate the position it currently should
19   be in.
[2096]20*/
[2551]21
22enum CAMERA_MODE {NORMAL, SMOTH_FOLLOW, STICKY, ELLIPTICAL};
23
[3365]24class Camera : public WorldEntity {
[2068]25 private:
[2551]26  WorldEntity* bound;           //!< the WorldEntity the Camera is bound to
[2636]27  World* world;
[2551]28 
29  /* physical system - not needed yet */
30  float m; //!< mass
31  Vector *fs; //!< seil-kraft
32  Vector *a;  //!< acceleration
33  Vector *v;  //!< velocity
34 
35  /* elliptical camera mode variables */
36  float cameraOffset;
37  float cameraOffsetZ;
38  float deltaTime;
39  float t;
40  Vector r;
41  float rAbs;
42  float ka;
43  float a0;
[2068]44
[2551]45  Quaternion *from;
46  Quaternion *to;
47  Quaternion *res;
48 
[2636]49 
[2551]50  CAMERA_MODE cameraMode; //!< saves the camera mode: how the camera follows the entity
[2636]51 
[3228]52  void updateDesiredPlace ();
[2636]53 
[2068]54 public:
[2636]55  Camera (World* world);
[3543]56  virtual ~Camera ();
[2636]57 
[3551]58  void tick (Uint32 deltaT);
[2636]59  void apply ();
60  void bind (WorldEntity* entity);
[2068]61
[2636]62  void setWorld(World* world); 
[2068]63
64};
65
[3224]66#endif /* _CAMERA_H */
Note: See TracBrowser for help on using the repository browser.