#include <OOBasicMaterial.h>
Definition at line 37 of file OOBasicMaterial.h.
◆ allTextures
◆ ambientColor
Definition at line 36 of file OOBasicMaterial.m.
183{
188}
OOColor * colorWithRed:green:blue:alpha:(float red,[green] float green,[blue] float blue,[alpha] float alpha)
◆ dealloc
◆ diffuseColor
◆ doApply
◆ emmisionColor
◆ getAmbientComponents:
| - (void) getAmbientComponents: |
|
(GLfloat[4]) |
outComponents |
|
Definition at line 36 of file OOBasicMaterial.m.
255 :(GLfloat[4])outComponents
256{
257 memcpy(outComponents,
ambient, 4 *
sizeof *outComponents);
258}
◆ getDiffuseComponents:
| - (void) getDiffuseComponents: |
|
(GLfloat[4]) |
outComponents |
|
Definition at line 36 of file OOBasicMaterial.m.
224 :(GLfloat[4])outComponents
225{
226 memcpy(outComponents,
diffuse, 4 *
sizeof *outComponents);
227}
◆ getEmissionComponents:
| - (void) getEmissionComponents: |
|
(GLfloat[4]) |
outComponents |
|
Definition at line 36 of file OOBasicMaterial.m.
267 :(GLfloat[4])outComponents
268{
269 memcpy(outComponents,
emission, 4 *
sizeof *outComponents);
270}
◆ getSpecularComponents:
| - (void) getSpecularComponents: |
|
(GLfloat[4]) |
outComponents |
|
Definition at line 36 of file OOBasicMaterial.m.
243 :(GLfloat[4])outComponents
244{
245 memcpy(outComponents,
specular, 4 *
sizeof *outComponents);
246}
◆ initWithName:
| - (id) initWithName: |
|
(NSString *) |
name |
|
Definition at line 36 of file OOBasicMaterial.m.
45{
46 self = [super init];
48
50
51 [self setDiffuseRed:1.0f green:1.0f blue:1.0f alpha:1.0f];
52 [self setAmbientRed:1.0f green:1.0f blue:1.0f alpha:1.0f];
55
56 return self;
57}
◆ initWithName:configuration:
| - (id) initWithName: |
|
(NSString *) |
name |
| configuration: |
|
(NSDictionary *) |
configuration |
|
|
| |
Reimplemented in OOSingleTextureMaterial.
Definition at line 36 of file OOBasicMaterial.m.
60 :(NSString *)
name configuration:(NSDictionary *)configuration
61{
63 int specularExponent;
64
65 self = [self initWithName:name];
67
68 if (configuration ==
nil) configuration = [NSDictionary dictionary];
69
70 colorDesc = [configuration oo_diffuseColor];
72
73 colorDesc = [configuration oo_ambientColor];
75 else [self setAmbientColor:[self diffuseColor]];
76
77 colorDesc = [configuration oo_emissionColor];
79
80 specularExponent = [configuration oo_specularExponent];
82 {
83 colorDesc = [configuration oo_specularColor];
84 [self setShininess:specularExponent];
86 }
87
88 return self;
89}
OOColor * colorWithDescription:(id description)
◆ name
◆ permitSpecular
Definition at line 36 of file OOBasicMaterial.m.
336{
337 return ![UNIVERSE reducedDetail];
338}
◆ setAmbientAndDiffuseColor:
| - (void) setAmbientAndDiffuseColor: |
|
(OOColor *) |
color |
|
Definition at line 36 of file OOBasicMaterial.m.
155{
156 [self setAmbientColor:color];
157 [self setDiffuseColor:color];
158}
◆ setAmbientAndDiffuseComponents:
| - (void) setAmbientAndDiffuseComponents: |
|
(const GLfloat[4]) |
components |
|
Definition at line 36 of file OOBasicMaterial.m.
236 :(const GLfloat[4])components
237{
238 [self setAmbientComponents:components];
239 [self setDiffuseComponents:components];
240}
◆ setAmbientAndDiffuseRed:green:blue:alpha:
| - (void) setAmbientAndDiffuseRed: |
|
(GLfloat) |
r |
| green: |
|
(GLfloat) |
g |
| blue: |
|
(GLfloat) |
b |
| alpha: |
|
(GLfloat) |
a |
|
|
| |
Definition at line 36 of file OOBasicMaterial.m.
288 :(GLfloat)r green:(GLfloat)g blue:(GLfloat)b alpha:(GLfloat)a
289{
290 [self setAmbientRed:r green:g blue:b alpha:a];
291 [self setDiffuseRed:r green:g blue:b alpha:a];
292}
◆ setAmbientColor:
| - (void) setAmbientColor: |
|
(OOColor *) |
color |
|
◆ setAmbientComponents:
| - (void) setAmbientComponents: |
|
(const GLfloat[4]) |
components |
|
Definition at line 36 of file OOBasicMaterial.m.
261 :(const GLfloat[4])components
262{
263 memcpy(
ambient, components, 4 *
sizeof *components);
264}
◆ setAmbientRed:green:blue:alpha:
| - (void) setAmbientRed: |
|
(GLfloat) |
r |
| green: |
|
(GLfloat) |
g |
| blue: |
|
(GLfloat) |
b |
| alpha: |
|
(GLfloat) |
a |
|
|
| |
Definition at line 36 of file OOBasicMaterial.m.
304 :(GLfloat)r green:(GLfloat)g blue:(GLfloat)b alpha:(GLfloat)a
305{
310}
◆ setDiffuseColor:
| - (void) setDiffuseColor: |
|
(OOColor *) |
color |
|
◆ setDiffuseComponents:
| - (void) setDiffuseComponents: |
|
(const GLfloat[4]) |
components |
|
Definition at line 36 of file OOBasicMaterial.m.
230 :(const GLfloat[4])components
231{
232 memcpy(
diffuse, components, 4 *
sizeof *components);
233}
◆ setDiffuseRed:green:blue:alpha:
| - (void) setDiffuseRed: |
|
(GLfloat) |
r |
| green: |
|
(GLfloat) |
g |
| blue: |
|
(GLfloat) |
b |
| alpha: |
|
(GLfloat) |
a |
|
|
| |
Definition at line 36 of file OOBasicMaterial.m.
279 :(GLfloat)r green:(GLfloat)g blue:(GLfloat)b alpha:(GLfloat)a
280{
285}
◆ setEmissionColor:
| - (void) setEmissionColor: |
|
(OOColor *) |
color |
|
◆ setEmissionComponents:
| - (void) setEmissionComponents: |
|
(const GLfloat[4]) |
components |
|
Definition at line 36 of file OOBasicMaterial.m.
273 :(const GLfloat[4])components
274{
275 memcpy(
emission, components, 4 *
sizeof *components);
276}
◆ setEmissionRed:green:blue:alpha:
| - (void) setEmissionRed: |
|
(GLfloat) |
r |
| green: |
|
(GLfloat) |
g |
| blue: |
|
(GLfloat) |
b |
| alpha: |
|
(GLfloat) |
a |
|
|
| |
Definition at line 36 of file OOBasicMaterial.m.
313 :(GLfloat)r green:(GLfloat)g blue:(GLfloat)b alpha:(GLfloat)a
314{
319}
◆ setShininess:
| - (void) setShininess: |
|
(uint8_t) |
value |
|
◆ setSpecularColor:
| - (void) setSpecularColor: |
|
(OOColor *) |
color |
|
◆ setSpecularComponents:
| - (void) setSpecularComponents: |
|
(const GLfloat[4]) |
components |
|
Definition at line 36 of file OOBasicMaterial.m.
249 :(const GLfloat[4])components
250{
251 memcpy(
specular, components, 4 *
sizeof *components);
252}
◆ setSpecularRed:green:blue:alpha:
| - (void) setSpecularRed: |
|
(GLfloat) |
r |
| green: |
|
(GLfloat) |
g |
| blue: |
|
(GLfloat) |
b |
| alpha: |
|
(GLfloat) |
a |
|
|
| |
Definition at line 36 of file OOBasicMaterial.m.
295 :(GLfloat)r green:(GLfloat)g blue:(GLfloat)b alpha:(GLfloat)a
296{
301}
◆ shininess
◆ specularColor
◆ unapplyWithNext:
◆ ambient
◆ diffuse
◆ emission
◆ materialName
| - (NSString*) materialName |
|
private |
◆ shininess
◆ specular
The documentation for this class was generated from the following files: