| 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 GetUpdate: TTextureUpdate; |
| 28 |
procedure SetUpdate(const Value: TTextureUpdate); |
| 29 |
function GetSize: Integer; |
| 30 |
procedure SetSize(const Value: Integer); |
| 31 |
function GetTextureProperties: TTexturePropertiesNode; |
| 32 |
procedure SetTextureProperties(const Value: TTexturePropertiesNode); |
| 33 |
function GetBias: TVector3; |
| 34 |
procedure SetBias(const Value: TVector3); |
| 35 |
public |
| 36 |
{ Create node fields and events. } |
| 37 |
procedure CreateNode; override; |
| 38 |
class function ClassX3DType: String; override; |
| 39 |
|
| 40 |
strict private FFdUpdate: TSFStringEnum; |
| 41 |
{ Internal wrapper for property @code(Update). This wrapper API may change, we advise to access simpler @code(Update) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 42 |
public property FdUpdate: TSFStringEnum read FFdUpdate; |
| 43 |
{ When to update the texture contents. } |
| 44 |
property Update: TTextureUpdate read GetUpdate write SetUpdate; |
| 45 |
|
| 46 |
strict private FFdSize: TSFInt32; |
| 47 |
{ Internal wrapper for property @code(Size). This wrapper API may change, we advise to access simpler @code(Size) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 48 |
public property FdSize: TSFInt32 read FFdSize; |
| 49 |
{ } |
| 50 |
property Size: Integer read GetSize write SetSize; |
| 51 |
|
| 52 |
strict private FFdTextureProperties: TSFNode; |
| 53 |
{ Internal wrapper for property @code(TextureProperties). This wrapper API may change, we advise to access simpler @code(TextureProperties) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 54 |
public property FdTextureProperties: TSFNode read FFdTextureProperties; |
| 55 |
{ } |
| 56 |
property TextureProperties: TTexturePropertiesNode read GetTextureProperties write SetTextureProperties; |
| 57 |
|
| 58 |
strict private FFdBias: TSFVec3f; |
| 59 |
{ Internal wrapper for property @code(Bias). This wrapper API may change, we advise to access simpler @code(Bias) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 60 |
public property FdBias: TSFVec3f read FFdBias; |
| 61 |
{ Bias from shape center to the point from which we generate a cubemap texture. TODO: for now in world space, should be in shape space. } |
| 62 |
property Bias: TVector3 read GetBias write SetBias; |
| 63 |
|
| 64 |
{$endif read_interface} |
| 65 |
|
| 66 |
{$ifdef read_implementation} |
| 67 |
|
| 68 |
{ TGeneratedCubeMapTextureNode ----------------------------------------------- } |
| 69 |
|
| 70 |
function TGeneratedCubeMapTextureNode.GetUpdate: TTextureUpdate; |
| 71 |
begin |
| 72 |
Result := TTextureUpdate(FdUpdate.EnumValue); |
| 73 |
end; |
| 74 |
|
| 75 |
procedure TGeneratedCubeMapTextureNode.SetUpdate(const Value: TTextureUpdate); |
| 76 |
begin |
| 77 |
FdUpdate.SendEnumValue(Ord(Value)); |
| 78 |
end; |
| 79 |
|
| 80 |
function TGeneratedCubeMapTextureNode.GetSize: Integer; |
| 81 |
begin |
| 82 |
Result := FdSize.Value; |
| 83 |
end; |
| 84 |
|
| 85 |
procedure TGeneratedCubeMapTextureNode.SetSize(const Value: Integer); |
| 86 |
begin |
| 87 |
FdSize.Send(Value); |
| 88 |
end; |
| 89 |
|
| 90 |
function TGeneratedCubeMapTextureNode.GetTextureProperties: TTexturePropertiesNode; |
| 91 |
begin |
| 92 |
if FdTextureProperties.Value is TTexturePropertiesNode then |
| 93 |
Result := TTexturePropertiesNode(FdTextureProperties.Value) |
| 94 |
else |
| 95 |
Result := nil; |
| 96 |
end; |
| 97 |
|
| 98 |
procedure TGeneratedCubeMapTextureNode.SetTextureProperties(const Value: TTexturePropertiesNode); |
| 99 |
begin |
| 100 |
FdTextureProperties.Send(Value); |
| 101 |
end; |
| 102 |
|
| 103 |
function TGeneratedCubeMapTextureNode.GetBias: TVector3; |
| 104 |
begin |
| 105 |
Result := FdBias.Value; |
| 106 |
end; |
| 107 |
|
| 108 |
procedure TGeneratedCubeMapTextureNode.SetBias(const Value: TVector3); |
| 109 |
begin |
| 110 |
FdBias.Send(Value); |
| 111 |
end; |
| 112 |
|
| 113 |
class function TGeneratedCubeMapTextureNode.ClassX3DType: String; |
| 114 |
begin |
| 115 |
Result := 'GeneratedCubeMapTexture'; |
| 116 |
end; |
| 117 |
|
| 118 |
procedure TGeneratedCubeMapTextureNode.CreateNode; |
| 119 |
begin |
| 120 |
inherited; |
| 121 |
|
| 122 |
FFdUpdate := TSFStringEnum.Create(Self, True, 'update', @TextureUpdateNames, Ord(High(TextureUpdateNames)) + 1, Ord(upNone)); |
| 123 |
FdUpdate.ChangeAlways := chRedisplay; |
| 124 |
AddField(FFdUpdate); |
| 125 |
|
| 126 |
FFdSize := TSFInt32.Create(Self, False, 'size', 128); |
| 127 |
FdSize.ChangeAlways := chTextureRendererProperties; |
| 128 |
FdSize.MustBeNonnegative := true; |
| 129 |
AddField(FFdSize); |
| 130 |
|
| 131 |
FFdTextureProperties := TSFNode.Create(Self, False, 'textureProperties', [TTexturePropertiesNode]); |
| 132 |
FdTextureProperties.ChangeAlways := chTextureRendererProperties; |
| 133 |
AddField(FFdTextureProperties); |
| 134 |
|
| 135 |
FFdBias := TSFVec3f.Create(Self, True, 'bias', Vector3(0, 0, 0)); |
| 136 |
FdBias.ChangeAlways := chNone; |
| 137 |
AddField(FFdBias); |
| 138 |
end; |
| 139 |
|
| 140 |
{$endif read_implementation} |