| 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 GetAlpha: Single; |
| 28 |
procedure SetAlpha(const Value: Single); |
| 29 |
function GetColor: TCastleColorRGB; |
| 30 |
procedure SetColor(const Value: TCastleColorRGB); |
| 31 |
public |
| 32 |
{ Create node fields and events. } |
| 33 |
procedure CreateNode; override; |
| 34 |
class function ClassX3DType: String; override; |
| 35 |
|
| 36 |
strict private FFdAlpha: TSFFloat; |
| 37 |
{ Internal wrapper for property @code(Alpha). This wrapper API may change, we advise to access simpler @code(Alpha) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 38 |
public property FdAlpha: TSFFloat read FFdAlpha; |
| 39 |
{ } |
| 40 |
property Alpha: Single read GetAlpha write SetAlpha; |
| 41 |
|
| 42 |
strict private FFdColor: TSFColor; |
| 43 |
{ 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). } |
| 44 |
public property FdColor: TSFColor read FFdColor; |
| 45 |
{ } |
| 46 |
property Color: TCastleColorRGB read GetColor write SetColor; |
| 47 |
|
| 48 |
strict private FFdFunction: TMFString; |
| 49 |
{ Internal wrapper for property @code(Function). This wrapper API may change, we advise to access simpler @code(Function) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 50 |
public property FdFunction: TMFString read FFdFunction; |
| 51 |
{ } |
| 52 |
procedure SetFunction(const Value: array of string); overload; |
| 53 |
{ } |
| 54 |
procedure SetFunction(const Value: TCastleStringList); overload; |
| 55 |
|
| 56 |
strict private FFdMode: TMFString; |
| 57 |
{ Internal wrapper for property @code(Mode). This wrapper API may change, we advise to access simpler @code(Mode) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 58 |
public property FdMode: TMFString read FFdMode; |
| 59 |
{ } |
| 60 |
procedure SetMode(const Value: array of string); overload; |
| 61 |
{ } |
| 62 |
procedure SetMode(const Value: TCastleStringList); overload; |
| 63 |
|
| 64 |
strict private FFdSource: TMFString; |
| 65 |
{ Internal wrapper for property @code(Source). This wrapper API may change, we advise to access simpler @code(Source) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 66 |
public property FdSource: TMFString read FFdSource; |
| 67 |
{ } |
| 68 |
procedure SetSource(const Value: array of string); overload; |
| 69 |
{ } |
| 70 |
procedure SetSource(const Value: TCastleStringList); overload; |
| 71 |
|
| 72 |
strict private FFdTexture: TMFNode; |
| 73 |
{ Internal wrapper for property @code(Texture). This wrapper API may change, we advise to access simpler @code(Texture) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 74 |
public property FdTexture: TMFNode read FFdTexture; |
| 75 |
{ } |
| 76 |
procedure SetTexture(const Value: array of TAbstractSingleTextureNode); |
| 77 |
|
| 78 |
{$endif read_interface} |
| 79 |
|
| 80 |
{$ifdef read_implementation} |
| 81 |
|
| 82 |
{ TMultiTextureNode ----------------------------------------------- } |
| 83 |
|
| 84 |
function TMultiTextureNode.GetAlpha: Single; |
| 85 |
begin |
| 86 |
Result := FdAlpha.Value; |
| 87 |
end; |
| 88 |
|
| 89 |
procedure TMultiTextureNode.SetAlpha(const Value: Single); |
| 90 |
begin |
| 91 |
FdAlpha.Send(Value); |
| 92 |
end; |
| 93 |
|
| 94 |
function TMultiTextureNode.GetColor: TCastleColorRGB; |
| 95 |
begin |
| 96 |
Result := FdColor.Value; |
| 97 |
end; |
| 98 |
|
| 99 |
procedure TMultiTextureNode.SetColor(const Value: TCastleColorRGB); |
| 100 |
begin |
| 101 |
FdColor.Send(Value); |
| 102 |
end; |
| 103 |
|
| 104 |
procedure TMultiTextureNode.SetFunction(const Value: array of string); |
| 105 |
begin |
| 106 |
FdFunction.Send(Value); |
| 107 |
end; |
| 108 |
|
| 109 |
procedure TMultiTextureNode.SetFunction(const Value: TCastleStringList); |
| 110 |
begin |
| 111 |
FdFunction.Send(Value); |
| 112 |
end; |
| 113 |
|
| 114 |
procedure TMultiTextureNode.SetMode(const Value: array of string); |
| 115 |
begin |
| 116 |
FdMode.Send(Value); |
| 117 |
end; |
| 118 |
|
| 119 |
procedure TMultiTextureNode.SetMode(const Value: TCastleStringList); |
| 120 |
begin |
| 121 |
FdMode.Send(Value); |
| 122 |
end; |
| 123 |
|
| 124 |
procedure TMultiTextureNode.SetSource(const Value: array of string); |
| 125 |
begin |
| 126 |
FdSource.Send(Value); |
| 127 |
end; |
| 128 |
|
| 129 |
procedure TMultiTextureNode.SetSource(const Value: TCastleStringList); |
| 130 |
begin |
| 131 |
FdSource.Send(Value); |
| 132 |
end; |
| 133 |
|
| 134 |
procedure TMultiTextureNode.SetTexture(const Value: array of TAbstractSingleTextureNode); |
| 135 |
var |
| 136 |
L: Integer; |
| 137 |
A: array of TX3DNode; |
| 138 |
begin |
| 139 |
L := High(Value) + 1; |
| 140 |
SetLength(A, L); |
| 141 |
if L > 0 then |
| 142 |
Move(Value[0], A[0], L * SizeOf(TAbstractSingleTextureNode)); |
| 143 |
FdTexture.Send(A); |
| 144 |
end; |
| 145 |
|
| 146 |
class function TMultiTextureNode.ClassX3DType: String; |
| 147 |
begin |
| 148 |
Result := 'MultiTexture'; |
| 149 |
end; |
| 150 |
|
| 151 |
procedure TMultiTextureNode.CreateNode; |
| 152 |
begin |
| 153 |
inherited; |
| 154 |
|
| 155 |
FFdAlpha := TSFFloat.Create(Self, True, 'alpha', 1); |
| 156 |
FdAlpha.ChangeAlways := chTextureRendererProperties; |
| 157 |
FdAlpha.MustBeNonnegative := true; |
| 158 |
AddField(FFdAlpha); |
| 159 |
|
| 160 |
FFdColor := TSFColor.Create(Self, True, 'color', Vector3(1, 1, 1)); |
| 161 |
FdColor.ChangeAlways := chTextureRendererProperties; |
| 162 |
AddField(FFdColor); |
| 163 |
|
| 164 |
FFdFunction := TMFString.Create(Self, True, 'function', []); |
| 165 |
FdFunction.ChangeAlways := chTextureRendererProperties; |
| 166 |
AddField(FFdFunction); |
| 167 |
|
| 168 |
FFdMode := TMFString.Create(Self, True, 'mode', []); |
| 169 |
FdMode.ChangeAlways := chTextureRendererProperties; |
| 170 |
AddField(FFdMode); |
| 171 |
|
| 172 |
FFdSource := TMFString.Create(Self, True, 'source', []); |
| 173 |
FdSource.ChangeAlways := chTextureRendererProperties; |
| 174 |
AddField(FFdSource); |
| 175 |
|
| 176 |
FFdTexture := TMFNode.Create(Self, True, 'texture', [TAbstractSingleTextureNode]); |
| 177 |
FdTexture.ChangeAlways := chTextureRendererProperties; |
| 178 |
AddField(FFdTexture); |
| 179 |
end; |
| 180 |
|
| 181 |
{$endif read_implementation} |