| 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 GetBaseColor: TCastleColorRGB; |
| 28 |
procedure SetBaseColor(const Value: TCastleColorRGB); |
| 29 |
function GetBaseTexture: TAbstractSingleTextureNode; |
| 30 |
procedure SetBaseTexture(const Value: TAbstractSingleTextureNode); |
| 31 |
function GetBaseTextureMapping: String; |
| 32 |
procedure SetBaseTextureMapping(const Value: String); |
| 33 |
function GetMetallic: Single; |
| 34 |
procedure SetMetallic(const Value: Single); |
| 35 |
function GetMetallicRoughnessTexture: TAbstractSingleTextureNode; |
| 36 |
procedure SetMetallicRoughnessTexture(const Value: TAbstractSingleTextureNode); |
| 37 |
function GetMetallicRoughnessTextureMapping: String; |
| 38 |
procedure SetMetallicRoughnessTextureMapping(const Value: String); |
| 39 |
function GetOcclusionStrength: Single; |
| 40 |
procedure SetOcclusionStrength(const Value: Single); |
| 41 |
function GetOcclusionTexture: TAbstractSingleTextureNode; |
| 42 |
procedure SetOcclusionTexture(const Value: TAbstractSingleTextureNode); |
| 43 |
function GetOcclusionTextureMapping: String; |
| 44 |
procedure SetOcclusionTextureMapping(const Value: String); |
| 45 |
function GetRoughness: Single; |
| 46 |
procedure SetRoughness(const Value: Single); |
| 47 |
function GetTransparency: Single; |
| 48 |
procedure SetTransparency(const Value: Single); |
| 49 |
public |
| 50 |
{ Create node fields and events. } |
| 51 |
procedure CreateNode; override; |
| 52 |
class function ClassX3DType: String; override; |
| 53 |
|
| 54 |
strict private FFdBaseColor: TSFColor; |
| 55 |
{ Internal wrapper for property @code(BaseColor). This wrapper API may change, we advise to access simpler @code(BaseColor) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 56 |
public property FdBaseColor: TSFColor read FFdBaseColor; |
| 57 |
{ The primary way to control the color of object with physical (PBR) material. } |
| 58 |
property BaseColor: TCastleColorRGB read GetBaseColor write SetBaseColor; |
| 59 |
|
| 60 |
strict private FFdBaseTexture: TSFNode; |
| 61 |
{ Internal wrapper for property @code(BaseTexture). This wrapper API may change, we advise to access simpler @code(BaseTexture) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 62 |
public property FdBaseTexture: TSFNode read FFdBaseTexture; |
| 63 |
{ The primary texture to control the color of object with physical (PBR) material. The RGB channel of this texture is multiplied with @link(BaseColor), and alpha channel is multiplied with the opacity (1-@link(Transparency)). } |
| 64 |
property BaseTexture: TAbstractSingleTextureNode read GetBaseTexture write SetBaseTexture; |
| 65 |
|
| 66 |
strict private FFdBaseTextureMapping: TSFString; |
| 67 |
{ Internal wrapper for property @code(BaseTextureMapping). This wrapper API may change, we advise to access simpler @code(BaseTextureMapping) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 68 |
public property FdBaseTextureMapping: TSFString read FFdBaseTextureMapping; |
| 69 |
{ Determines texture coordinates used by @link(BaseTexture). } |
| 70 |
property BaseTextureMapping: String read GetBaseTextureMapping write SetBaseTextureMapping; |
| 71 |
|
| 72 |
strict private FFdMetallic: TSFFloat; |
| 73 |
{ Internal wrapper for property @code(Metallic). This wrapper API may change, we advise to access simpler @code(Metallic) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 74 |
public property FdMetallic: TSFFloat read FFdMetallic; |
| 75 |
{ The metalness of the material; values range from 0.0 (non-metal) to 1.0 (metal). } |
| 76 |
property Metallic: Single read GetMetallic write SetMetallic; |
| 77 |
|
| 78 |
strict private FFdMetallicRoughnessTexture: TSFNode; |
| 79 |
{ Internal wrapper for property @code(MetallicRoughnessTexture). This wrapper API may change, we advise to access simpler @code(MetallicRoughnessTexture) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 80 |
public property FdMetallicRoughnessTexture: TSFNode read FFdMetallicRoughnessTexture; |
| 81 |
{ Control the @link(Metallic) and @link(Roughness) using a texture. The @italic(Blue) channel of this texture is multiplied with @link(Metallic). The @link(Green) channel is multiplied with @link(Roughness). The other channels are ignored. } |
| 82 |
property MetallicRoughnessTexture: TAbstractSingleTextureNode read GetMetallicRoughnessTexture write SetMetallicRoughnessTexture; |
| 83 |
|
| 84 |
strict private FFdMetallicRoughnessTextureMapping: TSFString; |
| 85 |
{ Internal wrapper for property @code(MetallicRoughnessTextureMapping). This wrapper API may change, we advise to access simpler @code(MetallicRoughnessTextureMapping) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 86 |
public property FdMetallicRoughnessTextureMapping: TSFString read FFdMetallicRoughnessTextureMapping; |
| 87 |
{ Determines texture coordinates used by @link(MetallicRoughnessTexture). } |
| 88 |
property MetallicRoughnessTextureMapping: String read GetMetallicRoughnessTextureMapping write SetMetallicRoughnessTextureMapping; |
| 89 |
|
| 90 |
strict private FFdOcclusionStrength: TSFFloat; |
| 91 |
{ Internal wrapper for property @code(OcclusionStrength). This wrapper API may change, we advise to access simpler @code(OcclusionStrength) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 92 |
public property FdOcclusionStrength: TSFFloat read FFdOcclusionStrength; |
| 93 |
{ } |
| 94 |
property OcclusionStrength: Single read GetOcclusionStrength write SetOcclusionStrength; |
| 95 |
|
| 96 |
strict private FFdOcclusionTexture: TSFNode; |
| 97 |
{ Internal wrapper for property @code(OcclusionTexture). This wrapper API may change, we advise to access simpler @code(OcclusionTexture) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 98 |
public property FdOcclusionTexture: TSFNode read FFdOcclusionTexture; |
| 99 |
{ } |
| 100 |
property OcclusionTexture: TAbstractSingleTextureNode read GetOcclusionTexture write SetOcclusionTexture; |
| 101 |
|
| 102 |
strict private FFdOcclusionTextureMapping: TSFString; |
| 103 |
{ Internal wrapper for property @code(OcclusionTextureMapping). This wrapper API may change, we advise to access simpler @code(OcclusionTextureMapping) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 104 |
public property FdOcclusionTextureMapping: TSFString read FFdOcclusionTextureMapping; |
| 105 |
{ } |
| 106 |
property OcclusionTextureMapping: String read GetOcclusionTextureMapping write SetOcclusionTextureMapping; |
| 107 |
|
| 108 |
strict private FFdRoughness: TSFFloat; |
| 109 |
{ Internal wrapper for property @code(Roughness). This wrapper API may change, we advise to access simpler @code(Roughness) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 110 |
public property FdRoughness: TSFFloat read FFdRoughness; |
| 111 |
{ The roughness of the material; values range from 0.0 (smooth) to 1.0 (rough). } |
| 112 |
property Roughness: Single read GetRoughness write SetRoughness; |
| 113 |
|
| 114 |
strict private FFdTransparency: TSFFloat; |
| 115 |
{ Internal wrapper for property @code(Transparency). This wrapper API may change, we advise to access simpler @code(Transparency) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 116 |
public property FdTransparency: TSFFloat read FFdTransparency; |
| 117 |
{ Setting @name to value > 0 makes the object partially-transparent. Setting it to 1.0 makes it even invisible (but still collidable). If you want to render the object using blending (which is usually the case for partially-transparent) it is recommended to specify it explicitly using @link(TAppearanceNode.AlphaMode). } |
| 118 |
property Transparency: Single read GetTransparency write SetTransparency; |
| 119 |
|
| 120 |
{$endif read_interface} |
| 121 |
|
| 122 |
{$ifdef read_implementation} |
| 123 |
|
| 124 |
{ TPhysicalMaterialNode ----------------------------------------------- } |
| 125 |
|
| 126 |
function TPhysicalMaterialNode.GetBaseColor: TCastleColorRGB; |
| 127 |
begin |
| 128 |
Result := FdBaseColor.Value; |
| 129 |
end; |
| 130 |
|
| 131 |
procedure TPhysicalMaterialNode.SetBaseColor(const Value: TCastleColorRGB); |
| 132 |
begin |
| 133 |
FdBaseColor.Send(Value); |
| 134 |
end; |
| 135 |
|
| 136 |
function TPhysicalMaterialNode.GetBaseTexture: TAbstractSingleTextureNode; |
| 137 |
begin |
| 138 |
if FdBaseTexture.Value is TAbstractSingleTextureNode then |
| 139 |
Result := TAbstractSingleTextureNode(FdBaseTexture.Value) |
| 140 |
else |
| 141 |
Result := nil; |
| 142 |
end; |
| 143 |
|
| 144 |
procedure TPhysicalMaterialNode.SetBaseTexture(const Value: TAbstractSingleTextureNode); |
| 145 |
begin |
| 146 |
FdBaseTexture.Send(Value); |
| 147 |
end; |
| 148 |
|
| 149 |
function TPhysicalMaterialNode.GetBaseTextureMapping: String; |
| 150 |
begin |
| 151 |
Result := FdBaseTextureMapping.Value; |
| 152 |
end; |
| 153 |
|
| 154 |
procedure TPhysicalMaterialNode.SetBaseTextureMapping(const Value: String); |
| 155 |
begin |
| 156 |
FdBaseTextureMapping.Send(Value); |
| 157 |
end; |
| 158 |
|
| 159 |
function TPhysicalMaterialNode.GetMetallic: Single; |
| 160 |
begin |
| 161 |
Result := FdMetallic.Value; |
| 162 |
end; |
| 163 |
|
| 164 |
procedure TPhysicalMaterialNode.SetMetallic(const Value: Single); |
| 165 |
begin |
| 166 |
FdMetallic.Send(Value); |
| 167 |
end; |
| 168 |
|
| 169 |
function TPhysicalMaterialNode.GetMetallicRoughnessTexture: TAbstractSingleTextureNode; |
| 170 |
begin |
| 171 |
if FdMetallicRoughnessTexture.Value is TAbstractSingleTextureNode then |
| 172 |
Result := TAbstractSingleTextureNode(FdMetallicRoughnessTexture.Value) |
| 173 |
else |
| 174 |
Result := nil; |
| 175 |
end; |
| 176 |
|
| 177 |
procedure TPhysicalMaterialNode.SetMetallicRoughnessTexture(const Value: TAbstractSingleTextureNode); |
| 178 |
begin |
| 179 |
FdMetallicRoughnessTexture.Send(Value); |
| 180 |
end; |
| 181 |
|
| 182 |
function TPhysicalMaterialNode.GetMetallicRoughnessTextureMapping: String; |
| 183 |
begin |
| 184 |
Result := FdMetallicRoughnessTextureMapping.Value; |
| 185 |
end; |
| 186 |
|
| 187 |
procedure TPhysicalMaterialNode.SetMetallicRoughnessTextureMapping(const Value: String); |
| 188 |
begin |
| 189 |
FdMetallicRoughnessTextureMapping.Send(Value); |
| 190 |
end; |
| 191 |
|
| 192 |
function TPhysicalMaterialNode.GetOcclusionStrength: Single; |
| 193 |
begin |
| 194 |
Result := FdOcclusionStrength.Value; |
| 195 |
end; |
| 196 |
|
| 197 |
procedure TPhysicalMaterialNode.SetOcclusionStrength(const Value: Single); |
| 198 |
begin |
| 199 |
FdOcclusionStrength.Send(Value); |
| 200 |
end; |
| 201 |
|
| 202 |
function TPhysicalMaterialNode.GetOcclusionTexture: TAbstractSingleTextureNode; |
| 203 |
begin |
| 204 |
if FdOcclusionTexture.Value is TAbstractSingleTextureNode then |
| 205 |
Result := TAbstractSingleTextureNode(FdOcclusionTexture.Value) |
| 206 |
else |
| 207 |
Result := nil; |
| 208 |
end; |
| 209 |
|
| 210 |
procedure TPhysicalMaterialNode.SetOcclusionTexture(const Value: TAbstractSingleTextureNode); |
| 211 |
begin |
| 212 |
FdOcclusionTexture.Send(Value); |
| 213 |
end; |
| 214 |
|
| 215 |
function TPhysicalMaterialNode.GetOcclusionTextureMapping: String; |
| 216 |
begin |
| 217 |
Result := FdOcclusionTextureMapping.Value; |
| 218 |
end; |
| 219 |
|
| 220 |
procedure TPhysicalMaterialNode.SetOcclusionTextureMapping(const Value: String); |
| 221 |
begin |
| 222 |
FdOcclusionTextureMapping.Send(Value); |
| 223 |
end; |
| 224 |
|
| 225 |
function TPhysicalMaterialNode.GetRoughness: Single; |
| 226 |
begin |
| 227 |
Result := FdRoughness.Value; |
| 228 |
end; |
| 229 |
|
| 230 |
procedure TPhysicalMaterialNode.SetRoughness(const Value: Single); |
| 231 |
begin |
| 232 |
FdRoughness.Send(Value); |
| 233 |
end; |
| 234 |
|
| 235 |
function TPhysicalMaterialNode.GetTransparency: Single; |
| 236 |
begin |
| 237 |
Result := FdTransparency.Value; |
| 238 |
end; |
| 239 |
|
| 240 |
procedure TPhysicalMaterialNode.SetTransparency(const Value: Single); |
| 241 |
begin |
| 242 |
FdTransparency.Send(Value); |
| 243 |
end; |
| 244 |
|
| 245 |
class function TPhysicalMaterialNode.ClassX3DType: String; |
| 246 |
begin |
| 247 |
Result := 'PhysicalMaterial'; |
| 248 |
end; |
| 249 |
|
| 250 |
procedure TPhysicalMaterialNode.CreateNode; |
| 251 |
begin |
| 252 |
inherited; |
| 253 |
|
| 254 |
FFdBaseColor := TSFColor.Create(Self, True, 'baseColor', Vector3(1, 1, 1)); |
| 255 |
FdBaseColor.ChangeAlways := chVisibleNonGeometry; |
| 256 |
AddField(FFdBaseColor); |
| 257 |
|
| 258 |
FFdBaseTexture := TSFNode.Create(Self, True, 'baseTexture', [TAbstractSingleTextureNode]); |
| 259 |
FdBaseTexture.ChangeAlways := chEverything; |
| 260 |
AddField(FFdBaseTexture); |
| 261 |
|
| 262 |
FFdBaseTextureMapping := TSFString.Create(Self, True, 'baseTextureMapping', ''); |
| 263 |
FdBaseTextureMapping.ChangeAlways := chVisibleNonGeometry; |
| 264 |
AddField(FFdBaseTextureMapping); |
| 265 |
|
| 266 |
FFdMetallic := TSFFloat.Create(Self, True, 'metallic', 1); |
| 267 |
FdMetallic.ChangeAlways := chVisibleNonGeometry; |
| 268 |
FdMetallic.MustBeNonnegative := true; |
| 269 |
AddField(FFdMetallic); |
| 270 |
|
| 271 |
FFdMetallicRoughnessTexture := TSFNode.Create(Self, True, 'metallicRoughnessTexture', [TAbstractSingleTextureNode]); |
| 272 |
FdMetallicRoughnessTexture.ChangeAlways := chEverything; |
| 273 |
AddField(FFdMetallicRoughnessTexture); |
| 274 |
|
| 275 |
FFdMetallicRoughnessTextureMapping := TSFString.Create(Self, True, 'metallicRoughnessTextureMapping', ''); |
| 276 |
FdMetallicRoughnessTextureMapping.ChangeAlways := chVisibleNonGeometry; |
| 277 |
AddField(FFdMetallicRoughnessTextureMapping); |
| 278 |
|
| 279 |
FFdOcclusionStrength := TSFFloat.Create(Self, True, 'occlusionStrength', 1); |
| 280 |
FdOcclusionStrength.ChangeAlways := chVisibleNonGeometry; |
| 281 |
FdOcclusionStrength.MustBeNonnegative := true; |
| 282 |
AddField(FFdOcclusionStrength); |
| 283 |
|
| 284 |
FFdOcclusionTexture := TSFNode.Create(Self, True, 'occlusionTexture', [TAbstractSingleTextureNode]); |
| 285 |
FdOcclusionTexture.ChangeAlways := chEverything; |
| 286 |
AddField(FFdOcclusionTexture); |
| 287 |
|
| 288 |
FFdOcclusionTextureMapping := TSFString.Create(Self, True, 'occlusionTextureMapping', ''); |
| 289 |
FdOcclusionTextureMapping.ChangeAlways := chVisibleNonGeometry; |
| 290 |
AddField(FFdOcclusionTextureMapping); |
| 291 |
|
| 292 |
FFdRoughness := TSFFloat.Create(Self, True, 'roughness', 1); |
| 293 |
FdRoughness.ChangeAlways := chVisibleNonGeometry; |
| 294 |
FdRoughness.MustBeNonnegative := true; |
| 295 |
AddField(FFdRoughness); |
| 296 |
|
| 297 |
FFdTransparency := TSFFloat.Create(Self, True, 'transparency', 0); |
| 298 |
FdTransparency.ChangeAlways := chVisibleNonGeometry; |
| 299 |
FdTransparency.MustBeNonnegative := true; |
| 300 |
AddField(FFdTransparency); |
| 301 |
|
| 302 |
DefaultContainerField := 'material'; |
| 303 |
end; |
| 304 |
|
| 305 |
{$endif read_implementation} |