Class TViewpointStack
Unit
Declaration
type TViewpointStack = class(TX3DBindableStack)
Description
This item has no description. Showing description inherited from TX3DBindableStack.
Stack of bindable nodes (only the top, bound, node is used for rendering/navigation). This keeps a stack of TAbstractBindableNode, with comfortable routines to examine top and push/pop from top. The stack is actually stored as a list, with the last item being the top one.
Source: scene/castlescenecore.pas (line 207).
Hierarchy
- TObject
- TList
- TObjectList
- TX3DNodeList
- TX3DBindableStackBasic
- TX3DBindableStack
- TViewpointStack
Overview
Methods
| Protected | procedure Notify( constref Value: TX3DNode; Action: TCollectionNotification); override; |
| Public | function FindName(const Name: string): TX3DNode; |
| Public | function IndexOfName(const Name: string): Integer; |
| Public | procedure AddIfNotExists(const Node: TX3DNode); |
| Public | function Equals(SecondValue: TObject): Boolean; override; |
| Public | procedure Assign(const Source: TX3DNodeList); overload; |
| Public | procedure Assign(const Source: array of TX3DNode); overload; |
| Public | procedure Set_Bind(Node: TAbstractBindableNode; const Value: boolean); virtual; abstract; |
| Protected | procedure DoBoundChanged; virtual; |
| Protected | procedure DoScheduleBoundChanged; |
| Public | constructor Create(AParentScene: TCastleSceneCore); |
| Public | function Top: TAbstractBindableNode; |
| Public | procedure PushIfEmpty(Node: TAbstractBindableNode; SendEvents: boolean); |
| Public | procedure CheckForDeletedNodes(const RootNode: TX3DRootNode; const SendEvents: boolean); |
| Public | procedure Set_Bind(Node: TAbstractBindableNode; const Value: boolean); override; |
| Public | function Top: TAbstractViewpointNode; |
| Public | procedure PushIfEmpty(Node: TAbstractViewpointNode; SendEvents: boolean); |
Properties
| Public | property AutoRemove: Boolean read FAutoRemove write SetAutoRemove default false; |
| Public | property ParentScene: TCastleSceneCore read FParentScene; |
| Public | property OnBoundChanged: TNotifyEvent read FOnBoundChanged write FOnBoundChanged; |
Description
Methods
| Protected | procedure Notify( constref Value: TX3DNode; Action: TCollectionNotification); override; |
|
This item has no description. | |
| Public | function FindName(const Name: string): TX3DNode; |
|
Find node by name (TX3DNode.X3DName), If called with Name = '', always returns See also
| |
| Public | function IndexOfName(const Name: string): Integer; |
|
Find index of a node with given name (TX3DNode.X3DName), -1 if not found. Consistently with FindName, always returns -1 when Name = ''. | |
| Public | procedure AddIfNotExists(const Node: TX3DNode); |
|
Add node only if it's not already on the list. | |
| Public | function Equals(SecondValue: TObject): Boolean; override; |
|
Does the SecondValue list has equal length and instances. The instances on the list are compared exactly, i.e. reference must match, not only some node properties. | |
| Public | procedure Assign(const Source: TX3DNodeList); overload; |
|
Assign from Source. Equivalent to Clear and then AddRange(Source). | |
| Public | procedure Assign(const Source: array of TX3DNode); overload; |
|
Assign from Source. Equivalent to Clear and then AddRange(Source). | |
| Public | procedure Set_Bind(Node: TAbstractBindableNode; const Value: boolean); virtual; abstract; |
|
Handle | |
| Protected | procedure DoBoundChanged; virtual; |
|
Notification when the currently bound node, that is Top, changed. In this class, just calls OnBoundChanged if assigned. | |
| Protected | procedure DoScheduleBoundChanged; |
|
Call DoBoundChanged at the nearest comfortable time. Either now (when not inside BeginChangesSchedule / EndChangesSchedule) or at a closing EndChangesSchedule. | |
| Public | constructor Create(AParentScene: TCastleSceneCore); |
|
This item has no description. | |
| Public | function Top: TAbstractBindableNode; |
|
Returns top item on this stack, or | |
| Public | procedure PushIfEmpty(Node: TAbstractBindableNode; SendEvents: boolean); |
|
Add new node to the top, but only if stack is currently empty. If SendEvents, then isBound = true and bindTime events will be send to newly bound node. | |
| Public | procedure CheckForDeletedNodes(const RootNode: TX3DRootNode; const SendEvents: boolean); |
|
Use when you suspect that some nodes on the stack are no longer present in VRML/X3D graph RootNode (they were deleted). In this case, they have to be removed from stack. If this will change the currently bound node, then the new bound node will receive isBound = true and bindTime events (the old node will not receive any set_bind = false or isBound = false events, since it may be destroyed by now). | |
| Public | procedure Set_Bind(Node: TAbstractBindableNode; const Value: boolean); override; |
|
Handle | |
| Public | function Top: TAbstractViewpointNode; |
|
This item has no description. | |
| Public | procedure PushIfEmpty(Node: TAbstractViewpointNode; SendEvents: boolean); |
|
This item has no description. | |
Properties
| Public | property AutoRemove: Boolean read FAutoRemove write SetAutoRemove default false; |
|
If You can only change this property when the list is empty. Otherwise we could have a weird situation when some nodes are automatically removed from the list, and some are not, which seems counter-intuitive. Internally, this is done using TX3DNode.AddDestructionNotification. | |
| Public | property ParentScene: TCastleSceneCore read FParentScene; |
|
This item has no description. | |
| Public | property OnBoundChanged: TNotifyEvent read FOnBoundChanged write FOnBoundChanged; |
|
Notification when the currently bound node, that is Top, changed. This also includes notification when Top changed to (or from) | |
Generated by PasDoc 0.17.0.snapshot.