Class TCastleTransformManipulate
Unit
Declaration
type TCastleTransformManipulate = class(TComponent)
Description
Allow to select, move, rotate, scale a group of TCastleTransform instances.
This component implements common 3D editing operations:
Selection (when Mode = mmSelect). To use this, call SetSelected. Multiple transform instances can be selected at once.
This component does never itself change the selected objects. It relies on external code to call SetSelected whenever the selection changes.
This component merely visualizes the selected objects.
Move, rotate or scale a selected transformation. To use this, set MainSelected to the transformation that should be modified, and set Mode to the desired operation.
This component fully implements moving, rotating and scaling. It displays a proper "gizmo" to perform this for user, and it modifies the selected transformation when user drags the gizmo. Use events like OnTransformModified and OnTransformModifyEnd to get notified when the transformation is modified.
TODO: Right now we allow to move/rotate/scale only a single transformation, that's why we rely on the MainSelected property. In the future, we should allow to move/rotate/scale multiple transforms, and then MainSelected property will be removed, and we will just transform all instances given as SetSelected.
Hierarchy
- TObject
- TPersistent
- TComponent
- TCastleTransformManipulate
Overview
Methods
constructor Create(AOwner: TComponent); override; |
|
destructor Destroy; override; |
|
procedure SetSelected(const Selected: TComponentList); overload; |
|
procedure SetSelected(const Selected: array of TComponent); overload; |
Properties
property OnTransformModified: TNotifyEvent
read FOnTransformModified write FOnTransformModified; |
|
property OnTransformModifyEnd: TNotifyEvent
read FOnTransformModifyEnd write FOnTransformModifyEnd; |
|
property MainSelected: TCastleTransform read FMainSelected write SetMainSelected; |
|
property Pickable: Boolean read FPickable write SetPickable default true; |
|
property Mode: TManipulateMode read FMode write SetMode
default mmSelect; |
Description
Methods
constructor Create(AOwner: TComponent); override; |
|
This item has no description. |
destructor Destroy; override; |
|
This item has no description. |
procedure SetSelected(const Selected: TComponentList); overload; |
|
Pass a list of TCastleTransform instances to visualize them as selected. In the future, these will also be used to move/rotate/scale. The argument Selected may be Instance of other classes on the Selected list are allowed, and they are just ignored. The list Selected does not become owned by this class. You can free it whenever you want, even immediately after calling this method, we don't keep any reference to it – we copy the contents. |
procedure SetSelected(const Selected: array of TComponent); overload; |
|
This item has no description. |
Properties
property OnTransformModified: TNotifyEvent
read FOnTransformModified write FOnTransformModified; |
|
Called whenever we modify the MainSelected state by moving/rotating/scaling. Useful e.g. to mark the design as "modified". |
property MainSelected: TCastleTransform read FMainSelected write SetMainSelected; |
|
Current TCastleTransform for potential move/rotate/scale (depending on Mode). TODO: we'd like to remove this property at some point, gizmos to transform should work on multi-selection too, thus rely on SetSelected. |
property Mode: TManipulateMode read FMode write SetMode
default mmSelect; |
|
Current mode of operation. |
Generated by PasDoc 0.16.0-snapshot.