| 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 GetFilename: String; |
| 28 |
procedure SetFilename(const Value: String); |
| 29 |
function GetBlendColor: TVector3; |
| 30 |
procedure SetBlendColor(const Value: TVector3); |
| 31 |
public |
| 32 |
{ Create node fields and events. } |
| 33 |
procedure CreateNode; override; |
| 34 |
class function ClassX3DType: String; override; |
| 35 |
class function ForVRMLVersion(const Version: TX3DVersion): Boolean; override; |
| 36 |
|
| 37 |
strict private FFdFilename: TSFString; |
| 38 |
{ Internal wrapper for property @code(Filename). This wrapper API may change, we advise to access simpler @code(Filename) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 39 |
public property FdFilename: TSFString read FFdFilename; |
| 40 |
{ } |
| 41 |
property Filename: String read GetFilename write SetFilename; |
| 42 |
|
| 43 |
strict private FFdImage: TSFImage; |
| 44 |
{ Internal wrapper for property @code(Image). This wrapper API may change, we advise to access simpler @code(Image) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 45 |
public property FdImage: TSFImage read FFdImage; |
| 46 |
|
| 47 |
strict private FFdWrapS: TSFEnum; |
| 48 |
{ Internal wrapper for property @code(WrapS). This wrapper API may change, we advise to access simpler @code(WrapS) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 49 |
public property FdWrapS: TSFEnum read FFdWrapS; |
| 50 |
|
| 51 |
strict private FFdWrapT: TSFEnum; |
| 52 |
{ Internal wrapper for property @code(WrapT). This wrapper API may change, we advise to access simpler @code(WrapT) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 53 |
public property FdWrapT: TSFEnum read FFdWrapT; |
| 54 |
|
| 55 |
strict private FFdModel: TSFEnum; |
| 56 |
{ Internal wrapper for property @code(Model). This wrapper API may change, we advise to access simpler @code(Model) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 57 |
public property FdModel: TSFEnum read FFdModel; |
| 58 |
|
| 59 |
strict private FFdBlendColor: TSFVec3f; |
| 60 |
{ Internal wrapper for property @code(BlendColor). This wrapper API may change, we advise to access simpler @code(BlendColor) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 61 |
public property FdBlendColor: TSFVec3f read FFdBlendColor; |
| 62 |
{ Ignored. Unknown extension to VRML 1.0 spec, found on models in http://www-vrl.umich.edu/sel_prj/EECS498/ . } |
| 63 |
property BlendColor: TVector3 read GetBlendColor write SetBlendColor; |
| 64 |
|
| 65 |
{$endif read_interface} |
| 66 |
|
| 67 |
{$ifdef read_implementation} |
| 68 |
|
| 69 |
{ TTexture2Node_1 ----------------------------------------------- } |
| 70 |
|
| 71 |
function TTexture2Node_1.GetFilename: String; |
| 72 |
begin |
| 73 |
Result := FdFilename.Value; |
| 74 |
end; |
| 75 |
|
| 76 |
procedure TTexture2Node_1.SetFilename(const Value: String); |
| 77 |
begin |
| 78 |
FdFilename.Send(Value); |
| 79 |
end; |
| 80 |
|
| 81 |
function TTexture2Node_1.GetBlendColor: TVector3; |
| 82 |
begin |
| 83 |
Result := FdBlendColor.Value; |
| 84 |
end; |
| 85 |
|
| 86 |
procedure TTexture2Node_1.SetBlendColor(const Value: TVector3); |
| 87 |
begin |
| 88 |
FdBlendColor.Send(Value); |
| 89 |
end; |
| 90 |
|
| 91 |
class function TTexture2Node_1.ForVRMLVersion(const Version: TX3DVersion): Boolean; |
| 92 |
begin |
| 93 |
Result := Version.Major <= 1; // parse this node only in VRML 1.0 and Inventor files |
| 94 |
end; |
| 95 |
|
| 96 |
class function TTexture2Node_1.ClassX3DType: String; |
| 97 |
begin |
| 98 |
Result := 'Texture2'; |
| 99 |
end; |
| 100 |
|
| 101 |
procedure TTexture2Node_1.CreateNode; |
| 102 |
begin |
| 103 |
inherited; |
| 104 |
|
| 105 |
FFdFilename := TSFString.Create(Self, True, 'filename', ''); |
| 106 |
FdFilename.ChangeAlways := chTextureImage; |
| 107 |
AddField(FFdFilename); |
| 108 |
|
| 109 |
FFdImage := TSFImage.Create(Self, True, 'image', nil); |
| 110 |
FdImage.ChangeAlways := chTextureImage; |
| 111 |
AddField(FFdImage); |
| 112 |
|
| 113 |
FFdWrapS := TSFEnum.Create(Self, True, 'wrapS', @WrapNames1, Ord(High(WrapNames1)) + 1, TEXWRAP_REPEAT); |
| 114 |
FdWrapS.ChangeAlways := chTexturePropertiesNode; |
| 115 |
AddField(FFdWrapS); |
| 116 |
|
| 117 |
FFdWrapT := TSFEnum.Create(Self, True, 'wrapT', @WrapNames1, Ord(High(WrapNames1)) + 1, TEXWRAP_REPEAT); |
| 118 |
FdWrapT.ChangeAlways := chTexturePropertiesNode; |
| 119 |
AddField(FFdWrapT); |
| 120 |
|
| 121 |
FFdModel := TSFEnum.Create(Self, True, 'model', @TextureModelNames1, Ord(High(TextureModelNames1)) + 1, 0); |
| 122 |
FdModel.ChangeAlways := chTexturePropertiesNode; |
| 123 |
AddField(FFdModel); |
| 124 |
|
| 125 |
FFdBlendColor := TSFVec3f.Create(Self, True, 'blendColor', Vector3(0, 0, 0)); |
| 126 |
FdBlendColor.ChangeAlways := chTexturePropertiesNode; |
| 127 |
AddField(FFdBlendColor); |
| 128 |
end; |
| 129 |
|
| 130 |
{$endif read_implementation} |