-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tank.h
51 lines (40 loc) · 872 Bytes
/
Tank.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//
// Tank.hpp
// CGXcode
//
// Created by Philipp Lensing on 16.11.16.
// Copyright © 2016 Philipp Lensing. All rights reserved.
//
#ifndef Tank_hpp
#define Tank_hpp
#include <stdio.h>
#include <math.h>
#include "model.h"
#include "PhongShader.h"
#define M_PI 3.14159265358979323846
class Tank : public BaseModel
{
public:
Tank();
virtual ~Tank();
bool loadModels(const char* ChassisFile, const char* CannonFile);
void steer( float ForwardBackward, float LeftRight);
void aim( const Vector& Target );
void update(float dtime);
virtual void draw(const BaseCamera& Cam);
protected:
Model *pTankBot;
Model *pTankTop;
//PhongShader *pPhongShader;
float fb;
float lr;
//Zurückgelegter Weg
Vector way;
//Winkel vom Panzer
float rt;
//Winkel von Kanone
float aim_angle;
Matrix *TM;
Matrix *RM;
};
#endif /* Tank_hpp */