Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_x3dsingletexturenode.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 GetDescription: String;
28 procedure SetDescription(const Value: String);
29 {$ifndef CASTLE_SLIM_NODES}
30 function GetCrossOrigin: String;
31 procedure SetCrossOrigin(const Value: String);
32 {$endif not CASTLE_SLIM_NODES}
33 function GetAlphaChannel: TAutoAlphaChannel;
34 procedure SetAlphaChannel(const Value: TAutoAlphaChannel);
35 public
36 { Create node fields and events. }
37 procedure CreateNode; override;
38 class function ClassX3DType: String; override;
39
40 strict private FFdDescription: TSFString;
41 { Internal wrapper for property @code(Description). This wrapper API may change, we advise to access simpler @code(Description) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
42 public property FdDescription: TSFString read FFdDescription;
43 { }
44 property Description: String read GetDescription write SetDescription;
45
46 strict private FFdEffects: TMFNode;
47 { Internal wrapper for property @code(Effects). This wrapper API may change, we advise to access simpler @code(Effects) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
48 public property FdEffects: TMFNode read FFdEffects;
49 { }
50 procedure SetEffects(const Value: array of TEffectNode);
51
52 {$ifndef CASTLE_SLIM_NODES}
53 strict private FFdCrossOrigin: TSFString;
54 { Internal wrapper for property @code(CrossOrigin). This wrapper API may change, we advise to access simpler @code(CrossOrigin) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
55 public property FdCrossOrigin: TSFString read FFdCrossOrigin;
56 {$endif not CASTLE_SLIM_NODES}
57 {$ifndef CASTLE_SLIM_NODES}
58 { X3DOM extension, not implemented in CGE. }
59 property CrossOrigin: String read GetCrossOrigin write SetCrossOrigin;
60 {$endif not CASTLE_SLIM_NODES}
61
62 strict private FFdAlphaChannel: TSFStringEnum;
63 { Internal wrapper for property @code(AlphaChannel). This wrapper API may change, we advise to access simpler @code(AlphaChannel) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
64 public property FdAlphaChannel: TSFStringEnum read FFdAlphaChannel;
65 { }
66 property AlphaChannel: TAutoAlphaChannel read GetAlphaChannel write SetAlphaChannel;
67
68 {$endif read_interface}
69
70 {$ifdef read_implementation}
71
72 { TAbstractSingleTextureNode ----------------------------------------------- }
73
74 function TAbstractSingleTextureNode.GetDescription: String;
75 begin
76 Result := FdDescription.Value;
77 end;
78
79 procedure TAbstractSingleTextureNode.SetDescription(const Value: String);
80 begin
81 FdDescription.Send(Value);
82 end;
83
84 procedure TAbstractSingleTextureNode.SetEffects(const Value: array of TEffectNode);
85 var
86 L: Integer;
87 A: array of TX3DNode;
88 begin
89 L := High(Value) + 1;
90 SetLength(A, L);
91 if L > 0 then
92 Move(Value[0], A[0], L * SizeOf(TEffectNode));
93 FdEffects.Send(A);
94 end;
95
96 {$ifndef CASTLE_SLIM_NODES}
97 function TAbstractSingleTextureNode.GetCrossOrigin: String;
98 begin
99 Result := FdCrossOrigin.Value;
100 end;
101
102 procedure TAbstractSingleTextureNode.SetCrossOrigin(const Value: String);
103 begin
104 FdCrossOrigin.Send(Value);
105 end;
106
107 {$endif not CASTLE_SLIM_NODES}
108 function TAbstractSingleTextureNode.GetAlphaChannel: TAutoAlphaChannel;
109 begin
110 Result := TAutoAlphaChannel(FdAlphaChannel.EnumValue);
111 end;
112
113 procedure TAbstractSingleTextureNode.SetAlphaChannel(const Value: TAutoAlphaChannel);
114 begin
115 FdAlphaChannel.SendEnumValue(Ord(Value));
116 end;
117
118 class function TAbstractSingleTextureNode.ClassX3DType: String;
119 begin
120 Result := 'X3DSingleTextureNode';
121 end;
122
123 procedure TAbstractSingleTextureNode.CreateNode;
124 begin
125 inherited;
126
127 FFdDescription := TSFString.Create(Self, True, 'description', '');
128 FdDescription.ChangeAlways := chNone;
129 AddField(FFdDescription);
130
131 FFdEffects := TMFNode.Create(Self, False, 'effects', [TEffectNode]);
132 FdEffects.ChangeAlways := chEverything;
133 AddField(FFdEffects);
134
135 {$ifndef CASTLE_SLIM_NODES}
136 FFdCrossOrigin := TSFString.Create(Self, False, 'crossOrigin', '');
137 FdCrossOrigin.ChangeAlways := chNone;
138 AddField(FFdCrossOrigin);
139 {$endif not CASTLE_SLIM_NODES}
140
141 FFdAlphaChannel := TSFStringEnum.Create(Self, False, 'alphaChannel', @AlphaToString, Ord(High(AlphaToString)) + 1, Ord(acAuto));
142 FdAlphaChannel.ChangeAlways := chVisibleVRML1State;
143 AddField(FFdAlphaChannel);
144 end;
145
146 {$endif read_implementation}