Class TX3DBindableStack

Unit

Declaration

type TX3DBindableStack = class(TX3DBindableStackBasic)

Description

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.

Hierarchy

Overview

Methods

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;

Properties

Public property ParentScene: TCastleSceneCore read FParentScene;
Public property OnBoundChanged: TNotifyEvent read FOnBoundChanged write FOnBoundChanged;

Description

Methods

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 Nil if not present.

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 set_bind event send to given Node. This always generates appropriate events.

Properties

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) Nil, that is when no node becomes bound or when some node is initially bound.


Generated by PasDoc 0.16.0-snapshot.