forked from GokuMK/TSRE5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDynTrackObj.h
58 lines (51 loc) · 1.49 KB
/
DynTrackObj.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
52
53
54
55
56
57
58
/* This file is part of TSRE5.
*
* TSRE5 - train sim game engine and MSTS/OR Editors.
* Copyright (C) 2016 Piotr Gadecki <[email protected]>
*
* Licensed under GNU General Public License 3.0 or later.
*
* See LICENSE.md or https://www.gnu.org/licenses/gpl.html
*/
#ifndef DYNTRACKOBJ_H
#define DYNTRACKOBJ_H
#include "WorldObj.h"
#include <QString>
class OglObj;
class DynTrackObj : public WorldObj{
public:
struct Section{
int type;
unsigned int sectIdx;
float a;
float r;
};
Section* sections = NULL;
QVector<OglObj*> shape;
DynTrackObj();
DynTrackObj(const DynTrackObj& o);
WorldObj* clone();
virtual ~DynTrackObj();
bool allowNew();
void load(int x, int y);
void setElevation(float prom);
void set(int sh, FileBuffer* val);
void set(QString sh, FileBuffer* data);
void set(QString sh, float* val);
void save(QTextStream* out);
void resize(float x, float y, float z);
void removedFromTDB();
void deleteVBO();
int getDefaultDetailLevel();
void render(GLUU* gluu, float lod, float posx, float posz, float* playerW, float* target, float fov, int selectionColor, int renderMode);
private:
int tex1;
int tex2;
bool init;
float elevation;
float* jNodePosn = NULL;
int sidxSelected = 0;
bool getSimpleBorder(float* border);
bool getBoxPoints(QVector<float> &points);
};
#endif /* DYNTRACKOBJ_H */