-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmyObject.cpp
More file actions
325 lines (262 loc) · 6.04 KB
/
Copy pathmyObject.cpp
File metadata and controls
325 lines (262 loc) · 6.04 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
#include "myObject.h"
//Constructors
myObject::myObject()
{
Point3D originPos;
myObject::Name = "null";
myObject::filename = "NULL";
myObject::Mod = "NULL";
myObject::Parent = this;
myObject::Parent->Name="null";
myObject::distance = NULL;
myObject::azimuth = NULL;
myObject::inclination = NULL;
myObject::axialTilt = NULL;
myObject::Heading = originPos;
myObject::position = originPos;
myObject::gravity = NULL;
myObject::radius = NULL;
myObject::atmoRadius = NULL;
myObject::atmosphere = NULL;
myObject::minSurfaceRadius = NULL;
myObject::maxHillRadius = NULL;
myObject::surfaceGravity = NULL;
myObject::gravityFalloff = NULL;
myObject::spawnFauna = NULL;
myObject::spaunFlora = NULL;
myObject::showGPS = NULL;
myObject::planetGenerator = "NULL";
}
myObject::myObject(string name)
{
myObject::Name = name;
}
myObject::myObject(string name, double x, double y, double z)
{
myObject::Name = name;
myObject::position.setX(x);
myObject::position.setY(y);
myObject::position.setZ(z);
}
myObject::myObject(string name, myObject parent, double azimuth, double inclination, double distance)
{
myObject::Name = name;
myObject::Parent = &parent;
myObject::distance = distance;
myObject::azimuth=azimuth;
myObject::setInclination(inclination) ;
myObject::position = position.vectp3D(parent.position, azimuth, inclination, distance);
}
myObject::myObject(string Name, string filename, string Mod, myObject* Parent, double distance, double azimuth, double inclination, double axialTilt, Point3D Heading, Point3D position, double gravity, double radius, double atmoRadius, bool atmosphere, double minSurfaceRadius, double maxHillRadius, double surfaceGravity, double gravityFalloff, bool spawnFauna, bool spaunFlora, bool showGPS, string planetGenerator)
{
Point3D originPos;
myObject::Name = Name;
myObject::filename = filename;
myObject::Mod = Mod;
myObject::Parent = Parent;
myObject::distance = distance;
myObject::azimuth = azimuth;
myObject::inclination = inclination;
myObject::axialTilt = axialTilt;
myObject::Heading = Heading;
myObject::position = position;
myObject::gravity = gravity;
myObject::radius = radius;
myObject::atmoRadius = atmoRadius;
myObject::atmosphere = atmosphere;
myObject::minSurfaceRadius = minSurfaceRadius;
myObject::maxHillRadius = maxHillRadius;
myObject::surfaceGravity = surfaceGravity;
myObject::gravityFalloff = gravityFalloff;
myObject::spawnFauna = spawnFauna;
myObject::spaunFlora = spaunFlora;
myObject::showGPS = showGPS;
myObject::planetGenerator = planetGenerator;
updateObject();
}
//Deconstructor
myObject::~myObject()
{
}
//getters
string myObject::getName()
{
return Name;
}
string myObject::getFilename()
{
return filename;
}
string myObject::getMod()
{
return Mod;
}
myObject* myObject::getParent()
{
return Parent;
}
double myObject::getDistance()
{
return distance;
}
double myObject::getAzimuth()
{
return azimuth;
}
double myObject::getInclination()
{
return inclination;
}
double myObject::getAxialTiltt()
{
return axialTilt;
}
Point3D myObject::getHeading()
{
return Heading;
}
Point3D myObject::getPosition()
{
return Point3D();
}
double myObject::getGravity()
{
return gravity;
}
double myObject::getRadius()
{
return radius;
}
double myObject::getAtmoRadius()
{
return atmoRadius;
}
bool myObject::getAtmosphere()
{
return atmosphere;
}
double myObject::getMinSurfaceRadius()
{
return minSurfaceRadius;
}
double myObject::getMaxHillRadius()
{
return maxHillRadius;
}
double myObject::getSurfaceGravity()
{
return surfaceGravity;
}
double myObject::getGravityFalloff()
{
return gravityFalloff;
}
bool myObject::getSpawnFauna()
{
return spawnFauna;
}
bool myObject::getSpaunFlora()
{
return spaunFlora;
}
bool myObject::getShowGPS()
{
return showGPS;
}
string myObject::getPlanetGenerator()
{
return planetGenerator;
}
//Setters
void myObject::setName(string name)
{
myObject::Name = name;
}
void myObject::setFilename(string filename)
{
myObject::filename = filename;
}
void myObject::setMod(string modName)
{
myObject::Mod = modName;
}
void myObject::setParent(myObject* parent)
{
myObject::Parent = parent;
updateObject();
}
void myObject::setDistance(double distance)
{
myObject::distance = distance;
setPosition();
}
void myObject::setAzimuth(double azimuth)
{
myObject::azimuth = azimuth;
setPosition();
}
void myObject::setInclination(double inclination)
{
myObject::inclination = inclination;
setPosition();
}
void myObject::setAxialTilt(double axialTilt)
{
myObject::axialTilt = axialTilt;
}
void myObject::setHeading(Point3D Heading)
{
myObject::Heading = Heading;
}
void myObject::setPosition(Point3D position)
{
myObject::position = position;
}
void myObject::setGravity(double gravity)
{
myObject::gravity = gravity;
}
void myObject::setRadius(double radius)
{
myObject::radius = radius;
}
void myObject::setAtmoRadius(double atmoRadius)
{
myObject::atmoRadius = atmoRadius;
}
void myObject::setAtmosphere(bool atmosphere)
{
myObject::atmosphere = atmosphere;
}
void myObject::setMinSurfaceRadius(double minSurfaceRadius)
{
myObject::minSurfaceRadius = minSurfaceRadius;
}
void myObject::setMaxHillRadius(double maxHillRadius)
{
myObject::maxHillRadius = maxHillRadius;
}
void myObject::setSurfaceGravity(double surfaceGravity)
{
myObject::surfaceGravity = surfaceGravity;
}
void myObject::setGravityFalloff(double gravityFalloff)
{
myObject::gravityFalloff = gravityFalloff;
}
void myObject::setSpawnFauna(bool spawnFauna)
{
myObject::spawnFauna = spawnFauna;
}
void myObject::setSpaunFlora(bool spaunFlora)
{
myObject::spaunFlora = spaunFlora;
}
void myObject::setShowGPS(bool showGPS)
{
myObject::showGPS = showGPS;
}
void myObject::setPlanetGenerator(string planetGenerator)
{
myObject::planetGenerator = planetGenerator;
}