Oolite
Loading...
Searching...
No Matches
OOPlanetTextureGenerator.h
Go to the documentation of this file.
1/*
2
3OOPlanetTextureGenerator.h
4
5Generator for planet diffuse maps.
6
7
8Oolite
9Copyright (C) 2004-2013 Giles C Williams and contributors
10
11This program is free software; you can redistribute it and/or
12modify it under the terms of the GNU General Public License
13as published by the Free Software Foundation; either version 2
14of the License, or (at your option) any later version.
15
16This program is distributed in the hope that it will be useful,
17but WITHOUT ANY WARRANTY; without even the implied warranty of
18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19GNU General Public License for more details.
20
21You should have received a copy of the GNU General Public License
22along with this program; if not, write to the Free Software
23Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
24MA 02110-1301, USA.
25
26*/
27
28#import "OOMaths.h"
30
31@class OOPlanetNormalMapGenerator, OOPlanetAtmosphereGenerator;
32
35
36 unsigned width;
37 unsigned height;
38
39 // Planet parameters.
48
49 // Planet mixing coefficients.
50 float mix_hi;
51 float mix_oh;
52 float mix_ih;
54
55 // Atmosphere parameters.
61
62 // Noise generation stuff.
63 float* fbmBuffer;
64 float* qBuffer;
65
66 uint16_t* permutations;
67
72
74@private
76 unsigned _planetScale;
77
78 OOPlanetNormalMapGenerator* _nMapGenerator;
79 OOPlanetAtmosphereGenerator* _atmoGenerator;
80}
81
82- (id)initWithPlanetInfo:(NSDictionary*)planetInfo;
83
84+ (OOTexture*)planetTextureWithInfo:(NSDictionary*)planetInfo;
85+ (BOOL)generatePlanetTexture:(OOTexture**)texture andAtmosphere:(OOTexture**)atmosphere withInfo:(NSDictionary*)planetInfo;
86+ (BOOL)generatePlanetTexture:(OOTexture**)texture secondaryTexture:(OOTexture**)secondaryTexture withInfo:(NSDictionary*)planetInfo;
87+ (BOOL)generatePlanetTexture:(OOTexture**)texture secondaryTexture:(OOTexture**)secondaryTexture andAtmosphere:(OOTexture**)atmosphere withInfo:(NSDictionary*)planetInfo;
88
89@end
OOPlanetTextureGeneratorInfo _info
OOPlanetNormalMapGenerator * _nMapGenerator
OOPlanetAtmosphereGenerator * _atmoGenerator