| 1 |
{ -*- buffer-read-only: t -*- |
| 2 |
|
| 3 |
Copyright 2018-2022 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 wrapper to make vectors/colors persistent. |
| 18 |
|
| 19 |
Do not edit this file manually! |
| 20 |
Instead |
| 21 |
- edit tools/internal/generate-persistent-vectors/persistent_vectors_input.txt |
| 22 |
- and run generate-persistent-vectors in that directory. |
| 23 |
} |
| 24 |
|
| 25 |
{$ifdef read_interface_class} |
| 26 |
strict private |
| 27 |
FAnchorPersistent: TCastleVector3Persistent; |
| 28 |
function GetAnchorForPersistent: TVector3; |
| 29 |
procedure SetAnchorForPersistent(const AValue: TVector3); |
| 30 |
published |
| 31 |
{ @link(Anchor) that can be visually edited in |
| 32 |
Castle Game Engine Editor, Lazarus and Delphi. |
| 33 |
Normal user code does not need to deal with this, |
| 34 |
instead read or write @link(Anchor) directly. |
| 35 |
|
| 36 |
@seealso Anchor } |
| 37 |
property AnchorPersistent: TCastleVector3Persistent read FAnchorPersistent ; |
| 38 |
{$endif read_interface_class} |
| 39 |
|
| 40 |
{$ifdef read_implementation_methods} |
| 41 |
function TCastleGrabJoint.GetAnchorForPersistent: TVector3; |
| 42 |
begin |
| 43 |
Result := Anchor; |
| 44 |
end; |
| 45 |
|
| 46 |
procedure TCastleGrabJoint.SetAnchorForPersistent(const AValue: TVector3); |
| 47 |
begin |
| 48 |
Anchor := AValue; |
| 49 |
end; |
| 50 |
{$endif read_implementation_methods} |
| 51 |
|
| 52 |
{$ifdef read_implementation_constructor} |
| 53 |
FAnchorPersistent := TCastleVector3Persistent.Create(nil); |
| 54 |
{ Note that some classes (like TCastleVector3Persistent) call SetSubComponent(true) |
| 55 |
on themselves, for backward compatibility. But we should not depend on it, |
| 56 |
some classes (like TFloatRectanglePersisten) may not call it. |
| 57 |
The responsibility of calling "SetSubComponent(true)" should be on the owner |
| 58 |
in general (this is more functional, and more standard too). } |
| 59 |
FAnchorPersistent.SetSubComponent(true); |
| 60 |
FAnchorPersistent.InternalGetValue := {$ifdef FPC}@{$endif}GetAnchorForPersistent; |
| 61 |
FAnchorPersistent.InternalSetValue := {$ifdef FPC}@{$endif}SetAnchorForPersistent; |
| 62 |
FAnchorPersistent.InternalDefaultValue := Anchor; // current value is default |
| 63 |
{$endif read_implementation_constructor} |
| 64 |
|
| 65 |
{$ifdef read_implementation_destructor} |
| 66 |
FreeAndNil(FAnchorPersistent); |
| 67 |
{$endif read_implementation_destructor} |
| 68 |
|
| 69 |
{ -*- buffer-read-only: t -*- |
| 70 |
|
| 71 |
Copyright 2018-2022 Michalis Kamburelis. |
| 72 |
|
| 73 |
This file is part of "Castle Game Engine". |
| 74 |
|
| 75 |
"Castle Game Engine" is free software; see the file COPYING.txt, |
| 76 |
included in this distribution, for details about the copyright. |
| 77 |
|
| 78 |
"Castle Game Engine" is distributed in the hope that it will be useful, |
| 79 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 80 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 81 |
|
| 82 |
---------------------------------------------------------------------------- |
| 83 |
} |
| 84 |
|
| 85 |
{ Automatically generated wrapper to make vectors/colors persistent. |
| 86 |
|
| 87 |
Do not edit this file manually! |
| 88 |
Instead |
| 89 |
- edit tools/internal/generate-persistent-vectors/persistent_vectors_input.txt |
| 90 |
- and run generate-persistent-vectors in that directory. |
| 91 |
} |
| 92 |
|
| 93 |
{$ifdef read_interface_class} |
| 94 |
strict private |
| 95 |
FTargetWorldPersistent: TCastleVector3Persistent; |
| 96 |
function GetTargetWorldForPersistent: TVector3; |
| 97 |
procedure SetTargetWorldForPersistent(const AValue: TVector3); |
| 98 |
published |
| 99 |
{ @link(TargetWorld) that can be visually edited in |
| 100 |
Castle Game Engine Editor, Lazarus and Delphi. |
| 101 |
Normal user code does not need to deal with this, |
| 102 |
instead read or write @link(TargetWorld) directly. |
| 103 |
|
| 104 |
@seealso TargetWorld } |
| 105 |
property TargetWorldPersistent: TCastleVector3Persistent read FTargetWorldPersistent ; |
| 106 |
{$endif read_interface_class} |
| 107 |
|
| 108 |
{$ifdef read_implementation_methods} |
| 109 |
function TCastleGrabJoint.GetTargetWorldForPersistent: TVector3; |
| 110 |
begin |
| 111 |
Result := TargetWorld; |
| 112 |
end; |
| 113 |
|
| 114 |
procedure TCastleGrabJoint.SetTargetWorldForPersistent(const AValue: TVector3); |
| 115 |
begin |
| 116 |
TargetWorld := AValue; |
| 117 |
end; |
| 118 |
{$endif read_implementation_methods} |
| 119 |
|
| 120 |
{$ifdef read_implementation_constructor} |
| 121 |
FTargetWorldPersistent := TCastleVector3Persistent.Create(nil); |
| 122 |
{ Note that some classes (like TCastleVector3Persistent) call SetSubComponent(true) |
| 123 |
on themselves, for backward compatibility. But we should not depend on it, |
| 124 |
some classes (like TFloatRectanglePersisten) may not call it. |
| 125 |
The responsibility of calling "SetSubComponent(true)" should be on the owner |
| 126 |
in general (this is more functional, and more standard too). } |
| 127 |
FTargetWorldPersistent.SetSubComponent(true); |
| 128 |
FTargetWorldPersistent.InternalGetValue := {$ifdef FPC}@{$endif}GetTargetWorldForPersistent; |
| 129 |
FTargetWorldPersistent.InternalSetValue := {$ifdef FPC}@{$endif}SetTargetWorldForPersistent; |
| 130 |
FTargetWorldPersistent.InternalDefaultValue := TargetWorld; // current value is default |
| 131 |
{$endif read_implementation_constructor} |
| 132 |
|
| 133 |
{$ifdef read_implementation_destructor} |
| 134 |
FreeAndNil(FTargetWorldPersistent); |
| 135 |
{$endif read_implementation_destructor} |
| 136 |
|