Oolite 1.91.0.7644-241112-7f5034b
Loading...
Searching...
No Matches
OOSingleTextureMaterial Class Reference

#include <OOSingleTextureMaterial.h>

+ Inheritance diagram for OOSingleTextureMaterial:
+ Collaboration diagram for OOSingleTextureMaterial:

Instance Methods

(id) - initWithName:configuration:
 
(id) - initWithName:texture:configuration:
 
(void) - dealloc [implementation]
 
(NSString *) - descriptionComponents [implementation]
 
(BOOL) - doApply [implementation]
 
(void) - unapplyWithNext: [implementation]
 
(void) - ensureFinishedLoading [implementation]
 
(BOOL) - isFinishedLoading [implementation]
 
(BOOL) - wantsNormalsAsTextureCoordinates [implementation]
 
(NSSet *) - allTextures [implementation]
 
- Instance Methods inherited from OOBasicMaterial
(id) - initWithName:
 
(OOColor *) - diffuseColor
 
(void) - setDiffuseColor:
 
(void) - setAmbientAndDiffuseColor:
 
(OOColor *) - specularColor
 
(void) - setSpecularColor:
 
(OOColor *) - ambientColor
 
(void) - setAmbientColor:
 
(OOColor *) - emmisionColor
 
(void) - setEmissionColor:
 
(void) - getDiffuseComponents:
 
(void) - setDiffuseComponents:
 
(void) - setAmbientAndDiffuseComponents:
 
(void) - getSpecularComponents:
 
(void) - setSpecularComponents:
 
(void) - getAmbientComponents:
 
(void) - setAmbientComponents:
 
(void) - getEmissionComponents:
 
(void) - setEmissionComponents:
 
(void) - setDiffuseRed:green:blue:alpha:
 
(void) - setAmbientAndDiffuseRed:green:blue:alpha:
 
(void) - setSpecularRed:green:blue:alpha:
 
(void) - setAmbientRed:green:blue:alpha:
 
(void) - setEmissionRed:green:blue:alpha:
 
(uint8_t) - shininess
 
(void) - setShininess:
 
(BOOL) - permitSpecular
 
(NSString *) - name [implementation]
 
- Instance Methods inherited from OOMaterial
(void) - apply
 
(void) - setBindingTarget:
 
(void) - willDealloc
 

Private Attributes

OOTexture_texture
 

Additional Inherited Members

- Class Methods inherited from OOMaterial
(void) + setUp
 
(void) + applyNone
 
(OOMaterial *) + current
 
(OOMaterial *) + materialWithName:cacheKey:configuration:macros:bindingTarget:forSmoothedMesh:
 
(OOMaterial *) + materialWithName:cacheKey:materialDictionary:shadersDictionary:macros:bindingTarget:forSmoothedMesh:
 
(NSDictionary *) + synthesizeMaterialDictionaryWithName:configuration:macros: [implementation]
 
(OOMaterial *) + defaultShaderMaterialWithName:cacheKey:configuration:macros:bindingTarget: [implementation]
 

Detailed Description

Definition at line 35 of file OOSingleTextureMaterial.h.

Method Documentation

◆ allTextures

- (NSSet *) allTextures
implementation

Reimplemented from OOBasicMaterial.

Definition at line 1 of file OOSingleTextureMaterial.m.

126{
127 return [NSSet setWithObject:_texture];
128}

References initWithName:texture:configuration:, OOBasicMaterial::name, nil, and OOTexture::textureWithConfiguration:.

+ Here is the call graph for this function:

◆ dealloc

- (void) dealloc
implementation

Reimplemented from OOBasicMaterial.

Definition at line 1 of file OOSingleTextureMaterial.m.

76{
77 [self willDealloc];
78 [_texture release];
79
80 [super dealloc];
81}

◆ descriptionComponents

- (NSString *) descriptionComponents
implementation

Reimplemented from OOMaterial.

Definition at line 1 of file OOSingleTextureMaterial.m.

85{
86 return [_texture description];
87}

◆ doApply

- (BOOL) doApply
implementation

Reimplemented from OOBasicMaterial.

Definition at line 1 of file OOSingleTextureMaterial.m.

91{
92 if (EXPECT_NOT(![super doApply])) return NO;
93
94 [_texture apply];
95 return YES;
96}
#define EXPECT_NOT(x)

◆ ensureFinishedLoading

- (void) ensureFinishedLoading
implementation

Reimplemented from OOMaterial.

Definition at line 1 of file OOSingleTextureMaterial.m.

107{
108 [_texture ensureFinishedLoading];
109}

◆ initWithName:configuration:

- (id) initWithName: (NSString *) name
configuration: (NSDictionary *) configuration 

Reimplemented from OOBasicMaterial.

Definition at line 1 of file OOSingleTextureMaterial.m.

36 :(NSString *)name configuration:(NSDictionary *)configuration
37{
38 id texSpec = nil;
39
40 if (configuration != nil)
41 {
42 texSpec = [configuration oo_textureSpecifierForKey:@"diffuse_map" defaultName:name];
43 }
44 else
45 {
46 texSpec = name;
47 }
48
49 return [self initWithName:name
50 texture:[OOTexture textureWithConfiguration:texSpec]
51 configuration:configuration];
52}
return nil
id initWithName:texture:configuration:(NSString *name,[texture] OOTexture *texture,[configuration] NSDictionary *configuration)
id textureWithConfiguration:(id configuration)
Definition OOTexture.m:192

◆ initWithName:texture:configuration:

- (id) initWithName: (NSString *) name
texture: (OOTexture *) texture
configuration: (NSDictionary *) configuration 

Definition at line 1 of file OOSingleTextureMaterial.m.

55 :(NSString *)name texture:(OOTexture *)texture configuration:(NSDictionary *)configuration
56{
57 if (name != nil && texture != nil)
58 {
59 self = [super initWithName:name configuration:configuration];
60 if (self != nil)
61 {
62 _texture = [texture retain];
63 }
64 }
65 else
66 {
67 DESTROY(self);
68 }
69
70
71 return self;
72}
#define DESTROY(x)
Definition OOCocoa.h:77

Referenced by allTextures.

+ Here is the caller graph for this function:

◆ isFinishedLoading

- (BOOL) isFinishedLoading
implementation

Reimplemented from OOMaterial.

Definition at line 1 of file OOSingleTextureMaterial.m.

113{
114 return [_texture isFinishedLoading];
115}

◆ unapplyWithNext:

- (void) unapplyWithNext: (OOMaterial *) next
implementation

Reimplemented from OOBasicMaterial.

Definition at line 1 of file OOSingleTextureMaterial.m.

99 :(OOMaterial *)next
100{
101 if (![next isKindOfClass:[OOSingleTextureMaterial class]]) [OOTexture applyNone];
102 [super unapplyWithNext:next];
103}
void applyNone()
Definition OOTexture.m:275

◆ wantsNormalsAsTextureCoordinates

- (BOOL) wantsNormalsAsTextureCoordinates
implementation

Reimplemented from OOMaterial.

Definition at line 1 of file OOSingleTextureMaterial.m.

119{
120 return [_texture isCubeMap];
121}

Member Data Documentation

◆ _texture

- (OOTexture*) _texture
private

Definition at line 38 of file OOSingleTextureMaterial.h.


The documentation for this class was generated from the following files: