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 with any number of transforms. 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, call SetSelected with exactly one transform. And set Mode to the desired operation, like mmTranslate.
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. In the future, we plan to allow to move/rotate/scale multiple transforms.
Hierarchy
- TObject
- TPersistent
- TComponent
- TCastleTransformManipulate
Overview
Methods
constructor Create(AOwner: TComponent); override; |
|
destructor Destroy; override; |
|
procedure SetSelected(const NewSelected: TComponentList); overload; |
|
procedure SetSelected(const NewSelected: array of TComponent); overload; |
|
function SelectedCount: Integer; |
Properties
property OnTransformModified: TNotifyEvent
read FOnTransformModified write FOnTransformModified; |
|
property OnTransformModifyEnd: TNotifyEvent
read FOnTransformModifyEnd write FOnTransformModifyEnd; |
|
property Pickable: Boolean read FPickable write SetPickable default true; |
|
property Mode: TManipulateMode read FMode write SetMode
default mmSelect; |
|
property Selected[const Index: Integer]: TCastleTransform read GetSelected; |
Description
Methods
constructor Create(AOwner: TComponent); override; |
|
This item has no description. |
destructor Destroy; override; |
|
This item has no description. |
procedure SetSelected(const NewSelected: TComponentList); overload; |
|
Pass a list of TCastleTransform instances to visualize them as selected and to manipulate them (move/rotate/scale). TODO: Right now, manipulating (move/rotate/scale) works only for a single transform. You cannot pass more than one item on the NewSelected list if you want to have move/rotate/scale working. The argument NewSelected may be Instance of other classes on the NewSelected list are allowed, and they are just ignored. The list NewSelected 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 NewSelected: array of TComponent); overload; |
|
This item has no description. |
function SelectedCount: Integer; |
|
Count of currently selected items. See also
|
Properties
property Mode: TManipulateMode read FMode write SetMode
default mmSelect; |
|
Current mode of operation. |
property Selected[const Index: Integer]: TCastleTransform read GetSelected; |
|
Currently selected items, use indexes from 0 to SelectedCount - 1. This is equivalent to the contents of last SetSelected call, but filtered to contain only TCastleTransform instances that can be manipulated. |
Generated by PasDoc 0.16.0-snapshot.