| 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 GetColor: TCastleColorRGB; |
| 28 |
procedure SetColor(const Value: TCastleColorRGB); |
| 29 |
function GetFogType: TFogType; |
| 30 |
procedure SetFogType(const Value: TFogType); |
| 31 |
function GetVisibilityRange: Single; |
| 32 |
procedure SetVisibilityRange(const Value: Single); |
| 33 |
function GetVolumetric: Boolean; |
| 34 |
procedure SetVolumetric(const Value: Boolean); |
| 35 |
function GetVolumetricDirection: TVector3; |
| 36 |
procedure SetVolumetricDirection(const Value: TVector3); |
| 37 |
function GetVolumetricVisibilityStart: Single; |
| 38 |
procedure SetVolumetricVisibilityStart(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 FFdColor: TSFColor; |
| 45 |
{ 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). } |
| 46 |
public property FdColor: TSFColor read FFdColor; |
| 47 |
{ } |
| 48 |
property Color: TCastleColorRGB read GetColor write SetColor; |
| 49 |
|
| 50 |
strict private FFdFogType: TSFStringEnum; |
| 51 |
{ Internal wrapper for property @code(FogType). This wrapper API may change, we advise to access simpler @code(FogType) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 52 |
public property FdFogType: TSFStringEnum read FFdFogType; |
| 53 |
{ } |
| 54 |
property FogType: TFogType read GetFogType write SetFogType; |
| 55 |
|
| 56 |
strict private FFdVisibilityRange: TSFFloat; |
| 57 |
{ Internal wrapper for property @code(VisibilityRange). This wrapper API may change, we advise to access simpler @code(VisibilityRange) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 58 |
public property FdVisibilityRange: TSFFloat read FFdVisibilityRange; |
| 59 |
{ } |
| 60 |
property VisibilityRange: Single read GetVisibilityRange write SetVisibilityRange; |
| 61 |
|
| 62 |
strict private FFdVolumetric: TSFBool; |
| 63 |
{ Internal wrapper for property @code(Volumetric). This wrapper API may change, we advise to access simpler @code(Volumetric) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 64 |
public property FdVolumetric: TSFBool read FFdVolumetric; |
| 65 |
{ Activate volumetric fog, see https://castle-engine.io/x3d_extensions.php } |
| 66 |
property Volumetric: Boolean read GetVolumetric write SetVolumetric; |
| 67 |
|
| 68 |
strict private FFdVolumetricDirection: TSFVec3f; |
| 69 |
{ Internal wrapper for property @code(VolumetricDirection). This wrapper API may change, we advise to access simpler @code(VolumetricDirection) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 70 |
public property FdVolumetricDirection: TSFVec3f read FFdVolumetricDirection; |
| 71 |
{ } |
| 72 |
property VolumetricDirection: TVector3 read GetVolumetricDirection write SetVolumetricDirection; |
| 73 |
|
| 74 |
strict private FFdVolumetricVisibilityStart: TSFFloat; |
| 75 |
{ Internal wrapper for property @code(VolumetricVisibilityStart). This wrapper API may change, we advise to access simpler @code(VolumetricVisibilityStart) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 76 |
public property FdVolumetricVisibilityStart: TSFFloat read FFdVolumetricVisibilityStart; |
| 77 |
{ } |
| 78 |
property VolumetricVisibilityStart: Single read GetVolumetricVisibilityStart write SetVolumetricVisibilityStart; |
| 79 |
|
| 80 |
{$endif read_interface} |
| 81 |
|
| 82 |
{$ifdef read_implementation} |
| 83 |
|
| 84 |
{ TFogNode ----------------------------------------------- } |
| 85 |
|
| 86 |
function TFogNode.GetColor: TCastleColorRGB; |
| 87 |
begin |
| 88 |
Result := FdColor.Value; |
| 89 |
end; |
| 90 |
|
| 91 |
procedure TFogNode.SetColor(const Value: TCastleColorRGB); |
| 92 |
begin |
| 93 |
FdColor.Send(Value); |
| 94 |
end; |
| 95 |
|
| 96 |
function TFogNode.GetFogType: TFogType; |
| 97 |
begin |
| 98 |
Result := TFogType(FdFogType.EnumValue); |
| 99 |
end; |
| 100 |
|
| 101 |
procedure TFogNode.SetFogType(const Value: TFogType); |
| 102 |
begin |
| 103 |
FdFogType.SendEnumValue(Ord(Value)); |
| 104 |
end; |
| 105 |
|
| 106 |
function TFogNode.GetVisibilityRange: Single; |
| 107 |
begin |
| 108 |
Result := FdVisibilityRange.Value; |
| 109 |
end; |
| 110 |
|
| 111 |
procedure TFogNode.SetVisibilityRange(const Value: Single); |
| 112 |
begin |
| 113 |
FdVisibilityRange.Send(Value); |
| 114 |
end; |
| 115 |
|
| 116 |
function TFogNode.GetVolumetric: Boolean; |
| 117 |
begin |
| 118 |
Result := FdVolumetric.Value; |
| 119 |
end; |
| 120 |
|
| 121 |
procedure TFogNode.SetVolumetric(const Value: Boolean); |
| 122 |
begin |
| 123 |
FdVolumetric.Send(Value); |
| 124 |
end; |
| 125 |
|
| 126 |
function TFogNode.GetVolumetricDirection: TVector3; |
| 127 |
begin |
| 128 |
Result := FdVolumetricDirection.Value; |
| 129 |
end; |
| 130 |
|
| 131 |
procedure TFogNode.SetVolumetricDirection(const Value: TVector3); |
| 132 |
begin |
| 133 |
FdVolumetricDirection.Send(Value); |
| 134 |
end; |
| 135 |
|
| 136 |
function TFogNode.GetVolumetricVisibilityStart: Single; |
| 137 |
begin |
| 138 |
Result := FdVolumetricVisibilityStart.Value; |
| 139 |
end; |
| 140 |
|
| 141 |
procedure TFogNode.SetVolumetricVisibilityStart(const Value: Single); |
| 142 |
begin |
| 143 |
FdVolumetricVisibilityStart.Send(Value); |
| 144 |
end; |
| 145 |
|
| 146 |
class function TFogNode.ClassX3DType: String; |
| 147 |
begin |
| 148 |
Result := 'Fog'; |
| 149 |
end; |
| 150 |
|
| 151 |
procedure TFogNode.CreateNode; |
| 152 |
begin |
| 153 |
inherited; |
| 154 |
|
| 155 |
FFdColor := TSFColor.Create(Self, True, 'color', Vector3(1, 1, 1)); |
| 156 |
FdColor.ChangeAlways := chRedisplay; |
| 157 |
AddField(FFdColor); |
| 158 |
|
| 159 |
FFdFogType := TSFStringEnum.Create(Self, True, 'fogType', @FogTypeNames, Ord(High(FogTypeNames)) + 1, Ord(ftLinear)); |
| 160 |
FdFogType.ChangeAlways := chRedisplay; |
| 161 |
AddField(FFdFogType); |
| 162 |
|
| 163 |
FFdVisibilityRange := TSFFloat.Create(Self, True, 'visibilityRange', 0); |
| 164 |
FdVisibilityRange.ChangeAlways := chRedisplay; |
| 165 |
FdVisibilityRange.MustBeNonnegative := true; |
| 166 |
AddField(FFdVisibilityRange); |
| 167 |
|
| 168 |
FFdVolumetric := TSFBool.Create(Self, True, 'volumetric', false); |
| 169 |
FdVolumetric.ChangeAlways := chRedisplay; |
| 170 |
AddField(FFdVolumetric); |
| 171 |
|
| 172 |
FFdVolumetricDirection := TSFVec3f.Create(Self, True, 'volumetricDirection', Vector3(0, -1, 0)); |
| 173 |
FdVolumetricDirection.ChangeAlways := chRedisplay; |
| 174 |
AddField(FFdVolumetricDirection); |
| 175 |
|
| 176 |
FFdVolumetricVisibilityStart := TSFFloat.Create(Self, True, 'volumetricVisibilityStart', 0); |
| 177 |
FdVolumetricVisibilityStart.ChangeAlways := chRedisplay; |
| 178 |
AddField(FFdVolumetricVisibilityStart); |
| 179 |
end; |
| 180 |
|
| 181 |
{$endif read_implementation} |