| 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 GetEnabled: Boolean; |
| 28 |
procedure SetEnabled(const Value: Boolean); |
| 29 |
function GetDescription: String; |
| 30 |
procedure SetDescription(const Value: String); |
| 31 |
public |
| 32 |
{ Create node fields and events. } |
| 33 |
procedure CreateNode; override; |
| 34 |
class function ClassX3DType: String; override; |
| 35 |
|
| 36 |
strict private FFdEnabled: TSFBool; |
| 37 |
{ Internal wrapper for property @code(Enabled). This wrapper API may change, we advise to access simpler @code(Enabled) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 38 |
public property FdEnabled: TSFBool read FFdEnabled; |
| 39 |
{ } |
| 40 |
property Enabled: Boolean read GetEnabled write SetEnabled; |
| 41 |
|
| 42 |
strict private FEventIsActive: TSFBoolEvent; |
| 43 |
{ } |
| 44 |
public property EventIsActive: TSFBoolEvent read FEventIsActive; |
| 45 |
|
| 46 |
strict private FFdDescription: TSFString; |
| 47 |
{ 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). } |
| 48 |
public property FdDescription: TSFString read FFdDescription; |
| 49 |
{ } |
| 50 |
property Description: String read GetDescription write SetDescription; |
| 51 |
|
| 52 |
{$endif read_interface} |
| 53 |
|
| 54 |
{$ifdef read_implementation} |
| 55 |
|
| 56 |
{ TAbstractSensorNode ----------------------------------------------- } |
| 57 |
|
| 58 |
function TAbstractSensorNode.GetEnabled: Boolean; |
| 59 |
begin |
| 60 |
Result := FdEnabled.Value; |
| 61 |
end; |
| 62 |
|
| 63 |
procedure TAbstractSensorNode.SetEnabled(const Value: Boolean); |
| 64 |
begin |
| 65 |
FdEnabled.Send(Value); |
| 66 |
end; |
| 67 |
|
| 68 |
function TAbstractSensorNode.GetDescription: String; |
| 69 |
begin |
| 70 |
Result := FdDescription.Value; |
| 71 |
end; |
| 72 |
|
| 73 |
procedure TAbstractSensorNode.SetDescription(const Value: String); |
| 74 |
begin |
| 75 |
FdDescription.Send(Value); |
| 76 |
end; |
| 77 |
|
| 78 |
class function TAbstractSensorNode.ClassX3DType: String; |
| 79 |
begin |
| 80 |
Result := 'X3DSensorNode'; |
| 81 |
end; |
| 82 |
|
| 83 |
procedure TAbstractSensorNode.CreateNode; |
| 84 |
begin |
| 85 |
inherited; |
| 86 |
|
| 87 |
FFdEnabled := TSFBool.Create(Self, True, 'enabled', true); |
| 88 |
FdEnabled.ChangeAlways := chNone; |
| 89 |
AddField(FFdEnabled); |
| 90 |
|
| 91 |
FEventIsActive := TSFBoolEvent.Create(Self, 'isActive', false); |
| 92 |
AddEvent(FEventIsActive); |
| 93 |
|
| 94 |
FFdDescription := TSFString.Create(Self, True, 'description', ''); |
| 95 |
FdDescription.ChangeAlways := chNone; |
| 96 |
AddField(FFdDescription); |
| 97 |
end; |
| 98 |
|
| 99 |
{$endif read_implementation} |