| 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 GetTranslation: TVector3; |
| 28 |
procedure SetTranslation(const Value: TVector3); |
| 29 |
function GetRotation: TVector4; |
| 30 |
procedure SetRotation(const Value: TVector4); |
| 31 |
function GetScaleFactor: TVector3; |
| 32 |
procedure SetScaleFactor(const Value: TVector3); |
| 33 |
function GetScaleOrientation: TVector4; |
| 34 |
procedure SetScaleOrientation(const Value: TVector4); |
| 35 |
function GetCenter: TVector3; |
| 36 |
procedure SetCenter(const Value: TVector3); |
| 37 |
public |
| 38 |
{ Create node fields and events. } |
| 39 |
procedure CreateNode; override; |
| 40 |
class function ClassX3DType: String; override; |
| 41 |
class function ForVRMLVersion(const Version: TX3DVersion): Boolean; override; |
| 42 |
|
| 43 |
strict private FFdTranslation: TSFVec3f; |
| 44 |
{ Internal wrapper for property @code(Translation). This wrapper API may change, we advise to access simpler @code(Translation) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 45 |
public property FdTranslation: TSFVec3f read FFdTranslation; |
| 46 |
{ } |
| 47 |
property Translation: TVector3 read GetTranslation write SetTranslation; |
| 48 |
|
| 49 |
strict private FFdRotation: TSFRotation; |
| 50 |
{ Internal wrapper for property @code(Rotation). This wrapper API may change, we advise to access simpler @code(Rotation) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 51 |
public property FdRotation: TSFRotation read FFdRotation; |
| 52 |
{ } |
| 53 |
property Rotation: TVector4 read GetRotation write SetRotation; |
| 54 |
|
| 55 |
strict private FFdScaleFactor: TSFVec3f; |
| 56 |
{ Internal wrapper for property @code(ScaleFactor). This wrapper API may change, we advise to access simpler @code(ScaleFactor) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 57 |
public property FdScaleFactor: TSFVec3f read FFdScaleFactor; |
| 58 |
{ } |
| 59 |
property ScaleFactor: TVector3 read GetScaleFactor write SetScaleFactor; |
| 60 |
|
| 61 |
strict private FFdScaleOrientation: TSFRotation; |
| 62 |
{ Internal wrapper for property @code(ScaleOrientation). This wrapper API may change, we advise to access simpler @code(ScaleOrientation) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 63 |
public property FdScaleOrientation: TSFRotation read FFdScaleOrientation; |
| 64 |
{ } |
| 65 |
property ScaleOrientation: TVector4 read GetScaleOrientation write SetScaleOrientation; |
| 66 |
|
| 67 |
strict private FFdCenter: TSFVec3f; |
| 68 |
{ Internal wrapper for property @code(Center). This wrapper API may change, we advise to access simpler @code(Center) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 69 |
public property FdCenter: TSFVec3f read FFdCenter; |
| 70 |
{ } |
| 71 |
property Center: TVector3 read GetCenter write SetCenter; |
| 72 |
|
| 73 |
{$endif read_interface} |
| 74 |
|
| 75 |
{$ifdef read_implementation} |
| 76 |
|
| 77 |
{ TTransformNode_1 ----------------------------------------------- } |
| 78 |
|
| 79 |
function TTransformNode_1.GetTranslation: TVector3; |
| 80 |
begin |
| 81 |
Result := FdTranslation.Value; |
| 82 |
end; |
| 83 |
|
| 84 |
procedure TTransformNode_1.SetTranslation(const Value: TVector3); |
| 85 |
begin |
| 86 |
FdTranslation.Send(Value); |
| 87 |
end; |
| 88 |
|
| 89 |
function TTransformNode_1.GetRotation: TVector4; |
| 90 |
begin |
| 91 |
Result := FdRotation.Value; |
| 92 |
end; |
| 93 |
|
| 94 |
procedure TTransformNode_1.SetRotation(const Value: TVector4); |
| 95 |
begin |
| 96 |
FdRotation.Send(Value); |
| 97 |
end; |
| 98 |
|
| 99 |
function TTransformNode_1.GetScaleFactor: TVector3; |
| 100 |
begin |
| 101 |
Result := FdScaleFactor.Value; |
| 102 |
end; |
| 103 |
|
| 104 |
procedure TTransformNode_1.SetScaleFactor(const Value: TVector3); |
| 105 |
begin |
| 106 |
FdScaleFactor.Send(Value); |
| 107 |
end; |
| 108 |
|
| 109 |
function TTransformNode_1.GetScaleOrientation: TVector4; |
| 110 |
begin |
| 111 |
Result := FdScaleOrientation.Value; |
| 112 |
end; |
| 113 |
|
| 114 |
procedure TTransformNode_1.SetScaleOrientation(const Value: TVector4); |
| 115 |
begin |
| 116 |
FdScaleOrientation.Send(Value); |
| 117 |
end; |
| 118 |
|
| 119 |
function TTransformNode_1.GetCenter: TVector3; |
| 120 |
begin |
| 121 |
Result := FdCenter.Value; |
| 122 |
end; |
| 123 |
|
| 124 |
procedure TTransformNode_1.SetCenter(const Value: TVector3); |
| 125 |
begin |
| 126 |
FdCenter.Send(Value); |
| 127 |
end; |
| 128 |
|
| 129 |
class function TTransformNode_1.ForVRMLVersion(const Version: TX3DVersion): Boolean; |
| 130 |
begin |
| 131 |
Result := Version.Major <= 1; // parse this node only in VRML 1.0 and Inventor files |
| 132 |
end; |
| 133 |
|
| 134 |
class function TTransformNode_1.ClassX3DType: String; |
| 135 |
begin |
| 136 |
Result := 'Transform'; |
| 137 |
end; |
| 138 |
|
| 139 |
procedure TTransformNode_1.CreateNode; |
| 140 |
begin |
| 141 |
inherited; |
| 142 |
|
| 143 |
FFdTranslation := TSFVec3f.Create(Self, True, 'translation', Vector3(0, 0, 0)); |
| 144 |
FdTranslation.ChangeAlways := chEverything; |
| 145 |
AddField(FFdTranslation); |
| 146 |
|
| 147 |
FFdRotation := TSFRotation.Create(Self, True, 'rotation', Vector3(0, 0, 1), 0); |
| 148 |
FdRotation.ChangeAlways := chEverything; |
| 149 |
AddField(FFdRotation); |
| 150 |
|
| 151 |
FFdScaleFactor := TSFVec3f.Create(Self, True, 'scaleFactor', Vector3(1, 1, 1)); |
| 152 |
FdScaleFactor.ChangeAlways := chEverything; |
| 153 |
AddField(FFdScaleFactor); |
| 154 |
|
| 155 |
FFdScaleOrientation := TSFRotation.Create(Self, True, 'scaleOrientation', Vector3(0, 0, 1), 0); |
| 156 |
FdScaleOrientation.ChangeAlways := chEverything; |
| 157 |
AddField(FFdScaleOrientation); |
| 158 |
|
| 159 |
FFdCenter := TSFVec3f.Create(Self, True, 'center', Vector3(0, 0, 0)); |
| 160 |
FdCenter.ChangeAlways := chEverything; |
| 161 |
AddField(FFdCenter); |
| 162 |
end; |
| 163 |
|
| 164 |
{$endif read_implementation} |