Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10379 in orxonox.OLD for trunk/src/world_entities/camera.h


Ignore:
Timestamp:
Jan 26, 2007, 10:58:31 AM (19 years ago)
Author:
patrick
Message:

merged branche camera to trunk. resolved many conflicts as in the other projects too

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/camera.h

    r10368 r10379  
    1111#include "plane.h"
    1212
     13
    1314class World;
    1415class CameraTarget;
    1516class Event;
    16 
    1717
    1818//! Camera
     
    2222class Camera : public PNode, public EventListener
    2323{
     24  friend class CameraTarget;
     25  friend class CameraMan;
    2426  ObjectListDeclaration(Camera);
    2527public:
     
    3436    ViewTop
    3537  };
    36 
     38  public:
    3739  Camera();
    3840  Camera(const TiXmlElement* root);
     
    4244  CameraTarget* getTarget() const { return this->target; };
    4345  PNode* getTargetNode() const;
    44 
     46  void setTargetNode(PNode* target);
    4547  void setAspectRatio(float aspectRatio);
    4648  inline float getAspectRatio() {return this->aspectRatio;};
     
    7072  inline bool getEventHandling() {return this->eventHandling;}
    7173
     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();
    7277  void tick(float dt);
    7378  void apply ();
     
    7580
    7681  void process(const Event &event);
     82  //CameraTarget*     target;          //!< The Target of the Camera (where this Camera Looks at)
    7783
    78   //virtual void loadParams(const TiXmlElement* root);
     84  virtual void loadParams(const TiXmlElement* root);
    7985
    8086  void              setViewTopFovy(float fovy);
     
    132138class CameraTarget : public PNode
    133139{
    134   friend class Camera;             //! The CameraTarget is a friend of Camera. noone else needs a CameraTarget, so noone else can create it.
     140  friend class Camera;        //! The CameraTarget is a friend of Camera. noone else needs a CameraTarget, so noone else can create it.
    135141  ObjectListDeclaration(CameraTarget);
    136142
    137143private:
    138144  CameraTarget();
     145  virtual ~CameraTarget() {}
     146  float speed;
     147  PNode* target;
     148  PNode* freeTarget;
     149  Camera* masta;
     150  Vector translateTo;
     151  Vector rotateBy;
     152
    139153
    140154public:
     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();
    141167};
    142168
    143169
     170
     171
    144172#endif /* _CAMERA_H */
     173
Note: See TracChangeset for help on using the changeset viewer.