| 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 GetBeamWidth: Single; |
| 28 |
procedure SetBeamWidth(const Value: Single); |
| 29 |
function GetCutOffAngle: Single; |
| 30 |
procedure SetCutOffAngle(const Value: Single); |
| 31 |
function GetDirection: TVector3; |
| 32 |
procedure SetDirection(const Value: TVector3); |
| 33 |
function GetProjectionAngle: Single; |
| 34 |
procedure SetProjectionAngle(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 FFdBeamWidth: TSFFloat; |
| 41 |
{ Internal wrapper for property @code(BeamWidth). This wrapper API may change, we advise to access simpler @code(BeamWidth) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 42 |
public property FdBeamWidth: TSFFloat read FFdBeamWidth; |
| 43 |
{ } |
| 44 |
property BeamWidth: Single read GetBeamWidth write SetBeamWidth; |
| 45 |
|
| 46 |
strict private FFdCutOffAngle: TSFFloat; |
| 47 |
{ Internal wrapper for property @code(CutOffAngle). This wrapper API may change, we advise to access simpler @code(CutOffAngle) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 48 |
public property FdCutOffAngle: TSFFloat read FFdCutOffAngle; |
| 49 |
{ } |
| 50 |
property CutOffAngle: Single read GetCutOffAngle write SetCutOffAngle; |
| 51 |
|
| 52 |
strict private FFdDirection: TSFVec3f; |
| 53 |
{ Internal wrapper for property @code(Direction). This wrapper API may change, we advise to access simpler @code(Direction) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 54 |
public property FdDirection: TSFVec3f read FFdDirection; |
| 55 |
{ } |
| 56 |
property Direction: TVector3 read GetDirection write SetDirection; |
| 57 |
|
| 58 |
strict private FFdProjectionAngle: TSFFloat; |
| 59 |
{ Internal wrapper for property @code(ProjectionAngle). This wrapper API may change, we advise to access simpler @code(ProjectionAngle) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 60 |
public property FdProjectionAngle: TSFFloat read FFdProjectionAngle; |
| 61 |
{ } |
| 62 |
property ProjectionAngle: Single read GetProjectionAngle write SetProjectionAngle; |
| 63 |
|
| 64 |
{$endif read_interface} |
| 65 |
|
| 66 |
{$ifdef read_implementation} |
| 67 |
|
| 68 |
{ TSpotLightNode ----------------------------------------------- } |
| 69 |
|
| 70 |
function TSpotLightNode.GetBeamWidth: Single; |
| 71 |
begin |
| 72 |
Result := FdBeamWidth.Value; |
| 73 |
end; |
| 74 |
|
| 75 |
procedure TSpotLightNode.SetBeamWidth(const Value: Single); |
| 76 |
begin |
| 77 |
FdBeamWidth.Send(Value); |
| 78 |
end; |
| 79 |
|
| 80 |
function TSpotLightNode.GetCutOffAngle: Single; |
| 81 |
begin |
| 82 |
Result := FdCutOffAngle.Value; |
| 83 |
end; |
| 84 |
|
| 85 |
procedure TSpotLightNode.SetCutOffAngle(const Value: Single); |
| 86 |
begin |
| 87 |
FdCutOffAngle.Send(Value); |
| 88 |
end; |
| 89 |
|
| 90 |
function TSpotLightNode.GetDirection: TVector3; |
| 91 |
begin |
| 92 |
Result := FdDirection.Value; |
| 93 |
end; |
| 94 |
|
| 95 |
procedure TSpotLightNode.SetDirection(const Value: TVector3); |
| 96 |
begin |
| 97 |
FdDirection.Send(Value); |
| 98 |
end; |
| 99 |
|
| 100 |
function TSpotLightNode.GetProjectionAngle: Single; |
| 101 |
begin |
| 102 |
Result := FdProjectionAngle.Value; |
| 103 |
end; |
| 104 |
|
| 105 |
procedure TSpotLightNode.SetProjectionAngle(const Value: Single); |
| 106 |
begin |
| 107 |
FdProjectionAngle.Send(Value); |
| 108 |
end; |
| 109 |
|
| 110 |
class function TSpotLightNode.ClassX3DType: String; |
| 111 |
begin |
| 112 |
Result := 'SpotLight'; |
| 113 |
end; |
| 114 |
|
| 115 |
procedure TSpotLightNode.CreateNode; |
| 116 |
begin |
| 117 |
inherited; |
| 118 |
|
| 119 |
FFdBeamWidth := TSFFloat.Create(Self, True, 'beamWidth', Pi*3/16); |
| 120 |
FdBeamWidth.ChangeAlways := chVisibleNonGeometry; |
| 121 |
AddField(FFdBeamWidth); |
| 122 |
|
| 123 |
FFdCutOffAngle := TSFFloat.Create(Self, True, 'cutOffAngle', Pi/4); |
| 124 |
FdCutOffAngle.ChangeAlways := chVisibleNonGeometry; |
| 125 |
AddField(FFdCutOffAngle); |
| 126 |
|
| 127 |
FFdDirection := TSFVec3f.Create(Self, True, 'direction', Vector3(0, 0, -1)); |
| 128 |
FdDirection.ChangeAlways := chLightLocationDirection; |
| 129 |
AddField(FFdDirection); |
| 130 |
|
| 131 |
FFdProjectionAngle := TSFFloat.Create(Self, True, 'projectionAngle', 0); |
| 132 |
FdProjectionAngle.ChangeAlways := chVisibleGeometry; |
| 133 |
FdProjectionAngle.Angle := true; |
| 134 |
AddField(FFdProjectionAngle); |
| 135 |
end; |
| 136 |
|
| 137 |
{$endif read_implementation} |