Oolite 1.91.0.7604-240417-a536cbe
Loading...
Searching...
No Matches
OOPlanetDrawable.h
Go to the documentation of this file.
1/*
2
3OOPlanetDrawable.h
4
5Draw a ball, such as might be used to represent 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 "OODrawable.h"
28#import "OOMaths.h"
29
30@class OOMaterial;
31
32
33@interface OOPlanetDrawable: OODrawable <NSCopying>
34{
35@private
38 float _radius;
39 OOMatrix _transform;
40 unsigned _lod;
42
43+ (instancetype) planetWithTextureName:(NSString *)textureName radius:(float)radius;
44+ (instancetype) atmosphereWithRadius:(float)radius;
45
46- (id) initAsAtmosphere;
47
48- (OOMaterial *) material;
49- (void) setMaterial:(OOMaterial *)material;
50
51- (NSString *) textureName;
52- (void) setTextureName:(NSString *)textureName;
53
54// Radius, in game metres.
55- (float) radius;
56- (void) setRadius:(float)radius;
57
58// Level of detail, [0..1]. Granularity is implementation-defined.
59- (float) levelOfDetail;
60- (void) setLevelOfDetail:(float)lod;
61- (void) calculateLevelOfDetailForViewDistance:(float)distance;
62
63// depth-buffer hack
64- (void) renderTranslucentPartsOnOpaquePass;
65
66@end
OOMaterial * _material