Jamie Slowgrove - OOT Assignment 1 - A Mission in Afghanistan
 All Classes Namespaces Files Functions Variables Macros
GameActor.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "stdafx.h"
4 #include <iostream>
5 #include <memory>
6 #include <string>
7 #include "OgreApplication.h"
8 #include "MyUtils.h"
9 
14 class GameActor
15 {
16 private:
17 
18 protected:
20  std::shared_ptr<Ogre::SceneNode> gameActorNode;
22  Ogre::Vector3 position;
24  Ogre::Vector3 orientation;
26  Ogre::Real scale;
28  static unsigned int actorIDGenerator;
30  unsigned int actorID;
31 
32 public:
39  GameActor(Ogre::Vector3 position, Ogre::Vector3 orientation, Ogre::Real scale);
40 
44  virtual ~GameActor();
45 
50  virtual void setUpActor(OgreApplication* application) = 0;
51 
56  virtual void updateActor(float dt) = 0;
57 
62  std::shared_ptr<Ogre::SceneNode> getActorNode();
63 
68  std::string getActorID();
69 
74  Ogre::Vector3 getPosition();
75 
80  void setPosition(Ogre::Vector3 position);
81 
86  void setX(float x);
87 
92  void setY(float y);
93 
98  void setZ(float z);
99 
104  Ogre::Vector3 getOrientation();
105 
110  void setOrientation(Ogre::Vector3 orientation);
111 
116  void setXOrientation(float xOrientation);
117 
122  void setYOrientation(float yOrientation);
123 
128  void setZOrientation(float zOrientation);
129 
134  Ogre::Real getScale();
135 
140  void setScale(Ogre::Real scale);
141 
146  void changePosition(Ogre::Vector3 position);
147 };
Definition: OgreApplication.h:22
void setOrientation(Ogre::Vector3 orientation)
Definition: GameActor.cpp:108
Ogre::Real scale
Definition: GameActor.h:26
void setYOrientation(float yOrientation)
Definition: GameActor.cpp:126
virtual void updateActor(float dt)=0
Ogre::Vector3 getOrientation()
Definition: GameActor.cpp:99
void setZOrientation(float zOrientation)
Definition: GameActor.cpp:135
std::shared_ptr< Ogre::SceneNode > gameActorNode
Definition: GameActor.h:20
void setXOrientation(float xOrientation)
Definition: GameActor.cpp:117
A class for a GameActor object.
Definition: GameActor.h:14
unsigned int actorID
Definition: GameActor.h:30
void setZ(float z)
Definition: GameActor.cpp:90
Ogre::Vector3 orientation
Definition: GameActor.h:24
void setPosition(Ogre::Vector3 position)
Definition: GameActor.cpp:63
void changePosition(Ogre::Vector3 position)
Definition: GameActor.cpp:162
Ogre::Vector3 position
Definition: GameActor.h:22
std::shared_ptr< Ogre::SceneNode > getActorNode()
Definition: GameActor.cpp:36
virtual ~GameActor()
Definition: GameActor.cpp:29
std::string getActorID()
Definition: GameActor.cpp:45
GameActor(Ogre::Vector3 position, Ogre::Vector3 orientation, Ogre::Real scale)
Definition: GameActor.cpp:12
Ogre::Vector3 getPosition()
Definition: GameActor.cpp:54
Ogre::Real getScale()
Definition: GameActor.cpp:144
void setScale(Ogre::Real scale)
Definition: GameActor.cpp:153
void setY(float y)
Definition: GameActor.cpp:81
virtual void setUpActor(OgreApplication *application)=0
void setX(float x)
Definition: GameActor.cpp:72
static unsigned int actorIDGenerator
Definition: GameActor.h:28