Oolite
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]
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 34 of file OOSingleTextureMaterial.h.

Method Documentation

◆ dealloc

- (void) dealloc
implementation

Reimplemented from OOBasicMaterial.

Definition at line 64 of file OOSingleTextureMaterial.m.

65{
66 [self willDealloc];
67 [_texture release];
68
69 [super dealloc];
70}

References OOBasicMaterial::dealloc, dealloc, and OOMaterial::willDealloc.

Referenced by dealloc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ descriptionComponents

- (NSString *) descriptionComponents
implementation

Reimplemented from OOMaterial.

Definition at line 72 of file OOSingleTextureMaterial.m.

73{
74 return [_texture description];
75}

References descriptionComponents.

Referenced by descriptionComponents.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ doApply

- (BOOL) doApply
implementation

Reimplemented from OOBasicMaterial.

Definition at line 77 of file OOSingleTextureMaterial.m.

78{
79 if (EXPECT_NOT(![super doApply]))
80 return NO;
81
82 [_texture apply];
83 return YES;
84}
#define EXPECT_NOT(x)

References OOTexture::apply, doApply, and EXPECT_NOT.

Referenced by doApply.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ensureFinishedLoading

- (void) ensureFinishedLoading
implementation

Reimplemented from OOMaterial.

Definition at line 93 of file OOSingleTextureMaterial.m.

94{
95 [_texture ensureFinishedLoading];
96}

References ensureFinishedLoading, and OOTexture::ensureFinishedLoading.

Referenced by ensureFinishedLoading.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initWithName:configuration:

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

Reimplemented from OOBasicMaterial.

Definition at line 35 of file OOSingleTextureMaterial.m.

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

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

Here is the call graph for this function:

◆ initWithName:texture:configuration:

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

Definition at line 50 of file OOSingleTextureMaterial.m.

50 :(NSString*)name texture:(OOTexture*)texture configuration:(NSDictionary*)configuration
51{
52 if (name != nil && texture != nil) {
53 self = [super initWithName:name configuration:configuration];
54 if (self != nil) {
55 _texture = [texture retain];
56 }
57 } else {
58 DESTROY(self);
59 }
60
61 return self;
62}
#define DESTROY(x)

References _texture, DESTROY, OOBasicMaterial::initWithName:configuration:, OOBasicMaterial::name, and nil.

Referenced by initWithName:configuration:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isFinishedLoading

- (BOOL) isFinishedLoading
implementation

Reimplemented from OOMaterial.

Definition at line 98 of file OOSingleTextureMaterial.m.

99{
100 return [_texture isFinishedLoading];
101}

References isFinishedLoading, and OOTexture::isFinishedLoading.

Referenced by isFinishedLoading.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unapplyWithNext:

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

Reimplemented from OOBasicMaterial.

Definition at line 86 of file OOSingleTextureMaterial.m.

86 :(OOMaterial*)next
87{
88 if (![next isKindOfClass:[OOSingleTextureMaterial class]])
90 [super unapplyWithNext:next];
91}
void applyNone()
Definition OOTexture.m:263

References OOTexture::applyNone, and OOBasicMaterial::unapplyWithNext:.

Here is the call graph for this function:

◆ wantsNormalsAsTextureCoordinates

- (BOOL) wantsNormalsAsTextureCoordinates
implementation

Reimplemented from OOMaterial.

Definition at line 103 of file OOSingleTextureMaterial.m.

104{
105 return [_texture isCubeMap];
106}

References OOTexture::isCubeMap, and wantsNormalsAsTextureCoordinates.

Referenced by wantsNormalsAsTextureCoordinates.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _texture

- (OOTexture*) _texture
private

Definition at line 36 of file OOSingleTextureMaterial.h.

Referenced by initWithName:texture:configuration:.


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