Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 21, 2008, 4:56:41 PM (16 years ago)
Author:
landauf
Message:
  • added ControllableEntity, the baseclass of all players, vehicles and ships.
  • moved Template to core
  • some changes in Camera
  • added 6 constants to WorldEntity to identify relative directions
  • changed vom Radian to Degree as default angle unit
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/objects/Camera.h

    r1505 r1989  
    3535
    3636#include "OrxonoxPrereqs.h"
     37#include "objects/worldentities/PositionableEntity.h"
    3738
    3839namespace orxonox
    3940{
    40     class _OrxonoxExport Camera
     41    class _OrxonoxExport Camera : public PositionableEntity
    4142    {
    4243      friend class CameraHandler;
    4344      public:
    44         Camera(Ogre::SceneNode* node = NULL);
     45        Camera();
    4546        virtual ~Camera();
    46 
    47         void setPositionNode(Ogre::SceneNode* node);
    48         inline Ogre::SceneNode* getCameraNode() { return this->positionNode_; }
    49         // maybe also BaseObject
    50         void setTargetNode(Ogre::SceneNode* obj);
    51 
    52         Ogre::Camera* cam_;
    5347
    5448        void tick(float dt);
    5549        void update();
    56         inline bool hasFocus() { return this->bHasFocus_; }
     50
     51        void requestFocus();
     52        inline bool hasFocus()
     53            { return this->bHasFocus_; }
     54
     55        inline void setDrag(bool bDrag)
     56            { this->bDrag_ = bDrag; }
     57        inline bool getDrag() const
     58            { return this->bDrag_; }
    5759
    5860      private:
     
    6062        void setFocus(Ogre::Camera* ogreCam);
    6163
    62       private:
    63         Ogre::SceneNode* targetNode_;
    64         Ogre::SceneNode* positionNode_;
     64        Ogre::Camera* cam_;
    6565        Ogre::SceneNode* cameraNode_;
    6666        Ogre::Vector3 oldPos;
    6767        bool bHasFocus_;
     68        bool bDrag_;
    6869    };
    6970}
Note: See TracChangeset for help on using the changeset viewer.