Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_material.inc

raw
1 { -*- buffer-read-only: t -*-
2
3 Copyright 2015-2024 Michalis Kamburelis.
4
5 This file is part of "Castle Game Engine".
6
7 "Castle Game Engine" is free software; see the file COPYING.txt,
8 included in this distribution, for details about the copyright.
9
10 "Castle Game Engine" is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
14 ----------------------------------------------------------------------------
15 }
16
17 { Automatically generated node properties.
18
19 Do not edit this file manually!
20 To add new properties:
21 - add them to the text files in tools/internal/x3d-nodes-to-pascal/nodes-specification/ ,
22 - and regenerate include files by running x3d-nodes-to-pascal }
23
24 {$ifdef read_interface}
25
26 strict private
27 function GetAmbientIntensity: Single;
28 procedure SetAmbientIntensity(const Value: Single);
29 function GetAmbientTexture: TAbstractSingleTextureNode;
30 procedure SetAmbientTexture(const Value: TAbstractSingleTextureNode);
31 function GetAmbientTextureMapping: String;
32 procedure SetAmbientTextureMapping(const Value: String);
33 function GetDiffuseColor: TCastleColorRGB;
34 procedure SetDiffuseColor(const Value: TCastleColorRGB);
35 function GetDiffuseTexture: TAbstractSingleTextureNode;
36 procedure SetDiffuseTexture(const Value: TAbstractSingleTextureNode);
37 function GetDiffuseTextureMapping: String;
38 procedure SetDiffuseTextureMapping(const Value: String);
39 function GetOcclusionStrength: Single;
40 procedure SetOcclusionStrength(const Value: Single);
41 function GetOcclusionTexture: TAbstractSingleTextureNode;
42 procedure SetOcclusionTexture(const Value: TAbstractSingleTextureNode);
43 function GetOcclusionTextureMapping: String;
44 procedure SetOcclusionTextureMapping(const Value: String);
45 function GetShininess: Single;
46 procedure SetShininess(const Value: Single);
47 function GetShininessTexture: TAbstractSingleTextureNode;
48 procedure SetShininessTexture(const Value: TAbstractSingleTextureNode);
49 function GetShininessTextureMapping: String;
50 procedure SetShininessTextureMapping(const Value: String);
51 function GetSpecularColor: TCastleColorRGB;
52 procedure SetSpecularColor(const Value: TCastleColorRGB);
53 function GetSpecularTexture: TAbstractSingleTextureNode;
54 procedure SetSpecularTexture(const Value: TAbstractSingleTextureNode);
55 function GetSpecularTextureMapping: String;
56 procedure SetSpecularTextureMapping(const Value: String);
57 function GetTransparency: Single;
58 procedure SetTransparency(const Value: Single);
59 {$ifndef CASTLE_SLIM_NODES}
60 function GetFogImmune: Boolean;
61 procedure SetFogImmune(const Value: Boolean);
62 {$endif not CASTLE_SLIM_NODES}
63 function GetMirror: Single;
64 procedure SetMirror(const Value: Single);
65 {$ifndef CASTLE_SLIM_NODES}
66 function GetReflSpecularExp: Single;
67 procedure SetReflSpecularExp(const Value: Single);
68 {$endif not CASTLE_SLIM_NODES}
69 {$ifndef CASTLE_SLIM_NODES}
70 function GetTransSpecularExp: Single;
71 procedure SetTransSpecularExp(const Value: Single);
72 {$endif not CASTLE_SLIM_NODES}
73 public
74 { Create node fields and events. }
75 procedure CreateNode; override;
76 class function ClassX3DType: String; override;
77
78 strict private FFdAmbientIntensity: TSFFloat;
79 { Internal wrapper for property @code(AmbientIntensity). This wrapper API may change, we advise to access simpler @code(AmbientIntensity) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
80 public property FdAmbientIntensity: TSFFloat read FFdAmbientIntensity;
81 { }
82 property AmbientIntensity: Single read GetAmbientIntensity write SetAmbientIntensity;
83
84 strict private FFdAmbientTexture: TSFNode;
85 { Internal wrapper for property @code(AmbientTexture). This wrapper API may change, we advise to access simpler @code(AmbientTexture) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
86 public property FdAmbientTexture: TSFNode read FFdAmbientTexture;
87 { }
88 property AmbientTexture: TAbstractSingleTextureNode read GetAmbientTexture write SetAmbientTexture;
89
90 strict private FFdAmbientTextureMapping: TSFString;
91 { Internal wrapper for property @code(AmbientTextureMapping). This wrapper API may change, we advise to access simpler @code(AmbientTextureMapping) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
92 public property FdAmbientTextureMapping: TSFString read FFdAmbientTextureMapping;
93 { }
94 property AmbientTextureMapping: String read GetAmbientTextureMapping write SetAmbientTextureMapping;
95
96 strict private FFdDiffuseColor: TSFColor;
97 { Internal wrapper for property @code(DiffuseColor). This wrapper API may change, we advise to access simpler @code(DiffuseColor) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
98 public property FdDiffuseColor: TSFColor read FFdDiffuseColor;
99 { The primary way to control the color of object with Phong material. The object reflects light sources depending on the angle of the surface with respect to the light source. The more directly the surface faces the light, the more diffuse light reflects. }
100 property DiffuseColor: TCastleColorRGB read GetDiffuseColor write SetDiffuseColor;
101
102 strict private FFdDiffuseTexture: TSFNode;
103 { Internal wrapper for property @code(DiffuseTexture). This wrapper API may change, we advise to access simpler @code(DiffuseTexture) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
104 public property FdDiffuseTexture: TSFNode read FFdDiffuseTexture;
105 { The primary texture to control the color of object with Phong material. The RGB channel of this texture is multiplied with @link(DiffuseColor), and alpha channel is multiplied with the opacity (1-@link(Transparency)). }
106 property DiffuseTexture: TAbstractSingleTextureNode read GetDiffuseTexture write SetDiffuseTexture;
107
108 strict private FFdDiffuseTextureMapping: TSFString;
109 { Internal wrapper for property @code(DiffuseTextureMapping). This wrapper API may change, we advise to access simpler @code(DiffuseTextureMapping) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
110 public property FdDiffuseTextureMapping: TSFString read FFdDiffuseTextureMapping;
111 { }
112 property DiffuseTextureMapping: String read GetDiffuseTextureMapping write SetDiffuseTextureMapping;
113
114 strict private FFdOcclusionStrength: TSFFloat;
115 { Internal wrapper for property @code(OcclusionStrength). This wrapper API may change, we advise to access simpler @code(OcclusionStrength) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
116 public property FdOcclusionStrength: TSFFloat read FFdOcclusionStrength;
117 { }
118 property OcclusionStrength: Single read GetOcclusionStrength write SetOcclusionStrength;
119
120 strict private FFdOcclusionTexture: TSFNode;
121 { Internal wrapper for property @code(OcclusionTexture). This wrapper API may change, we advise to access simpler @code(OcclusionTexture) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
122 public property FdOcclusionTexture: TSFNode read FFdOcclusionTexture;
123 { }
124 property OcclusionTexture: TAbstractSingleTextureNode read GetOcclusionTexture write SetOcclusionTexture;
125
126 strict private FFdOcclusionTextureMapping: TSFString;
127 { Internal wrapper for property @code(OcclusionTextureMapping). This wrapper API may change, we advise to access simpler @code(OcclusionTextureMapping) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
128 public property FdOcclusionTextureMapping: TSFString read FFdOcclusionTextureMapping;
129 { }
130 property OcclusionTextureMapping: String read GetOcclusionTextureMapping write SetOcclusionTextureMapping;
131
132 strict private FFdShininess: TSFFloat;
133 { Internal wrapper for property @code(Shininess). This wrapper API may change, we advise to access simpler @code(Shininess) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
134 public property FdShininess: TSFFloat read FFdShininess;
135 { }
136 property Shininess: Single read GetShininess write SetShininess;
137
138 strict private FFdShininessTexture: TSFNode;
139 { Internal wrapper for property @code(ShininessTexture). This wrapper API may change, we advise to access simpler @code(ShininessTexture) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
140 public property FdShininessTexture: TSFNode read FFdShininessTexture;
141 { }
142 property ShininessTexture: TAbstractSingleTextureNode read GetShininessTexture write SetShininessTexture;
143
144 strict private FFdShininessTextureMapping: TSFString;
145 { Internal wrapper for property @code(ShininessTextureMapping). This wrapper API may change, we advise to access simpler @code(ShininessTextureMapping) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
146 public property FdShininessTextureMapping: TSFString read FFdShininessTextureMapping;
147 { }
148 property ShininessTextureMapping: String read GetShininessTextureMapping write SetShininessTextureMapping;
149
150 strict private FFdSpecularColor: TSFColor;
151 { Internal wrapper for property @code(SpecularColor). This wrapper API may change, we advise to access simpler @code(SpecularColor) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
152 public property FdSpecularColor: TSFColor read FFdSpecularColor;
153 { Color of specular highlight, on shiny objects. }
154 property SpecularColor: TCastleColorRGB read GetSpecularColor write SetSpecularColor;
155
156 strict private FFdSpecularTexture: TSFNode;
157 { Internal wrapper for property @code(SpecularTexture). This wrapper API may change, we advise to access simpler @code(SpecularTexture) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
158 public property FdSpecularTexture: TSFNode read FFdSpecularTexture;
159 { }
160 property SpecularTexture: TAbstractSingleTextureNode read GetSpecularTexture write SetSpecularTexture;
161
162 strict private FFdSpecularTextureMapping: TSFString;
163 { Internal wrapper for property @code(SpecularTextureMapping). This wrapper API may change, we advise to access simpler @code(SpecularTextureMapping) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
164 public property FdSpecularTextureMapping: TSFString read FFdSpecularTextureMapping;
165 { }
166 property SpecularTextureMapping: String read GetSpecularTextureMapping write SetSpecularTextureMapping;
167
168 strict private FFdTransparency: TSFFloat;
169 { Internal wrapper for property @code(Transparency). This wrapper API may change, we advise to access simpler @code(Transparency) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
170 public property FdTransparency: TSFFloat read FFdTransparency;
171 { Setting @name to value > 0 makes the object partially-transparent. Setting it to 1.0 makes it even invisible (but still collidable). If you want to render the object using blending (which is usually the case for partially-transparent) it is recommended to specify it explicitly using @link(TAppearanceNode.AlphaMode). }
172 property Transparency: Single read GetTransparency write SetTransparency;
173
174 {$ifndef CASTLE_SLIM_NODES}
175 strict private FFdFogImmune: TSFBool;
176 { Internal wrapper for property @code(FogImmune). This wrapper API may change, we advise to access simpler @code(FogImmune) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
177 public property FdFogImmune: TSFBool read FFdFogImmune;
178 {$endif not CASTLE_SLIM_NODES}
179 {$ifndef CASTLE_SLIM_NODES}
180 { }
181 property FogImmune: Boolean read GetFogImmune write SetFogImmune;
182 {$endif not CASTLE_SLIM_NODES}
183
184 strict private FFdMirror: TSFFloat;
185 { Internal wrapper for property @code(Mirror). This wrapper API may change, we advise to access simpler @code(Mirror) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
186 public property FdMirror: TSFFloat read FFdMirror;
187 { }
188 property Mirror: Single read GetMirror write SetMirror;
189
190 {$ifndef CASTLE_SLIM_NODES}
191 strict private FFdReflSpecular: TMFColor;
192 { Internal wrapper for property @code(ReflSpecular). This wrapper API may change, we advise to access simpler @code(ReflSpecular) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
193 public property FdReflSpecular: TMFColor read FFdReflSpecular;
194 {$endif not CASTLE_SLIM_NODES}
195 {$ifndef CASTLE_SLIM_NODES}
196 { }
197 procedure SetReflSpecular(const Value: array of TCastleColorRGB); overload;
198 {$endif not CASTLE_SLIM_NODES}
199 {$ifndef CASTLE_SLIM_NODES}
200 { }
201 procedure SetReflSpecular(const Value: TVector3List); overload;
202 {$endif not CASTLE_SLIM_NODES}
203
204 {$ifndef CASTLE_SLIM_NODES}
205 strict private FFdReflDiffuse: TMFColor;
206 { Internal wrapper for property @code(ReflDiffuse). This wrapper API may change, we advise to access simpler @code(ReflDiffuse) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
207 public property FdReflDiffuse: TMFColor read FFdReflDiffuse;
208 {$endif not CASTLE_SLIM_NODES}
209 {$ifndef CASTLE_SLIM_NODES}
210 { }
211 procedure SetReflDiffuse(const Value: array of TCastleColorRGB); overload;
212 {$endif not CASTLE_SLIM_NODES}
213 {$ifndef CASTLE_SLIM_NODES}
214 { }
215 procedure SetReflDiffuse(const Value: TVector3List); overload;
216 {$endif not CASTLE_SLIM_NODES}
217
218 {$ifndef CASTLE_SLIM_NODES}
219 strict private FFdTransSpecular: TMFColor;
220 { Internal wrapper for property @code(TransSpecular). This wrapper API may change, we advise to access simpler @code(TransSpecular) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
221 public property FdTransSpecular: TMFColor read FFdTransSpecular;
222 {$endif not CASTLE_SLIM_NODES}
223 {$ifndef CASTLE_SLIM_NODES}
224 { }
225 procedure SetTransSpecular(const Value: array of TCastleColorRGB); overload;
226 {$endif not CASTLE_SLIM_NODES}
227 {$ifndef CASTLE_SLIM_NODES}
228 { }
229 procedure SetTransSpecular(const Value: TVector3List); overload;
230 {$endif not CASTLE_SLIM_NODES}
231
232 {$ifndef CASTLE_SLIM_NODES}
233 strict private FFdTransDiffuse: TMFColor;
234 { Internal wrapper for property @code(TransDiffuse). This wrapper API may change, we advise to access simpler @code(TransDiffuse) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
235 public property FdTransDiffuse: TMFColor read FFdTransDiffuse;
236 {$endif not CASTLE_SLIM_NODES}
237 {$ifndef CASTLE_SLIM_NODES}
238 { }
239 procedure SetTransDiffuse(const Value: array of TCastleColorRGB); overload;
240 {$endif not CASTLE_SLIM_NODES}
241 {$ifndef CASTLE_SLIM_NODES}
242 { }
243 procedure SetTransDiffuse(const Value: TVector3List); overload;
244 {$endif not CASTLE_SLIM_NODES}
245
246 {$ifndef CASTLE_SLIM_NODES}
247 strict private FFdReflSpecularExp: TSFFloat;
248 { Internal wrapper for property @code(ReflSpecularExp). This wrapper API may change, we advise to access simpler @code(ReflSpecularExp) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
249 public property FdReflSpecularExp: TSFFloat read FFdReflSpecularExp;
250 {$endif not CASTLE_SLIM_NODES}
251 {$ifndef CASTLE_SLIM_NODES}
252 { }
253 property ReflSpecularExp: Single read GetReflSpecularExp write SetReflSpecularExp;
254 {$endif not CASTLE_SLIM_NODES}
255
256 {$ifndef CASTLE_SLIM_NODES}
257 strict private FFdTransSpecularExp: TSFFloat;
258 { Internal wrapper for property @code(TransSpecularExp). This wrapper API may change, we advise to access simpler @code(TransSpecularExp) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
259 public property FdTransSpecularExp: TSFFloat read FFdTransSpecularExp;
260 {$endif not CASTLE_SLIM_NODES}
261 {$ifndef CASTLE_SLIM_NODES}
262 { }
263 property TransSpecularExp: Single read GetTransSpecularExp write SetTransSpecularExp;
264 {$endif not CASTLE_SLIM_NODES}
265
266 {$endif read_interface}
267
268 {$ifdef read_implementation}
269
270 { TMaterialNode ----------------------------------------------- }
271
272 function TMaterialNode.GetAmbientIntensity: Single;
273 begin
274 Result := FdAmbientIntensity.Value;
275 end;
276
277 procedure TMaterialNode.SetAmbientIntensity(const Value: Single);
278 begin
279 FdAmbientIntensity.Send(Value);
280 end;
281
282 function TMaterialNode.GetAmbientTexture: TAbstractSingleTextureNode;
283 begin
284 if FdAmbientTexture.Value is TAbstractSingleTextureNode then
285 Result := TAbstractSingleTextureNode(FdAmbientTexture.Value)
286 else
287 Result := nil;
288 end;
289
290 procedure TMaterialNode.SetAmbientTexture(const Value: TAbstractSingleTextureNode);
291 begin
292 FdAmbientTexture.Send(Value);
293 end;
294
295 function TMaterialNode.GetAmbientTextureMapping: String;
296 begin
297 Result := FdAmbientTextureMapping.Value;
298 end;
299
300 procedure TMaterialNode.SetAmbientTextureMapping(const Value: String);
301 begin
302 FdAmbientTextureMapping.Send(Value);
303 end;
304
305 function TMaterialNode.GetDiffuseColor: TCastleColorRGB;
306 begin
307 Result := FdDiffuseColor.Value;
308 end;
309
310 procedure TMaterialNode.SetDiffuseColor(const Value: TCastleColorRGB);
311 begin
312 FdDiffuseColor.Send(Value);
313 end;
314
315 function TMaterialNode.GetDiffuseTexture: TAbstractSingleTextureNode;
316 begin
317 if FdDiffuseTexture.Value is TAbstractSingleTextureNode then
318 Result := TAbstractSingleTextureNode(FdDiffuseTexture.Value)
319 else
320 Result := nil;
321 end;
322
323 procedure TMaterialNode.SetDiffuseTexture(const Value: TAbstractSingleTextureNode);
324 begin
325 FdDiffuseTexture.Send(Value);
326 end;
327
328 function TMaterialNode.GetDiffuseTextureMapping: String;
329 begin
330 Result := FdDiffuseTextureMapping.Value;
331 end;
332
333 procedure TMaterialNode.SetDiffuseTextureMapping(const Value: String);
334 begin
335 FdDiffuseTextureMapping.Send(Value);
336 end;
337
338 function TMaterialNode.GetOcclusionStrength: Single;
339 begin
340 Result := FdOcclusionStrength.Value;
341 end;
342
343 procedure TMaterialNode.SetOcclusionStrength(const Value: Single);
344 begin
345 FdOcclusionStrength.Send(Value);
346 end;
347
348 function TMaterialNode.GetOcclusionTexture: TAbstractSingleTextureNode;
349 begin
350 if FdOcclusionTexture.Value is TAbstractSingleTextureNode then
351 Result := TAbstractSingleTextureNode(FdOcclusionTexture.Value)
352 else
353 Result := nil;
354 end;
355
356 procedure TMaterialNode.SetOcclusionTexture(const Value: TAbstractSingleTextureNode);
357 begin
358 FdOcclusionTexture.Send(Value);
359 end;
360
361 function TMaterialNode.GetOcclusionTextureMapping: String;
362 begin
363 Result := FdOcclusionTextureMapping.Value;
364 end;
365
366 procedure TMaterialNode.SetOcclusionTextureMapping(const Value: String);
367 begin
368 FdOcclusionTextureMapping.Send(Value);
369 end;
370
371 function TMaterialNode.GetShininess: Single;
372 begin
373 Result := FdShininess.Value;
374 end;
375
376 procedure TMaterialNode.SetShininess(const Value: Single);
377 begin
378 FdShininess.Send(Value);
379 end;
380
381 function TMaterialNode.GetShininessTexture: TAbstractSingleTextureNode;
382 begin
383 if FdShininessTexture.Value is TAbstractSingleTextureNode then
384 Result := TAbstractSingleTextureNode(FdShininessTexture.Value)
385 else
386 Result := nil;
387 end;
388
389 procedure TMaterialNode.SetShininessTexture(const Value: TAbstractSingleTextureNode);
390 begin
391 FdShininessTexture.Send(Value);
392 end;
393
394 function TMaterialNode.GetShininessTextureMapping: String;
395 begin
396 Result := FdShininessTextureMapping.Value;
397 end;
398
399 procedure TMaterialNode.SetShininessTextureMapping(const Value: String);
400 begin
401 FdShininessTextureMapping.Send(Value);
402 end;
403
404 function TMaterialNode.GetSpecularColor: TCastleColorRGB;
405 begin
406 Result := FdSpecularColor.Value;
407 end;
408
409 procedure TMaterialNode.SetSpecularColor(const Value: TCastleColorRGB);
410 begin
411 FdSpecularColor.Send(Value);
412 end;
413
414 function TMaterialNode.GetSpecularTexture: TAbstractSingleTextureNode;
415 begin
416 if FdSpecularTexture.Value is TAbstractSingleTextureNode then
417 Result := TAbstractSingleTextureNode(FdSpecularTexture.Value)
418 else
419 Result := nil;
420 end;
421
422 procedure TMaterialNode.SetSpecularTexture(const Value: TAbstractSingleTextureNode);
423 begin
424 FdSpecularTexture.Send(Value);
425 end;
426
427 function TMaterialNode.GetSpecularTextureMapping: String;
428 begin
429 Result := FdSpecularTextureMapping.Value;
430 end;
431
432 procedure TMaterialNode.SetSpecularTextureMapping(const Value: String);
433 begin
434 FdSpecularTextureMapping.Send(Value);
435 end;
436
437 function TMaterialNode.GetTransparency: Single;
438 begin
439 Result := FdTransparency.Value;
440 end;
441
442 procedure TMaterialNode.SetTransparency(const Value: Single);
443 begin
444 FdTransparency.Send(Value);
445 end;
446
447 {$ifndef CASTLE_SLIM_NODES}
448 function TMaterialNode.GetFogImmune: Boolean;
449 begin
450 Result := FdFogImmune.Value;
451 end;
452
453 procedure TMaterialNode.SetFogImmune(const Value: Boolean);
454 begin
455 FdFogImmune.Send(Value);
456 end;
457
458 {$endif not CASTLE_SLIM_NODES}
459 function TMaterialNode.GetMirror: Single;
460 begin
461 Result := FdMirror.Value;
462 end;
463
464 procedure TMaterialNode.SetMirror(const Value: Single);
465 begin
466 FdMirror.Send(Value);
467 end;
468
469 {$ifndef CASTLE_SLIM_NODES}
470 procedure TMaterialNode.SetReflSpecular(const Value: array of TCastleColorRGB);
471 begin
472 FdReflSpecular.Send(Value);
473 end;
474
475 {$endif not CASTLE_SLIM_NODES}
476 {$ifndef CASTLE_SLIM_NODES}
477 procedure TMaterialNode.SetReflSpecular(const Value: TVector3List);
478 begin
479 FdReflSpecular.Send(Value);
480 end;
481
482 {$endif not CASTLE_SLIM_NODES}
483 {$ifndef CASTLE_SLIM_NODES}
484 procedure TMaterialNode.SetReflDiffuse(const Value: array of TCastleColorRGB);
485 begin
486 FdReflDiffuse.Send(Value);
487 end;
488
489 {$endif not CASTLE_SLIM_NODES}
490 {$ifndef CASTLE_SLIM_NODES}
491 procedure TMaterialNode.SetReflDiffuse(const Value: TVector3List);
492 begin
493 FdReflDiffuse.Send(Value);
494 end;
495
496 {$endif not CASTLE_SLIM_NODES}
497 {$ifndef CASTLE_SLIM_NODES}
498 procedure TMaterialNode.SetTransSpecular(const Value: array of TCastleColorRGB);
499 begin
500 FdTransSpecular.Send(Value);
501 end;
502
503 {$endif not CASTLE_SLIM_NODES}
504 {$ifndef CASTLE_SLIM_NODES}
505 procedure TMaterialNode.SetTransSpecular(const Value: TVector3List);
506 begin
507 FdTransSpecular.Send(Value);
508 end;
509
510 {$endif not CASTLE_SLIM_NODES}
511 {$ifndef CASTLE_SLIM_NODES}
512 procedure TMaterialNode.SetTransDiffuse(const Value: array of TCastleColorRGB);
513 begin
514 FdTransDiffuse.Send(Value);
515 end;
516
517 {$endif not CASTLE_SLIM_NODES}
518 {$ifndef CASTLE_SLIM_NODES}
519 procedure TMaterialNode.SetTransDiffuse(const Value: TVector3List);
520 begin
521 FdTransDiffuse.Send(Value);
522 end;
523
524 {$endif not CASTLE_SLIM_NODES}
525 {$ifndef CASTLE_SLIM_NODES}
526 function TMaterialNode.GetReflSpecularExp: Single;
527 begin
528 Result := FdReflSpecularExp.Value;
529 end;
530
531 procedure TMaterialNode.SetReflSpecularExp(const Value: Single);
532 begin
533 FdReflSpecularExp.Send(Value);
534 end;
535
536 {$endif not CASTLE_SLIM_NODES}
537 {$ifndef CASTLE_SLIM_NODES}
538 function TMaterialNode.GetTransSpecularExp: Single;
539 begin
540 Result := FdTransSpecularExp.Value;
541 end;
542
543 procedure TMaterialNode.SetTransSpecularExp(const Value: Single);
544 begin
545 FdTransSpecularExp.Send(Value);
546 end;
547
548 {$endif not CASTLE_SLIM_NODES}
549 class function TMaterialNode.ClassX3DType: String;
550 begin
551 Result := 'Material';
552 end;
553
554 procedure TMaterialNode.CreateNode;
555 begin
556 inherited;
557
558 FFdAmbientIntensity := TSFFloat.Create(Self, True, 'ambientIntensity', 0.2);
559 FdAmbientIntensity.ChangeAlways := chVisibleNonGeometry;
560 FdAmbientIntensity.MustBeNonnegative := true;
561 AddField(FFdAmbientIntensity);
562
563 FFdAmbientTexture := TSFNode.Create(Self, True, 'ambientTexture', [TAbstractSingleTextureNode]);
564 FdAmbientTexture.ChangeAlways := chEverything;
565 AddField(FFdAmbientTexture);
566
567 FFdAmbientTextureMapping := TSFString.Create(Self, True, 'ambientTextureMapping', '');
568 FdAmbientTextureMapping.ChangeAlways := chVisibleNonGeometry;
569 AddField(FFdAmbientTextureMapping);
570
571 FFdDiffuseColor := TSFColor.Create(Self, True, 'diffuseColor', Vector3(0.8, 0.8, 0.8));
572 FdDiffuseColor.ChangeAlways := chVisibleNonGeometry;
573 AddField(FFdDiffuseColor);
574
575 FFdDiffuseTexture := TSFNode.Create(Self, True, 'diffuseTexture', [TAbstractSingleTextureNode]);
576 FdDiffuseTexture.ChangeAlways := chEverything;
577 AddField(FFdDiffuseTexture);
578
579 FFdDiffuseTextureMapping := TSFString.Create(Self, True, 'diffuseTextureMapping', '');
580 FdDiffuseTextureMapping.ChangeAlways := chVisibleNonGeometry;
581 AddField(FFdDiffuseTextureMapping);
582
583 FFdOcclusionStrength := TSFFloat.Create(Self, True, 'occlusionStrength', 1);
584 FdOcclusionStrength.ChangeAlways := chVisibleNonGeometry;
585 FdOcclusionStrength.MustBeNonnegative := true;
586 AddField(FFdOcclusionStrength);
587
588 FFdOcclusionTexture := TSFNode.Create(Self, True, 'occlusionTexture', [TAbstractSingleTextureNode]);
589 FdOcclusionTexture.ChangeAlways := chEverything;
590 AddField(FFdOcclusionTexture);
591
592 FFdOcclusionTextureMapping := TSFString.Create(Self, True, 'occlusionTextureMapping', '');
593 FdOcclusionTextureMapping.ChangeAlways := chVisibleNonGeometry;
594 AddField(FFdOcclusionTextureMapping);
595
596 FFdShininess := TSFFloat.Create(Self, True, 'shininess', 0.2);
597 FdShininess.ChangeAlways := chVisibleNonGeometry;
598 FdShininess.MustBeNonnegative := true;
599 AddField(FFdShininess);
600
601 FFdShininessTexture := TSFNode.Create(Self, True, 'shininessTexture', [TAbstractSingleTextureNode]);
602 FdShininessTexture.ChangeAlways := chEverything;
603 AddField(FFdShininessTexture);
604
605 FFdShininessTextureMapping := TSFString.Create(Self, True, 'shininessTextureMapping', '');
606 FdShininessTextureMapping.ChangeAlways := chVisibleNonGeometry;
607 AddField(FFdShininessTextureMapping);
608
609 FFdSpecularColor := TSFColor.Create(Self, True, 'specularColor', Vector3(0, 0, 0));
610 FdSpecularColor.ChangeAlways := chVisibleNonGeometry;
611 AddField(FFdSpecularColor);
612
613 FFdSpecularTexture := TSFNode.Create(Self, True, 'specularTexture', [TAbstractSingleTextureNode]);
614 FdSpecularTexture.ChangeAlways := chEverything;
615 AddField(FFdSpecularTexture);
616
617 FFdSpecularTextureMapping := TSFString.Create(Self, True, 'specularTextureMapping', '');
618 FdSpecularTextureMapping.ChangeAlways := chVisibleNonGeometry;
619 AddField(FFdSpecularTextureMapping);
620
621 FFdTransparency := TSFFloat.Create(Self, True, 'transparency', 0);
622 FdTransparency.ChangeAlways := chVisibleNonGeometry;
623 FdTransparency.MustBeNonnegative := true;
624 AddField(FFdTransparency);
625
626 {$ifndef CASTLE_SLIM_NODES}
627 FFdFogImmune := TSFBool.Create(Self, True, 'fogImmune', false);
628 FdFogImmune.ChangeAlways := chVisibleNonGeometry;
629 AddField(FFdFogImmune);
630 {$endif not CASTLE_SLIM_NODES}
631
632 FFdMirror := TSFFloat.Create(Self, True, 'mirror', 0.0);
633 FdMirror.ChangeAlways := chVisibleNonGeometry;
634 AddField(FFdMirror);
635
636 {$ifndef CASTLE_SLIM_NODES}
637 FFdReflSpecular := TMFColor.Create(Self, True, 'reflSpecular', []);
638 FdReflSpecular.ChangeAlways := chVisibleNonGeometry;
639 AddField(FFdReflSpecular);
640 {$endif not CASTLE_SLIM_NODES}
641
642 {$ifndef CASTLE_SLIM_NODES}
643 FFdReflDiffuse := TMFColor.Create(Self, True, 'reflDiffuse', []);
644 FdReflDiffuse.ChangeAlways := chVisibleNonGeometry;
645 AddField(FFdReflDiffuse);
646 {$endif not CASTLE_SLIM_NODES}
647
648 {$ifndef CASTLE_SLIM_NODES}
649 FFdTransSpecular := TMFColor.Create(Self, True, 'transSpecular', []);
650 FdTransSpecular.ChangeAlways := chVisibleNonGeometry;
651 AddField(FFdTransSpecular);
652 {$endif not CASTLE_SLIM_NODES}
653
654 {$ifndef CASTLE_SLIM_NODES}
655 FFdTransDiffuse := TMFColor.Create(Self, True, 'transDiffuse', []);
656 FdTransDiffuse.ChangeAlways := chVisibleNonGeometry;
657 AddField(FFdTransDiffuse);
658 {$endif not CASTLE_SLIM_NODES}
659
660 {$ifndef CASTLE_SLIM_NODES}
661 FFdReflSpecularExp := TSFFloat.Create(Self, True, 'reflSpecularExp', 1000000);
662 FdReflSpecularExp.ChangeAlways := chVisibleNonGeometry;
663 AddField(FFdReflSpecularExp);
664 {$endif not CASTLE_SLIM_NODES}
665
666 {$ifndef CASTLE_SLIM_NODES}
667 FFdTransSpecularExp := TSFFloat.Create(Self, True, 'transSpecularExp', 1000000);
668 FdTransSpecularExp.ChangeAlways := chVisibleNonGeometry;
669 AddField(FFdTransSpecularExp);
670 {$endif not CASTLE_SLIM_NODES}
671
672 DefaultContainerField := 'material';
673 end;
674
675 {$endif read_implementation}