| 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 GetEnabled: Boolean; |
| 28 |
procedure SetEnabled(const Value: Boolean); |
| 29 |
function GetRotation: TVector4; |
| 30 |
procedure SetRotation(const Value: TVector4); |
| 31 |
function GetTranslation: TVector3; |
| 32 |
procedure SetTranslation(const Value: TVector3); |
| 33 |
function GetBBox: TBox3D; |
| 34 |
procedure SetBBox(const Value: TBox3D); |
| 35 |
public |
| 36 |
{ Create node fields and events. } |
| 37 |
procedure CreateNode; override; |
| 38 |
class function ClassX3DType: String; override; |
| 39 |
|
| 40 |
strict private FFdEnabled: TSFBool; |
| 41 |
{ Internal wrapper for property @code(Enabled). This wrapper API may change, we advise to access simpler @code(Enabled) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 42 |
public property FdEnabled: TSFBool read FFdEnabled; |
| 43 |
{ } |
| 44 |
property Enabled: Boolean read GetEnabled write SetEnabled; |
| 45 |
|
| 46 |
strict private FFdRotation: TSFRotation; |
| 47 |
{ 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). } |
| 48 |
public property FdRotation: TSFRotation read FFdRotation; |
| 49 |
{ } |
| 50 |
property Rotation: TVector4 read GetRotation write SetRotation; |
| 51 |
|
| 52 |
strict private FFdTranslation: TSFVec3f; |
| 53 |
{ 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). } |
| 54 |
public property FdTranslation: TSFVec3f read FFdTranslation; |
| 55 |
{ } |
| 56 |
property Translation: TVector3 read GetTranslation write SetTranslation; |
| 57 |
|
| 58 |
strict private FFdBboxCenter: TSFVec3f; |
| 59 |
{ Internal wrapper for property @code(BboxCenter). This wrapper API may change, we advise to access simpler @code(BboxCenter) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 60 |
public property FdBboxCenter: TSFVec3f read FFdBboxCenter; |
| 61 |
{ } |
| 62 |
property BBox: TBox3D read GetBBox write SetBBox; |
| 63 |
|
| 64 |
strict private FFdBboxSize: TSFVec3f; |
| 65 |
{ Internal wrapper for property @code(BboxSize). This wrapper API may change, we advise to access simpler @code(BboxSize) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 66 |
public property FdBboxSize: TSFVec3f read FFdBboxSize; |
| 67 |
|
| 68 |
{$endif read_interface} |
| 69 |
|
| 70 |
{$ifdef read_implementation} |
| 71 |
|
| 72 |
{ TAbstractNBodyCollidableNode ----------------------------------------------- } |
| 73 |
|
| 74 |
function TAbstractNBodyCollidableNode.GetEnabled: Boolean; |
| 75 |
begin |
| 76 |
Result := FdEnabled.Value; |
| 77 |
end; |
| 78 |
|
| 79 |
procedure TAbstractNBodyCollidableNode.SetEnabled(const Value: Boolean); |
| 80 |
begin |
| 81 |
FdEnabled.Send(Value); |
| 82 |
end; |
| 83 |
|
| 84 |
function TAbstractNBodyCollidableNode.GetRotation: TVector4; |
| 85 |
begin |
| 86 |
Result := FdRotation.Value; |
| 87 |
end; |
| 88 |
|
| 89 |
procedure TAbstractNBodyCollidableNode.SetRotation(const Value: TVector4); |
| 90 |
begin |
| 91 |
FdRotation.Send(Value); |
| 92 |
end; |
| 93 |
|
| 94 |
function TAbstractNBodyCollidableNode.GetTranslation: TVector3; |
| 95 |
begin |
| 96 |
Result := FdTranslation.Value; |
| 97 |
end; |
| 98 |
|
| 99 |
procedure TAbstractNBodyCollidableNode.SetTranslation(const Value: TVector3); |
| 100 |
begin |
| 101 |
FdTranslation.Send(Value); |
| 102 |
end; |
| 103 |
|
| 104 |
function TAbstractNBodyCollidableNode.GetBBox: TBox3D; |
| 105 |
begin |
| 106 |
Result := TBox3D.FromCenterSize(FdBBoxCenter.Value, FdBBoxSize.Value); |
| 107 |
end; |
| 108 |
|
| 109 |
procedure TAbstractNBodyCollidableNode.SetBBox(const Value: TBox3D); |
| 110 |
var |
| 111 |
ValueCenter, ValueSize: TVector3; |
| 112 |
begin |
| 113 |
Value.ToCenterSize(ValueCenter, ValueSize); |
| 114 |
FdBBoxCenter.Send(ValueCenter); |
| 115 |
FdBBoxSize.Send(ValueSize); |
| 116 |
end; |
| 117 |
|
| 118 |
class function TAbstractNBodyCollidableNode.ClassX3DType: String; |
| 119 |
begin |
| 120 |
Result := 'X3DNBodyCollidableNode'; |
| 121 |
end; |
| 122 |
|
| 123 |
procedure TAbstractNBodyCollidableNode.CreateNode; |
| 124 |
begin |
| 125 |
inherited; |
| 126 |
|
| 127 |
FFdEnabled := TSFBool.Create(Self, True, 'enabled', true); |
| 128 |
FdEnabled.ChangeAlways := chVisibleNonGeometry; |
| 129 |
AddField(FFdEnabled); |
| 130 |
|
| 131 |
FFdRotation := TSFRotation.Create(Self, True, 'rotation', Vector3(0, 0, 1), 0); |
| 132 |
FdRotation.ChangeAlways := chVisibleNonGeometry; |
| 133 |
AddField(FFdRotation); |
| 134 |
|
| 135 |
FFdTranslation := TSFVec3f.Create(Self, True, 'translation', Vector3(0, 0, 0)); |
| 136 |
FdTranslation.ChangeAlways := chVisibleNonGeometry; |
| 137 |
AddField(FFdTranslation); |
| 138 |
|
| 139 |
FFdBboxCenter := TSFVec3f.Create(Self, False, 'bboxCenter', Vector3(0, 0, 0)); |
| 140 |
FdBboxCenter.ChangeAlways := chVisibleNonGeometry; |
| 141 |
AddField(FFdBboxCenter); |
| 142 |
|
| 143 |
FFdBboxSize := TSFVec3f.Create(Self, False, 'bboxSize', Vector3(-1, -1, -1)); |
| 144 |
FdBboxSize.ChangeAlways := chVisibleNonGeometry; |
| 145 |
AddField(FFdBboxSize); |
| 146 |
end; |
| 147 |
|
| 148 |
{$endif read_implementation} |