Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 3, 2014, 2:57:05 PM (11 years ago)
Author:
muemart
Message:

Turret: Limit turret's rotation (not really precise though) & implement xml stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/turretFS14/src/modules/objects/Turret.h

    r10008 r10018  
    4040
    4141#include "worldentities/pawns/SpaceShip.h"
     42#include "controllers/TurretController.h"
    4243
    4344namespace orxonox
     
    5354            virtual void rotateRoll(const Vector2& value);
    5455
    55             void setAlertnessRadius(float value);
    56             float getAlertnessRadius();
    57 
    5856            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    5957            virtual void tick(float dt);
    6058
     59            inline void setMaxPitch(Ogre::Real pitch)
     60                {this->maxPitch_ = pitch;}
    6161
    62         protected:
    63             WaypointPatrolController* controller_;
     62            inline Ogre::Real getMaxPitch()
     63                {return this->maxPitch_;}
     64
     65            inline void setMaxYaw(Ogre::Real yaw)
     66                {this->maxYaw_ = yaw;}
     67
     68            inline Ogre::Real getMaxYaw()
     69                {return this->maxYaw_;}
     70
    6471        private:
    6572            bool gotOrient_;
    66             Quaternion startOrient_;
     73            Ogre::Real maxPitch_;
     74            Ogre::Real maxYaw_;
     75            Quaternion startOrientInv_;
     76
     77            Ogre::Real boundBetween(float val, float lowerBound, float upperBound);
    6778    };
    6879}
Note: See TracChangeset for help on using the changeset viewer.