Class TCastleTransformDesign

Unit

Declaration

type TCastleTransformDesign = class(TCastleTransform)

Description

Contents are loaded from an indicated castle-transform file (by the URL property).

The file should be in the format created by Castle Game Engine Editor (serialized by CastleComponentSerialize routines) with .castle-transform extension.

Hierarchy

Overview

Methods

Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public function PropertySections(const PropertyName: String): TPropertySections; override;

Properties

Published property URL: String read FURL write SetURL;
Published property RevertURL: String read FRevertURL write FRevertURL;

Description

Methods

Public constructor Create(AOwner: TComponent); override;

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public function PropertySections(const PropertyName: String): TPropertySections; override;

This item has no description. Showing description inherited from TCastleComponent.PropertySections.

Section where to show property in the editor.

Properties

Published property URL: String read FURL write SetURL;

Load file with the transform design. The file should be in the format created by Castle Game Engine Editor (see CastleComponentSerialize unit) with .castle-transform extension. Setting this property automatically unloads the previous design, and loads a new one (if the value is <> '').

After loading a design, you can use FindComponent or TComponentHelper.FindRequiredComponent to find the components inside. The owner of the design is this TCastleTransformDesign instance. So e.g. this works:

var
  MyDesign: TCastleTransformDesign;
  MyScene: TCastleScene;
begin
  MyDesign := TCastleTransformDesign.Create(...);
  MyDesign.URL := 'castle-data:/my_transform.castle-transform';
  MyScene := MyDesign.FindRequiredComponent('MyScene') as TCastleScene;
  MyScene.Translation := Vector3(1, 2, 3);
end;

Published property RevertURL: String read FRevertURL write FRevertURL;

URL used to perform editor "Revert" operation.


Generated by PasDoc 0.16.0.