Oolite 1.91.0.7677-250528-09ed63a
All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Modules Pages
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 125 of file OOSingleTextureMaterial.m.

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

References allTextures.

Referenced by allTextures.

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

◆ dealloc

- (void) dealloc
implementation

Reimplemented from OOBasicMaterial.

Definition at line 75 of file OOSingleTextureMaterial.m.

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

References OOBasicMaterial::dealloc, dealloc, OOTexture::release, 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 84 of file OOSingleTextureMaterial.m.

85{
86 return [_texture description];
87}

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 90 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)

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 106 of file OOSingleTextureMaterial.m.

107{
108 [_texture ensureFinishedLoading];
109}

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 36 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
NSString * name()
Definition OOMaterial.m:59
id initWithName:texture:configuration:(NSString *name,[texture] OOTexture *texture,[configuration] NSDictionary *configuration)
id textureWithConfiguration:(id configuration)
Definition OOTexture.m:192

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 55 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

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

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 112 of file OOSingleTextureMaterial.m.

113{
114 return [_texture isFinishedLoading];
115}

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 99 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

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

Here is the call graph for this function:

◆ wantsNormalsAsTextureCoordinates

- (BOOL) wantsNormalsAsTextureCoordinates
implementation

Reimplemented from OOMaterial.

Definition at line 118 of file OOSingleTextureMaterial.m.

119{
120 return [_texture isCubeMap];
121}

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 38 of file OOSingleTextureMaterial.h.

Referenced by initWithName:texture:configuration:.


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