Oolite 1.91.0.7645-241119-222d325
Loading...
Searching...
No Matches
OOMaterialSpecifier.h
Go to the documentation of this file.
1/*
2
3OOMaterialSpecifier.h
4
5Key declarations and convenience methods for material specifiers.
6
7
8Copyright (C) 2010-2013 Jens Ayton
9
10Permission is hereby granted, free of charge, to any person obtaining a copy
11of this software and associated documentation files (the "Software"), to deal
12in the Software without restriction, including without limitation the rights
13to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14copies of the Software, and to permit persons to whom the Software is
15furnished to do so, subject to the following conditions:
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26SOFTWARE.
27
28*/
29
30#import "OOCocoa.h"
31
32@class OOColor;
33
34
35// Convenience methods to extract properties from material dictionaries.
36@interface NSDictionary (OOMateralProperties)
37
45
46- (NSDictionary *) oo_diffuseMapSpecifierWithDefaultName:(NSString *)name;
47- (NSDictionary *) oo_combinedSpecularMapSpecifier;
48- (NSDictionary *) oo_specularColorMapSpecifier;
49- (NSDictionary *) oo_specularExponentMapSpecifier;
50- (NSDictionary *) oo_normalMapSpecifier;
51- (NSDictionary *) oo_parallaxMapSpecifier;
52- (NSDictionary *) oo_normalAndParallaxMapSpecifier;
53- (NSDictionary *) oo_emissionMapSpecifier;
54- (NSDictionary *) oo_illuminationMapSpecifier;
56
57- (float) oo_parallaxScale;
58- (float) oo_parallaxBias;
59
60- (BOOL) oo_gammaCorrect;
61
62- (float) oo_gloss;
63
65
66@end
67
68
69extern NSString * const kOOMaterialDiffuseColorName;
70extern NSString * const kOOMaterialDiffuseColorLegacyName;
71extern NSString * const kOOMaterialAmbientColorName;
72extern NSString * const kOOMaterialAmbientColorLegacyName;
73extern NSString * const kOOMaterialSpecularColorName;
74extern NSString * const kOOMaterialSpecularColorLegacyName;
75extern NSString * const kOOMaterialSpecularModulateColorName;
76extern NSString * const kOOMaterialEmissionColorName;
77extern NSString * const kOOMaterialEmissionColorLegacyName;
78extern NSString * const kOOMaterialEmissionModulateColorName;
79extern NSString * const kOOMaterialIlluminationModulateColorName;
80
81extern NSString * const kOOMaterialDiffuseMapName;
82extern NSString * const kOOMaterialSpecularColorMapName;
83extern NSString * const kOOMaterialSpecularExponentMapName;
84extern NSString * const kOOMaterialCombinedSpecularMapName;
85extern NSString * const kOOMaterialNormalMapName;
86extern NSString * const kOOMaterialParallaxMapName;
87extern NSString * const kOOMaterialNormalAndParallaxMapName;
88extern NSString * const kOOMaterialEmissionMapName;
89extern NSString * const kOOMaterialIlluminationMapName;
90extern NSString * const kOOMaterialEmissionAndIlluminationMapName;
91
92extern NSString * const kOOMaterialParallaxScaleName;
93extern NSString * const kOOMaterialParallaxBiasName;
94
95extern NSString * const kOOMaterialGammaCorrectName;
96
97extern NSString * const kOOMaterialGlossName;
98
99extern NSString * const kOOMaterialSpecularExponentName;
100extern NSString * const kOOMaterialSpecularExponentLegacyName;
101
102extern NSString * const kOOMaterialLightMapsName;
103
104#define kOOMaterialDefaultParallaxScale (0.01f)
NSString *const kOOMaterialNormalAndParallaxMapName
NSString *const kOOMaterialSpecularColorLegacyName
NSString *const kOOMaterialDiffuseColorName
NSString *const kOOMaterialEmissionMapName
NSString *const kOOMaterialEmissionAndIlluminationMapName
NSString *const kOOMaterialEmissionColorName
NSString *const kOOMaterialNormalMapName
NSString *const kOOMaterialParallaxScaleName
NSString *const kOOMaterialDiffuseMapName
NSString *const kOOMaterialEmissionModulateColorName
NSString *const kOOMaterialIlluminationModulateColorName
NSString *const kOOMaterialDiffuseColorLegacyName
NSString *const kOOMaterialGammaCorrectName
NSString *const kOOMaterialSpecularColorName
NSString *const kOOMaterialAmbientColorName
NSString *const kOOMaterialParallaxBiasName
NSString *const kOOMaterialLightMapsName
NSString *const kOOMaterialGlossName
NSString *const kOOMaterialEmissionColorLegacyName
NSString *const kOOMaterialIlluminationMapName
NSString *const kOOMaterialAmbientColorLegacyName
NSString *const kOOMaterialSpecularColorMapName
NSString *const kOOMaterialParallaxMapName
NSString *const kOOMaterialSpecularExponentLegacyName
NSString *const kOOMaterialSpecularModulateColorName
NSString *const kOOMaterialSpecularExponentName
NSString *const kOOMaterialCombinedSpecularMapName
NSString *const kOOMaterialSpecularExponentMapName
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque