-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstdafx.h
More file actions
69 lines (65 loc) · 2.63 KB
/
stdafx.h
File metadata and controls
69 lines (65 loc) · 2.63 KB
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
59
60
61
62
63
64
65
66
67
68
69
#pragma once
#define WIN32_LEAN_AND_MEAN
#include <cstdio>
#include <windows.h>
#define _USE_MATH_DEFINES
struct Vector3 {
double x;
double y;
double z;
Vector3() { x = 0; y = 0; z = 0; }
Vector3(double nx, double ny, double nz) { x = nx; y = ny; z = nz; }
void set0() { x = 0; y = 0; z = 0; };
double &operator[] (int);
friend Vector3 operator + (const Vector3 &, const Vector3 &);
friend Vector3 operator + (const Vector3 &, double);
friend Vector3 operator - (const Vector3 &, const Vector3 &);
friend Vector3 operator - (const Vector3 &, double);
friend Vector3 operator * (const Vector3 &, double);
friend Vector3 operator * (double, const Vector3 &);
friend Vector3 operator * (const Vector3 &, const Vector3 &);
friend Vector3 operator / (const Vector3 &, double);
friend Vector3 operator += (Vector3 &, const Vector3 &);
friend Vector3 operator -= (Vector3 &, const Vector3 &);
friend Vector3 operator *= (Vector3 &, double);
friend Vector3 operator /= (Vector3 &, double);
::Vector3 operator-();
};
struct platf_angl {
double kappa;
double chi;
double psi;
platf_angl() { kappa = 0; chi = 0; psi = 0; }
platf_angl(double nx, double ny, double npsi) { kappa = nx; chi = ny; psi = npsi; }
void set(double nx, double ny) { kappa = nx; chi = ny; }
void set0() { kappa = 0; chi = 0; psi = 0; }
double &operator[] (int);
friend platf_angl operator + (const platf_angl &, const platf_angl &);
friend platf_angl operator - (const platf_angl &, const platf_angl &);
friend platf_angl operator * (double, const platf_angl &);
friend platf_angl operator * (const platf_angl &, double);
friend platf_angl operator / (const platf_angl &, double);
friend platf_angl operator += (platf_angl &, const platf_angl &);
};
struct platform {
Vector3 pos;
platf_angl ang;
platform() { pos = Vector3(); ang = platf_angl(); };
platform(Vector3 npos, platf_angl nang) { pos = npos; ang = nang; }
void set0() { pos.set0(); ang.set0(); }
friend platform operator + (const platform &, const platform &);
friend platform operator - (const platform &, const platform &);
friend platform operator += (platform &, const platform &);
friend platform operator / (const platform &, double);
};
struct engine_position {
double x;
double y;
double z;
engine_position() { x = 0; y = 0; z = 0; }
engine_position(double nx, double ny, double nz) { x = nx; y = ny; z = nz; }
friend engine_position operator + (const engine_position &, double);
friend engine_position operator / (const engine_position &, double);
friend engine_position operator * (const engine_position &, double);
::engine_position operator-();
};