Class TNavigationInfoStack

Unit

Declaration

type TNavigationInfoStack = 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 199).

Hierarchy

Show Additional Members:

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;
Protected procedure DoScheduleBoundChanged;
Public constructor Create(AParentScene: TCastleSceneCore);
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;
Protected procedure DoBoundChanged; override;
Public function Top: TNavigationInfoNode;
Public procedure PushIfEmpty(Node: TNavigationInfoNode; 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 is declared in ancestor TX3DNodeList.

This item has no description.

Source: scene/x3d/x3dnodes_x3dnode.inc (line 1213).

Public function FindName(const Name: string): TX3DNode;

This item is declared in ancestor TX3DNodeList.

Find node by name (TX3DNode.X3DName), Nil if not found.

If called with Name = '', always returns Nil (does not search for node with MyNode.X3DName = '' condition). This follows the meaning of TX3DNode.X3DName: empty means that node has no name, so it should not be found when searching by name, ever.

See also
Returns the node index. This is sometimes more flexible (you can always quickly get actual node knowing the index, by Items[Index], but not the other way around). It is also sometimes less comfortable (often you're not interested in node index).
Find index of a node with given name (TX3DNode.X3DName), -1 if not found.

Source: scene/x3d/x3dnodes_x3dnode.inc (line 1229).

Public function IndexOfName(const Name: string): Integer;

This item is declared in ancestor TX3DNodeList.

Find index of a node with given name (TX3DNode.X3DName), -1 if not found.

Consistently with FindName, always returns -1 when Name = ''.

Source: scene/x3d/x3dnodes_x3dnode.inc (line 1234).

Public procedure AddIfNotExists(const Node: TX3DNode);

This item is declared in ancestor TX3DNodeList.

Add node only if it's not already on the list.

Source: scene/x3d/x3dnodes_x3dnode.inc (line 1237).

Public function Equals(SecondValue: TObject): Boolean; override;

This item is declared in ancestor TX3DNodeList.

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.

Source: scene/x3d/x3dnodes_x3dnode.inc (line 1242).

Public procedure Assign(const Source: TX3DNodeList); overload;

This item is declared in ancestor TX3DNodeList.

Assign from Source. Equivalent to Clear and then AddRange(Source).

Source: scene/x3d/x3dnodes_x3dnode.inc (line 1245).

Public procedure Assign(const Source: array of TX3DNode); overload;

This item is declared in ancestor TX3DNodeList.

Assign from Source. Equivalent to Clear and then AddRange(Source).

Source: scene/x3d/x3dnodes_x3dnode.inc (line 1248).

Protected procedure DoScheduleBoundChanged;

This item is declared in ancestor TX3DBindableStack.

Call DoBoundChanged at the nearest comfortable time. Either now (when not inside BeginChangesSchedule / EndChangesSchedule) or at a closing EndChangesSchedule.

Source: scene/castlescenecore.pas (line 151).

Public constructor Create(AParentScene: TCastleSceneCore);

This item is declared in ancestor TX3DBindableStack.

This item has no description.

Source: scene/castlescenecore.pas (line 153).

Public procedure PushIfEmpty(Node: TAbstractBindableNode; SendEvents: boolean);

This item is declared in ancestor TX3DBindableStack.

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.

Source: scene/castlescenecore.pas (line 163).

Public procedure CheckForDeletedNodes(const RootNode: TX3DRootNode; const SendEvents: boolean);

This item is declared in ancestor TX3DBindableStack.

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).

Source: scene/castlescenecore.pas (line 173).

Public procedure Set_Bind(Node: TAbstractBindableNode; const Value: boolean); override;

This item is declared in ancestor TX3DBindableStack.

Handle set_bind event send to given Node. This always generates appropriate events.

Source: scene/castlescenecore.pas (line 178).

Protected procedure DoBoundChanged; override;

This item has no description. Showing description inherited from TX3DBindableStack.DoBoundChanged.

Notification when the currently bound node, that is Top, changed. In this class, just calls OnBoundChanged if assigned.

Source: scene/castlescenecore.pas (line 201).

Public function Top: TNavigationInfoNode;

This item has no description.

Source: scene/castlescenecore.pas (line 203).

Public procedure PushIfEmpty(Node: TNavigationInfoNode; SendEvents: boolean);

This item has no description.

Source: scene/castlescenecore.pas (line 204).

Properties

Public property AutoRemove: Boolean read FAutoRemove write SetAutoRemove default false;

This item is declared in ancestor TX3DNodeList.

If True then destroyed nodes will be automatically removed from this list. This allows you to safely destroy node instances during the lifetime of this list, without worrying that some dangling pointers remain on this list.

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.

Source: scene/x3d/x3dnodes_x3dnode.inc (line 1260).

Public property ParentScene: TCastleSceneCore read FParentScene;

This item is declared in ancestor TX3DBindableStack.

This item has no description.

Source: scene/castlescenecore.pas (line 155).

Public property OnBoundChanged: TNotifyEvent read FOnBoundChanged write FOnBoundChanged;

This item is declared in ancestor TX3DBindableStack.

Notification when the currently bound node, that is Top, changed. This also includes notification when Top changed to (or from) Nil, that is when no node becomes bound or when some node is initially bound.

Source: scene/castlescenecore.pas (line 184).


Generated by PasDoc 0.17.0.snapshot.