-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathComplexLine.h
48 lines (39 loc) · 1.18 KB
/
ComplexLine.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
/* 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 COMPLEXLINE_H
#define COMPLEXLINE_H
#include <QVector>
#include "TSection.h"
class ComplexLinePoint {
public:
bool selected = false;
int shapeType = 0;
float position[3];
ComplexLinePoint();
ComplexLinePoint(const ComplexLinePoint& o);
};
class ComplexLine {
public:
float length;
QString hash;
ComplexLine();
virtual ~ComplexLine();
void init(QVector<TSection> s);
void init(QVector<ComplexLinePoint> s);
float getLength();
QString getHash();
void getDrawPosition(float* posRot, float distance, float xOffset = 0);
private:
QVector<TSection> sections;
QVector<ComplexLinePoint> points;
void getDrawPositionFromTSection(float* posRot, float distance, float xOffset = 0);
void getDrawPositionFromPoints(float* posRot, float distance, float xOffset = 0);
};
#endif /* COMPLEXLINE_H */