{ -*- buffer-read-only: t -*- Copyright 2015-2024 Michalis Kamburelis. This file is part of "Castle Game Engine". "Castle Game Engine" is free software; see the file COPYING.txt, included in this distribution, for details about the copyright. "Castle Game Engine" is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ---------------------------------------------------------------------------- } { Automatically generated node properties. Do not edit this file manually! To add new properties: - add them to the text files in tools/internal/x3d-nodes-to-pascal/nodes-specification/ , - and regenerate include files by running x3d-nodes-to-pascal } {$ifdef read_interface} strict private function GetGeoCenter: TVector3Double; procedure SetGeoCenter(const Value: TVector3Double); function GetRotation: TVector4; procedure SetRotation(const Value: TVector4); function GetScale: TVector3; procedure SetScale(const Value: TVector3); function GetScaleOrientation: TVector4; procedure SetScaleOrientation(const Value: TVector4); function GetTranslation: TVector3; procedure SetTranslation(const Value: TVector3); function GetGeoOrigin: TGeoOriginNode; procedure SetGeoOrigin(const Value: TGeoOriginNode); public { Create node fields and events. } procedure CreateNode; override; class function ClassX3DType: String; override; strict private FFdGeoCenter: TSFVec3d; { Internal wrapper for property @code(GeoCenter). This wrapper API may change, we advise to access simpler @code(GeoCenter) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } public property FdGeoCenter: TSFVec3d read FFdGeoCenter; { } property GeoCenter: TVector3Double read GetGeoCenter write SetGeoCenter; strict private FFdRotation: TSFRotation; { 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). } public property FdRotation: TSFRotation read FFdRotation; { } property Rotation: TVector4 read GetRotation write SetRotation; strict private FFdScale: TSFVec3f; { Internal wrapper for property @code(Scale). This wrapper API may change, we advise to access simpler @code(Scale) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } public property FdScale: TSFVec3f read FFdScale; { } property Scale: TVector3 read GetScale write SetScale; strict private FFdScaleOrientation: TSFRotation; { 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). } public property FdScaleOrientation: TSFRotation read FFdScaleOrientation; { } property ScaleOrientation: TVector4 read GetScaleOrientation write SetScaleOrientation; strict private FFdTranslation: TSFVec3f; { 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). } public property FdTranslation: TSFVec3f read FFdTranslation; { } property Translation: TVector3 read GetTranslation write SetTranslation; strict private FFdGeoOrigin: TSFNode; { Internal wrapper for property @code(GeoOrigin). This wrapper API may change, we advise to access simpler @code(GeoOrigin) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } public property FdGeoOrigin: TSFNode read FFdGeoOrigin; { } property GeoOrigin: TGeoOriginNode read GetGeoOrigin write SetGeoOrigin; strict private FFdGeoSystem: TMFString; { Internal wrapper for property @code(GeoSystem). This wrapper API may change, we advise to access simpler @code(GeoSystem) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } public property FdGeoSystem: TMFString read FFdGeoSystem; { } procedure SetGeoSystem(const Value: array of string); overload; { } procedure SetGeoSystem(const Value: TCastleStringList); overload; {$endif read_interface} {$ifdef read_implementation} { TGeoTransformNode ----------------------------------------------- } function TGeoTransformNode.GetGeoCenter: TVector3Double; begin Result := FdGeoCenter.Value; end; procedure TGeoTransformNode.SetGeoCenter(const Value: TVector3Double); begin FdGeoCenter.Send(Value); end; function TGeoTransformNode.GetRotation: TVector4; begin Result := FdRotation.Value; end; procedure TGeoTransformNode.SetRotation(const Value: TVector4); begin FdRotation.Send(Value); end; function TGeoTransformNode.GetScale: TVector3; begin Result := FdScale.Value; end; procedure TGeoTransformNode.SetScale(const Value: TVector3); begin FdScale.Send(Value); end; function TGeoTransformNode.GetScaleOrientation: TVector4; begin Result := FdScaleOrientation.Value; end; procedure TGeoTransformNode.SetScaleOrientation(const Value: TVector4); begin FdScaleOrientation.Send(Value); end; function TGeoTransformNode.GetTranslation: TVector3; begin Result := FdTranslation.Value; end; procedure TGeoTransformNode.SetTranslation(const Value: TVector3); begin FdTranslation.Send(Value); end; function TGeoTransformNode.GetGeoOrigin: TGeoOriginNode; begin if FdGeoOrigin.Value is TGeoOriginNode then Result := TGeoOriginNode(FdGeoOrigin.Value) else Result := nil; end; procedure TGeoTransformNode.SetGeoOrigin(const Value: TGeoOriginNode); begin FdGeoOrigin.Send(Value); end; procedure TGeoTransformNode.SetGeoSystem(const Value: array of string); begin FdGeoSystem.Send(Value); end; procedure TGeoTransformNode.SetGeoSystem(const Value: TCastleStringList); begin FdGeoSystem.Send(Value); end; class function TGeoTransformNode.ClassX3DType: String; begin Result := 'GeoTransform'; end; procedure TGeoTransformNode.CreateNode; begin inherited; FFdGeoCenter := TSFVec3d.Create(Self, True, 'geoCenter', Vector3Double(0, 0, 0)); FdGeoCenter.ChangeAlways := chVisibleNonGeometry; AddField(FFdGeoCenter); FFdRotation := TSFRotation.Create(Self, True, 'rotation', Vector3(0, 0, 1), 0); FdRotation.ChangeAlways := chVisibleNonGeometry; AddField(FFdRotation); FFdScale := TSFVec3f.Create(Self, True, 'scale', Vector3(1, 1, 1)); FdScale.ChangeAlways := chVisibleNonGeometry; AddField(FFdScale); FFdScaleOrientation := TSFRotation.Create(Self, True, 'scaleOrientation', Vector3(0, 0, 1), 0); FdScaleOrientation.ChangeAlways := chVisibleNonGeometry; AddField(FFdScaleOrientation); FFdTranslation := TSFVec3f.Create(Self, True, 'translation', Vector3(0, 0, 0)); FdTranslation.ChangeAlways := chVisibleNonGeometry; AddField(FFdTranslation); FFdGeoOrigin := TSFNode.Create(Self, False, 'geoOrigin', [TGeoOriginNode]); FdGeoOrigin.ChangeAlways := chVisibleNonGeometry; AddField(FFdGeoOrigin); FFdGeoSystem := TMFString.Create(Self, False, 'geoSystem', ['GD','WE']); FdGeoSystem.ChangeAlways := chVisibleNonGeometry; AddField(FFdGeoSystem); end; {$endif read_implementation}