Jamie Slowgrove - OOT Assignment 1 - A Mission in Afghanistan
 All Classes Namespaces Files Functions Variables Macros
Turret.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "stdafx.h"
4 #include <iostream>
5 #include <memory>
6 #include "OgreApplication.h"
7 #include "MyUtils.h"
8 #include "GameActor.h"
9 #include "TurretBarrel.h"
10 
15 class Turret : public GameActor
16 {
17 private:
19  std::shared_ptr<TurretBarrel> barrel;
21  Ogre::Vector3 target;
23  Ogre::Vector3 lastTarget;
24 
28  void rotateTurret();
29 
30 public:
37  Turret(Ogre::Vector3 position, Ogre::Vector3 orientation, Ogre::Real scale);
38 
42  ~Turret();
43 
48  void setTarget(Ogre::Vector3 target);
49 
54  void setUpActor(OgreApplication* application);
55 
60  void updateActor(float dt);
61 
67  void updateProjectiles(float dt, OgreApplication* application, std::shared_ptr<Helicopter> helicopter);
68 };
void updateProjectiles(float dt, OgreApplication *application, std::shared_ptr< Helicopter > helicopter)
Definition: Turret.cpp:97
std::shared_ptr< TurretBarrel > barrel
Definition: Turret.h:19
Turret(Ogre::Vector3 position, Ogre::Vector3 orientation, Ogre::Real scale)
Definition: Turret.cpp:7
Definition: OgreApplication.h:22
Ogre::Real scale
Definition: GameActor.h:26
Ogre::Vector3 target
Definition: Turret.h:21
void setTarget(Ogre::Vector3 target)
Definition: Turret.cpp:24
A class for a GameActor object.
Definition: GameActor.h:14
~Turret()
Definition: Turret.cpp:17
Ogre::Vector3 orientation
Definition: GameActor.h:24
void updateActor(float dt)
Definition: Turret.cpp:85
A class for a Turret object that inherits GameActor.
Definition: Turret.h:15
Ogre::Vector3 position
Definition: GameActor.h:22
void setUpActor(OgreApplication *application)
Definition: Turret.cpp:50
Ogre::Vector3 lastTarget
Definition: Turret.h:23
void rotateTurret()
Definition: Turret.cpp:37