| 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 GetDiffuseTexture: TAbstractEnvironmentTextureNode; |
| 28 |
procedure SetDiffuseTexture(const Value: TAbstractEnvironmentTextureNode); |
| 29 |
function GetSpecularTexture: TAbstractEnvironmentTextureNode; |
| 30 |
procedure SetSpecularTexture(const Value: TAbstractEnvironmentTextureNode); |
| 31 |
public |
| 32 |
{ Create node fields and events. } |
| 33 |
procedure CreateNode; override; |
| 34 |
class function ClassX3DType: String; override; |
| 35 |
|
| 36 |
strict private FFdDiffuseTexture: TSFNode; |
| 37 |
{ Internal wrapper for property @code(DiffuseTexture). This wrapper API may change, we advise to access simpler @code(DiffuseTexture) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 38 |
public property FdDiffuseTexture: TSFNode read FFdDiffuseTexture; |
| 39 |
{ } |
| 40 |
property DiffuseTexture: TAbstractEnvironmentTextureNode read GetDiffuseTexture write SetDiffuseTexture; |
| 41 |
|
| 42 |
strict private FFdSpecularTexture: TSFNode; |
| 43 |
{ Internal wrapper for property @code(SpecularTexture). This wrapper API may change, we advise to access simpler @code(SpecularTexture) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 44 |
public property FdSpecularTexture: TSFNode read FFdSpecularTexture; |
| 45 |
{ } |
| 46 |
property SpecularTexture: TAbstractEnvironmentTextureNode read GetSpecularTexture write SetSpecularTexture; |
| 47 |
|
| 48 |
{$endif read_interface} |
| 49 |
|
| 50 |
{$ifdef read_implementation} |
| 51 |
|
| 52 |
{ TEnvironmentLightNode ----------------------------------------------- } |
| 53 |
|
| 54 |
function TEnvironmentLightNode.GetDiffuseTexture: TAbstractEnvironmentTextureNode; |
| 55 |
begin |
| 56 |
if FdDiffuseTexture.Value is TAbstractEnvironmentTextureNode then |
| 57 |
Result := TAbstractEnvironmentTextureNode(FdDiffuseTexture.Value) |
| 58 |
else |
| 59 |
Result := nil; |
| 60 |
end; |
| 61 |
|
| 62 |
procedure TEnvironmentLightNode.SetDiffuseTexture(const Value: TAbstractEnvironmentTextureNode); |
| 63 |
begin |
| 64 |
FdDiffuseTexture.Send(Value); |
| 65 |
end; |
| 66 |
|
| 67 |
function TEnvironmentLightNode.GetSpecularTexture: TAbstractEnvironmentTextureNode; |
| 68 |
begin |
| 69 |
if FdSpecularTexture.Value is TAbstractEnvironmentTextureNode then |
| 70 |
Result := TAbstractEnvironmentTextureNode(FdSpecularTexture.Value) |
| 71 |
else |
| 72 |
Result := nil; |
| 73 |
end; |
| 74 |
|
| 75 |
procedure TEnvironmentLightNode.SetSpecularTexture(const Value: TAbstractEnvironmentTextureNode); |
| 76 |
begin |
| 77 |
FdSpecularTexture.Send(Value); |
| 78 |
end; |
| 79 |
|
| 80 |
class function TEnvironmentLightNode.ClassX3DType: String; |
| 81 |
begin |
| 82 |
Result := 'EnvironmentLight'; |
| 83 |
end; |
| 84 |
|
| 85 |
procedure TEnvironmentLightNode.CreateNode; |
| 86 |
begin |
| 87 |
inherited; |
| 88 |
|
| 89 |
FFdDiffuseTexture := TSFNode.Create(Self, True, 'diffuseTexture', [TAbstractEnvironmentTextureNode]); |
| 90 |
FdDiffuseTexture.ChangeAlways := chVisibleNonGeometry; |
| 91 |
AddField(FFdDiffuseTexture); |
| 92 |
|
| 93 |
FFdSpecularTexture := TSFNode.Create(Self, True, 'specularTexture', [TAbstractEnvironmentTextureNode]); |
| 94 |
FdSpecularTexture.ChangeAlways := chVisibleNonGeometry; |
| 95 |
AddField(FFdSpecularTexture); |
| 96 |
end; |
| 97 |
|
| 98 |
{$endif read_implementation} |