00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef TG_ACTION_H
00019 #define TG_ACTION_H
00020
00021 #include "Vec.h"
00022
00023 namespace tagGame
00024 {
00027 class Action
00028 {
00029 public:
00030 Action();
00031 Action(Action const& a);
00032
00033 Action& operator=(Action const& a);
00034
00035 inline void setDesiredDirection(RealVec const& direction);
00036 inline RealVec const& getDesiredDirection() const;
00037 inline void setDesiredSpeed(Real const speed);
00038 inline Real getDesiredSpeed() const;
00039
00040
00041
00042 std::ostream& output(std::ostream& out) const;
00043
00044 protected:
00045 private:
00046
00047
00048
00049
00050
00051 RealVec direction;
00052
00053 Real speed;
00054 };
00055
00056 std::ostream& operator<<(std::ostream& out, Action const& a);
00057
00058 void Action::setDesiredDirection(RealVec const& direction)
00059 {
00060 this->direction = direction;
00061 }
00062
00063 RealVec const& Action::getDesiredDirection() const
00064 {
00065 return direction;
00066 }
00067
00068 void Action::setDesiredSpeed(Real const speed)
00069 {
00070 this->speed = speed;
00071 }
00072
00073 Real Action::getDesiredSpeed() const
00074 {
00075 return speed;
00076 }
00077 }
00078
00079 #endif