Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_x3donesidedmaterialnode.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 GetEmissiveColor: TCastleColorRGB;
28 procedure SetEmissiveColor(const Value: TCastleColorRGB);
29 function GetEmissiveTexture: TAbstractSingleTextureNode;
30 procedure SetEmissiveTexture(const Value: TAbstractSingleTextureNode);
31 function GetEmissiveTextureMapping: String;
32 procedure SetEmissiveTextureMapping(const Value: String);
33 function GetNormalTexture: TAbstractTexture2DNode;
34 procedure SetNormalTexture(const Value: TAbstractTexture2DNode);
35 function GetNormalTextureMapping: String;
36 procedure SetNormalTextureMapping(const Value: String);
37 function GetNormalScale: Single;
38 procedure SetNormalScale(const Value: Single);
39 public
40 { Create node fields and events. }
41 procedure CreateNode; override;
42 class function ClassX3DType: String; override;
43
44 strict private FFdEmissiveColor: TSFColor;
45 { Internal wrapper for property @code(EmissiveColor). This wrapper API may change, we advise to access simpler @code(EmissiveColor) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
46 public property FdEmissiveColor: TSFColor read FFdEmissiveColor;
47 { Emissive color, multiplied by the @link(EmissiveTexture), makes the shape brighter regardless of the surrounding lights. Usually used to make things glow. }
48 property EmissiveColor: TCastleColorRGB read GetEmissiveColor write SetEmissiveColor;
49
50 strict private FFdEmissiveTexture: TSFNode;
51 { Internal wrapper for property @code(EmissiveTexture). This wrapper API may change, we advise to access simpler @code(EmissiveTexture) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
52 public property FdEmissiveTexture: TSFNode read FFdEmissiveTexture;
53 { Emissive texture is multiplied by the @link(EmissiveColor). It allows the perceived emissive factor depend on a texture, and thus vary across the surface. }
54 property EmissiveTexture: TAbstractSingleTextureNode read GetEmissiveTexture write SetEmissiveTexture;
55
56 strict private FFdEmissiveTextureMapping: TSFString;
57 { Internal wrapper for property @code(EmissiveTextureMapping). This wrapper API may change, we advise to access simpler @code(EmissiveTextureMapping) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
58 public property FdEmissiveTextureMapping: TSFString read FFdEmissiveTextureMapping;
59 { Determines texture coordinates used by @link(EmissiveTexture). }
60 property EmissiveTextureMapping: String read GetEmissiveTextureMapping write SetEmissiveTextureMapping;
61
62 strict private FFdNormalTexture: TSFNode;
63 { Internal wrapper for property @code(NormalTexture). This wrapper API may change, we advise to access simpler @code(NormalTexture) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
64 public property FdNormalTexture: TSFNode read FFdNormalTexture;
65 { Normalmap texture to perform bump mapping. See https://castle-engine.io/bump_mapping . }
66 property NormalTexture: TAbstractTexture2DNode read GetNormalTexture write SetNormalTexture;
67
68 strict private FFdNormalTextureMapping: TSFString;
69 { Internal wrapper for property @code(NormalTextureMapping). This wrapper API may change, we advise to access simpler @code(NormalTextureMapping) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
70 public property FdNormalTextureMapping: TSFString read FFdNormalTextureMapping;
71 { Determines texture coordinates used by @link(NormalTexture). }
72 property NormalTextureMapping: String read GetNormalTextureMapping write SetNormalTextureMapping;
73
74 strict private FFdNormalScale: TSFFloat;
75 { Internal wrapper for property @code(NormalScale). This wrapper API may change, we advise to access simpler @code(NormalScale) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
76 public property FdNormalScale: TSFFloat read FFdNormalScale;
77 { Emphasize (when > 1) or deemphasize (< 1) the effect of @link(NormalTexture) on the model. }
78 property NormalScale: Single read GetNormalScale write SetNormalScale;
79
80 {$endif read_interface}
81
82 {$ifdef read_implementation}
83
84 { TAbstractOneSidedMaterialNode ----------------------------------------------- }
85
86 function TAbstractOneSidedMaterialNode.GetEmissiveColor: TCastleColorRGB;
87 begin
88 Result := FdEmissiveColor.Value;
89 end;
90
91 procedure TAbstractOneSidedMaterialNode.SetEmissiveColor(const Value: TCastleColorRGB);
92 begin
93 FdEmissiveColor.Send(Value);
94 end;
95
96 function TAbstractOneSidedMaterialNode.GetEmissiveTexture: TAbstractSingleTextureNode;
97 begin
98 if FdEmissiveTexture.Value is TAbstractSingleTextureNode then
99 Result := TAbstractSingleTextureNode(FdEmissiveTexture.Value)
100 else
101 Result := nil;
102 end;
103
104 procedure TAbstractOneSidedMaterialNode.SetEmissiveTexture(const Value: TAbstractSingleTextureNode);
105 begin
106 FdEmissiveTexture.Send(Value);
107 end;
108
109 function TAbstractOneSidedMaterialNode.GetEmissiveTextureMapping: String;
110 begin
111 Result := FdEmissiveTextureMapping.Value;
112 end;
113
114 procedure TAbstractOneSidedMaterialNode.SetEmissiveTextureMapping(const Value: String);
115 begin
116 FdEmissiveTextureMapping.Send(Value);
117 end;
118
119 function TAbstractOneSidedMaterialNode.GetNormalTexture: TAbstractTexture2DNode;
120 begin
121 if FdNormalTexture.Value is TAbstractTexture2DNode then
122 Result := TAbstractTexture2DNode(FdNormalTexture.Value)
123 else
124 Result := nil;
125 end;
126
127 procedure TAbstractOneSidedMaterialNode.SetNormalTexture(const Value: TAbstractTexture2DNode);
128 begin
129 FdNormalTexture.Send(Value);
130 end;
131
132 function TAbstractOneSidedMaterialNode.GetNormalTextureMapping: String;
133 begin
134 Result := FdNormalTextureMapping.Value;
135 end;
136
137 procedure TAbstractOneSidedMaterialNode.SetNormalTextureMapping(const Value: String);
138 begin
139 FdNormalTextureMapping.Send(Value);
140 end;
141
142 function TAbstractOneSidedMaterialNode.GetNormalScale: Single;
143 begin
144 Result := FdNormalScale.Value;
145 end;
146
147 procedure TAbstractOneSidedMaterialNode.SetNormalScale(const Value: Single);
148 begin
149 FdNormalScale.Send(Value);
150 end;
151
152 class function TAbstractOneSidedMaterialNode.ClassX3DType: String;
153 begin
154 Result := 'X3DOneSidedMaterialNode';
155 end;
156
157 procedure TAbstractOneSidedMaterialNode.CreateNode;
158 begin
159 inherited;
160
161 FFdEmissiveColor := TSFColor.Create(Self, True, 'emissiveColor', Vector3(0, 0, 0));
162 FdEmissiveColor.ChangeAlways := chVisibleNonGeometry;
163 AddField(FFdEmissiveColor);
164
165 FFdEmissiveTexture := TSFNode.Create(Self, True, 'emissiveTexture', [TAbstractSingleTextureNode]);
166 FdEmissiveTexture.ChangeAlways := chEverything;
167 AddField(FFdEmissiveTexture);
168
169 FFdEmissiveTextureMapping := TSFString.Create(Self, True, 'emissiveTextureMapping', '');
170 FdEmissiveTextureMapping.ChangeAlways := chVisibleNonGeometry;
171 AddField(FFdEmissiveTextureMapping);
172
173 FFdNormalTexture := TSFNode.Create(Self, True, 'normalTexture', [TAbstractTexture2DNode]);
174 FdNormalTexture.ChangeAlways := chEverything;
175 AddField(FFdNormalTexture);
176
177 FFdNormalTextureMapping := TSFString.Create(Self, True, 'normalTextureMapping', '');
178 FdNormalTextureMapping.ChangeAlways := chVisibleNonGeometry;
179 AddField(FFdNormalTextureMapping);
180
181 FFdNormalScale := TSFFloat.Create(Self, True, 'normalScale', 1);
182 FdNormalScale.ChangeAlways := chEverything;
183 FdNormalScale.MustBeNonnegative := true;
184 AddField(FFdNormalScale);
185
186 DefaultContainerField := 'material';
187 end;
188
189 {$endif read_implementation}