Changeset 3635 in orxonox.OLD for orxonox/trunk/src/camera.h
- Timestamp:
- Mar 23, 2005, 12:24:48 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/camera.h
r3608 r3635 7 7 #define _CAMERA_H 8 8 9 #include " world_entity.h"9 #include "p_node.h" 10 10 11 11 class World; 12 class CameraTarget; 13 12 14 13 15 //! Camera 14 16 /** 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. 17 This class controls the viewpoint from which the World is rendered. 20 18 */ 21 22 enum CAMERA_MODE {NORMAL, SMOTH_FOLLOW, STICKY, ELLIPTICAL}; 23 24 class Camera : public WorldEntity { 19 class Camera : public PNode 20 { 25 21 private: 26 WorldEntity* bound; //!< the WorldEntity the Camera is bound to 27 World* world; 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; 44 45 Quaternion *from; 46 Quaternion *to; 47 Quaternion *res; 48 49 50 CAMERA_MODE cameraMode; //!< saves the camera mode: how the camera follows the entity 51 52 void updateDesiredPlace (); 22 CameraTarget* target; 53 23 54 24 public: 55 Camera (World* world); 56 virtual ~Camera (); 25 Camera(void); 26 virtual ~Camera(void); 27 28 void lookAt(PNode* target); 57 29 58 void tick (Uint32 deltaT);30 PNode* getTarget(); 59 31 void apply (); 60 void bind (WorldEntity* entity);61 62 void setWorld(World* world);63 64 32 }; 65 33 34 //! A CameraTarget is where the Camera is looking at. 35 class CameraTarget : public PNode 36 { 37 friend class Camera; //! 38 39 private: 40 CameraTarget(void); 41 42 public: 43 virtual ~CameraTarget(void); 44 }; 45 46 66 47 #endif /* _CAMERA_H */
Note: See TracChangeset
for help on using the changeset viewer.