Oolite
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@interface OOPlanetDrawable : OODrawable <NSCopying> {
33@private
36 float _radius;
38 unsigned _lod;
39}
40
41+ (instancetype)planetWithTextureName:(NSString*)textureName radius:(float)radius;
42+ (instancetype)atmosphereWithRadius:(float)radius;
43
45
47- (void)setMaterial:(OOMaterial*)material;
48
49- (NSString*)textureName;
50- (void)setTextureName:(NSString*)textureName;
51
52// Radius, in game metres.
53- (float)radius;
54- (void)setRadius:(float)radius;
55
56// Level of detail, [0..1]. Granularity is implementation-defined.
58- (void)setLevelOfDetail:(float)lod;
59- (void)calculateLevelOfDetailForViewDistance:(float)distance;
60
61// depth-buffer hack
63
64@end
NSString * textureName()
OOMaterial * _material
void renderTranslucentPartsOnOpaquePass()
OOMaterial * material()