Changeset 10379 in orxonox.OLD for trunk/src/world_entities/camera.h
- Timestamp:
- Jan 26, 2007, 10:58:31 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/camera.h
r10368 r10379 11 11 #include "plane.h" 12 12 13 13 14 class World; 14 15 class CameraTarget; 15 16 class Event; 16 17 17 18 18 //! Camera … … 22 22 class Camera : public PNode, public EventListener 23 23 { 24 friend class CameraTarget; 25 friend class CameraMan; 24 26 ObjectListDeclaration(Camera); 25 27 public: … … 34 36 ViewTop 35 37 }; 36 38 public: 37 39 Camera(); 38 40 Camera(const TiXmlElement* root); … … 42 44 CameraTarget* getTarget() const { return this->target; }; 43 45 PNode* getTargetNode() const; 44 46 void setTargetNode(PNode* target); 45 47 void setAspectRatio(float aspectRatio); 46 48 inline float getAspectRatio() {return this->aspectRatio;}; … … 70 72 inline bool getEventHandling() {return this->eventHandling;} 71 73 74 void glLookAt(float eyex, float eyey, float eyez, float centerx, float centery, float centerz, float upx, float upy, float upz); 75 Vector* VectorProd(Vector* v1, Vector* v2); 76 void Rotate(); 72 77 void tick(float dt); 73 78 void apply (); … … 75 80 76 81 void process(const Event &event); 82 //CameraTarget* target; //!< The Target of the Camera (where this Camera Looks at) 77 83 78 //virtual void loadParams(const TiXmlElement* root);84 virtual void loadParams(const TiXmlElement* root); 79 85 80 86 void setViewTopFovy(float fovy); … … 132 138 class CameraTarget : public PNode 133 139 { 134 friend class Camera; 140 friend class Camera; //! The CameraTarget is a friend of Camera. noone else needs a CameraTarget, so noone else can create it. 135 141 ObjectListDeclaration(CameraTarget); 136 142 137 143 private: 138 144 CameraTarget(); 145 virtual ~CameraTarget() {} 146 float speed; 147 PNode* target; 148 PNode* freeTarget; 149 Camera* masta; 150 Vector translateTo; 151 Vector rotateBy; 152 139 153 140 154 public: 155 156 void detach(); 157 void atach(PNode* object); 158 Vector iterate(float dt, const Vector* target, const Vector* cam); 159 void translate(float dt); 160 void changeSpeed(float speed); 161 Vector* rotate(Vector* newPos, float speed); 162 void jump(float x, float y, float z); 163 void translateNow(Vector* vec); 164 PNode* createStick(); 165 void trans(float x, float y, float z); 166 bool isDone(); 141 167 }; 142 168 143 169 170 171 144 172 #endif /* _CAMERA_H */ 173
Note: See TracChangeset
for help on using the changeset viewer.