Oolite
Loading...
Searching...
No Matches
OOPlanetEntity.h
Go to the documentation of this file.
1/*
2
3OOPlanetEntity.h
4
5Entity subclass representing a planet.
6
7Oolite
8Copyright (C) 2004-2013 Giles C Williams and contributors
9
10This program is free software; you can redistribute it and/or
11modify it under the terms of the GNU General Public License
12as published by the Free Software Foundation; either version 2
13of the License, or (at your option) any later version.
14
15This program is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18GNU General Public License for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
23MA 02110-1301, USA.
24
25*/
26
27#import "OOStellarBody.h"
28#if !NEW_PLANETS
29#import "PlanetEntity.h"
30#else
31
32#import "Entity.h"
33#import "OOColor.h"
34
35
37
38
40{
41@private
47 BOOL _miniature;
54 Vector _rotationAxis;
61 unsigned _shuttlesOnGround;
65 NSDictionary *_materialParameters;
66 NSString *_textureName;
69 NSString *_name;
71
72- (id) initAsMainPlanetForSystem:(OOSystemID)s;
73
74- (id) initFromDictionary:(NSDictionary *)dict withAtmosphere:(BOOL)atmosphere andSeed:(Random_Seed)seed forSystem:(OOSystemID)systemID;
75
76- (instancetype) miniatureVersion;
77
78- (double) rotationalVelocity;
79- (void) setRotationalVelocity:(double) v;
80
81- (BOOL) planetHasStation;
82- (void) launchShuttle;
83- (void) welcomeShuttle:(ShipEntity *)shuttle;
84
85- (BOOL) hasAtmosphere;
86
87// FIXME: need material model.
88- (NSString *) textureFileName;
89- (void) setTextureFileName:(NSString *)textureName;
90
91- (BOOL) setUpPlanetFromTexture:(NSString *)fileName;
92
93- (OOMaterial *) material;
94- (OOMaterial *) atmosphereMaterial;
95- (OOMaterial *) atmosphereShaderMaterial;
96
97- (BOOL) isFinishedLoading;
98
99- (Vector) airColorAsVector; // visible to shader bindings
100- (OOColor *) airColor;
101- (void) setAirColor:(OOColor *) newColor;
102- (Vector) illuminationColorAsVector; // visible to shader bindings
103- (OOColor *) illuminationColor;
104- (void) setIlluminationColor:(OOColor *) newColor;
105- (float) airColorMixRatio; // visible to shader bindings
106- (void) setAirColorMixRatio:(float) newRatio;
107- (float) airDensity; // visible to shafer bindings
108- (void) setAirDensity: (float) newDensity;
109
110- (void) setTerminatorThresholdVector:(Vector) newTerminatorThresholdVector;
111- (Vector) terminatorThresholdVector; // visible to shader bindings
112
113@end
114
115#endif // NEW_PLANETS
int16_t OOSystemID
Definition OOTypes.h:211
double OOTimeDelta
Definition OOTypes.h:224
NSDictionary * _materialParameters
Quaternion _atmosphereOrientation
OOColor * _illuminationColor
OOTimeDelta _shuttleLaunchInterval
OOPlanetDrawable * _cloudsShaderDrawable
Vector _terminatorThresholdVector
OOPlanetDrawable * _atmosphereDrawable
OOColor * _airColor
NSString * _normSpecMapName
NSString * _textureName
unsigned _shuttlesOnGround
float _atmosphereRotationalVelocity
OOPlanetDrawable * _planetDrawable
OOPlanetDrawable * _atmosphereShaderDrawable
OOTimeDelta _lastLaunchTime
float _rotationalVelocity
NSString * _name