72@implementation NSDictionary (OOMateralProperties)
77 NSObject *value = [
self objectForKey:kOOMaterialSpecularExponentName];
78 if (value ==
nil) value = [
self objectForKey:kOOMaterialSpecularExponentLegacyName];
79 return OOIntFromObject(value, -1);
88 if ([result isWhite]) result =
nil;
127 if ([result isBlack]) result =
nil;
136 if ([result isWhite]) result =
nil;
145 if ([result isWhite]) result =
nil;
150- (NSDictionary *) oo_diffuseMapSpecifierWithDefaultName:(NSString *)name
152 return [
self oo_textureSpecifierForKey:kOOMaterialDiffuseMapName defaultName:name];
159 return [
self oo_textureSpecifierForKey:kOOMaterialCombinedSpecularMapName defaultName:nil];
166 NSDictionary *result = [
self oo_textureSpecifierForKey:kOOMaterialSpecularColorMapName defaultName:nil];
167 if (result ==
nil) result = [
self oo_combinedSpecularMapSpecifier];
175 NSDictionary *result = [
self oo_textureSpecifierForKey:kOOMaterialSpecularExponentMapName defaultName:nil];
176 if (result ==
nil) result = [[
self oo_combinedSpecularMapSpecifier] dictionaryByAddingObject:@"a" forKey:@"extract_channel"];
184 return [
self oo_textureSpecifierForKey:kOOMaterialNormalMapName defaultName:nil];
190 id spec = [
self oo_textureSpecifierForKey:kOOMaterialParallaxMapName defaultName:nil];
194 spec = [[
self oo_normalAndParallaxMapSpecifier] dictionaryByAddingObject:@"a"
195 forKey:@"extract_channel"];
204 return [
self oo_textureSpecifierForKey:kOOMaterialNormalAndParallaxMapName defaultName:nil];
210 return [
self oo_textureSpecifierForKey:kOOMaterialEmissionMapName defaultName:nil];
216 return [
self oo_textureSpecifierForKey:kOOMaterialIlluminationMapName defaultName:nil];
223 return [
self oo_textureSpecifierForKey:kOOMaterialEmissionAndIlluminationMapName defaultName:nil];
229 return [
self oo_floatForKey:kOOMaterialParallaxScaleName defaultValue:kOOMaterialDefaultParallaxScale];
235 return [
self oo_floatForKey:kOOMaterialParallaxBiasName];
241 return [
self oo_boolForKey:kOOMaterialGammaCorrectName defaultValue:![[NSUserDefaults standardUserDefaults] boolForKey:@"no-gamma-correct"]];
253 int result = [
self oo_rawSpecularExponentValue];
NSString *const kOOMaterialGlossName
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
NSDictionary * oo_specularColorMapSpecifier()
NSDictionary * oo_illuminationMapSpecifier()
NSDictionary * oo_parallaxMapSpecifier()
OOColor * oo_specularModulateColor()
NSDictionary * oo_emissionMapSpecifier()
NSDictionary * oo_specularExponentMapSpecifier()
NSDictionary * oo_normalMapSpecifier()
int oo_rawSpecularExponentValue()
OOColor * oo_emissionModulateColor()
OOColor * oo_emissionColor()
OOColor * oo_specularColor()
OOColor * oo_illuminationModulateColor()
NSDictionary * oo_normalAndParallaxMapSpecifier()
int oo_specularExponent()
NSDictionary * oo_combinedSpecularMapSpecifier()
NSDictionary * oo_emissionAndIlluminationMapSpecifier()
OOColor * oo_ambientColor()
OOColor * oo_diffuseColor()
OOColor * colorWithWhite:alpha:(float white,[alpha] float alpha)
OOColor * colorWithDescription:(id description)
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque