Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_blendmode.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 GetSrcFactor: TBlendingSourceFactor;
28 procedure SetSrcFactor(const Value: TBlendingSourceFactor);
29 function GetDestFactor: TBlendingDestinationFactor;
30 procedure SetDestFactor(const Value: TBlendingDestinationFactor);
31 function GetColor: TCastleColorRGB;
32 procedure SetColor(const Value: TCastleColorRGB);
33 function GetColorTransparency: Single;
34 procedure SetColorTransparency(const Value: Single);
35 public
36 { Create node fields and events. }
37 procedure CreateNode; override;
38 class function ClassX3DType: String; override;
39
40 strict private FFdSrcFactor: TSFStringEnum;
41 { Internal wrapper for property @code(SrcFactor). This wrapper API may change, we advise to access simpler @code(SrcFactor) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
42 public property FdSrcFactor: TSFStringEnum read FFdSrcFactor;
43 { }
44 property SrcFactor: TBlendingSourceFactor read GetSrcFactor write SetSrcFactor;
45
46 strict private FFdDestFactor: TSFStringEnum;
47 { Internal wrapper for property @code(DestFactor). This wrapper API may change, we advise to access simpler @code(DestFactor) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
48 public property FdDestFactor: TSFStringEnum read FFdDestFactor;
49 { }
50 property DestFactor: TBlendingDestinationFactor read GetDestFactor write SetDestFactor;
51
52 strict private FFdColor: TSFColor;
53 { Internal wrapper for property @code(Color). This wrapper API may change, we advise to access simpler @code(Color) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
54 public property FdColor: TSFColor read FFdColor;
55 { }
56 property Color: TCastleColorRGB read GetColor write SetColor;
57
58 strict private FFdColorTransparency: TSFFloat;
59 { Internal wrapper for property @code(ColorTransparency). This wrapper API may change, we advise to access simpler @code(ColorTransparency) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
60 public property FdColorTransparency: TSFFloat read FFdColorTransparency;
61 { }
62 property ColorTransparency: Single read GetColorTransparency write SetColorTransparency;
63
64 {$endif read_interface}
65
66 {$ifdef read_implementation}
67
68 { TBlendModeNode ----------------------------------------------- }
69
70 function TBlendModeNode.GetSrcFactor: TBlendingSourceFactor;
71 begin
72 Result := TBlendingSourceFactor(FdSrcFactor.EnumValue);
73 end;
74
75 procedure TBlendModeNode.SetSrcFactor(const Value: TBlendingSourceFactor);
76 begin
77 FdSrcFactor.SendEnumValue(Ord(Value));
78 end;
79
80 function TBlendModeNode.GetDestFactor: TBlendingDestinationFactor;
81 begin
82 Result := TBlendingDestinationFactor(FdDestFactor.EnumValue);
83 end;
84
85 procedure TBlendModeNode.SetDestFactor(const Value: TBlendingDestinationFactor);
86 begin
87 FdDestFactor.SendEnumValue(Ord(Value));
88 end;
89
90 function TBlendModeNode.GetColor: TCastleColorRGB;
91 begin
92 Result := FdColor.Value;
93 end;
94
95 procedure TBlendModeNode.SetColor(const Value: TCastleColorRGB);
96 begin
97 FdColor.Send(Value);
98 end;
99
100 function TBlendModeNode.GetColorTransparency: Single;
101 begin
102 Result := FdColorTransparency.Value;
103 end;
104
105 procedure TBlendModeNode.SetColorTransparency(const Value: Single);
106 begin
107 FdColorTransparency.Send(Value);
108 end;
109
110 class function TBlendModeNode.ClassX3DType: String;
111 begin
112 Result := 'BlendMode';
113 end;
114
115 procedure TBlendModeNode.CreateNode;
116 begin
117 inherited;
118
119 FFdSrcFactor := TSFStringEnum.Create(Self, True, 'srcFactor', @BlendingSourceFactorNames, Ord(High(BlendingSourceFactorNames)) + 1, Ord(bsSrcAlpha));
120 FdSrcFactor.ChangeAlways := chVisibleNonGeometry;
121 AddField(FFdSrcFactor);
122
123 FFdDestFactor := TSFStringEnum.Create(Self, True, 'destFactor', @BlendingDestinationFactorNames, Ord(High(BlendingDestinationFactorNames)) + 1, Ord(bdOneMinusSrcAlpha));
124 FdDestFactor.ChangeAlways := chVisibleNonGeometry;
125 AddField(FFdDestFactor);
126
127 FFdColor := TSFColor.Create(Self, True, 'color', Vector3(1, 1, 1));
128 FdColor.ChangeAlways := chVisibleNonGeometry;
129 AddField(FFdColor);
130
131 FFdColorTransparency := TSFFloat.Create(Self, True, 'colorTransparency', 0);
132 FdColorTransparency.ChangeAlways := chVisibleNonGeometry;
133 AddField(FFdColorTransparency);
134
135 DefaultContainerField := 'blendMode';
136 end;
137
138 {$endif read_implementation}