/*
 * Robot.h
 *
 *  Created on: Dec 31, 2010
 *      Author: cpresser
 */

#ifndef ROBOT_H_
#define ROBOT_H_

#include "Random.h"

#include <OgreEntity.h>
#include <OgreRoot.h>
#include <OgreSceneManager.h>

#include <string>

class Robot {
public:
        Robot(Ogre::SceneManager* sceneMgr);
        ~Robot();

        void update(const Ogre::FrameEvent &evt);
        void setupAnimation();
        int getId();
        std::string getName();
        bool nextLocation();

private:
    Ogre::Real mDistance;                  // The distance the object has left to travel
    Ogre::Vector3 mDirection;              // The direction the object is moving
    Ogre::Vector3 mDestination;            // The destination the object is moving towards

    Ogre::AnimationState *mAnimationState; // The current animation state of the object

    Ogre::Entity *mEntity;                 // The Entity we are animating
    Ogre::SceneNode *mNode;                // The SceneNode that the Entity is attached to
    std::deque<Ogre::Vector3> mWalkList;   // The list of points we are walking to

    Ogre::Real mWalkSpeed;                 // The speed at which the object is moving

    bool mIsWalking;                                       //Is the robot walking?

    //this robot's id
    int mId;
    //this robot's name
    std::string mName;

    static Random sRand;                                        //Random number generator
    static int sNextID;                                         //Next ID to be used

};

#endif /* ROBOT_H_ */