Class TVRML1State
Unit
X3DNodes
Declaration
type TVRML1State = class(TObject)
Description
Nodes that are saved during VRML/X3D traversing. Used for TX3DGraphTraverseState.VRML1State. These nodes affect some following nodes in the graph, in VRML 1.0.
They are never Nil
after a TX3DNode.Traverse operation. the traversing code always takes care to initialize them to default nodes at the beginning.
For all nodes enumerated here: it's guaranteed they don't affect the state (TX3DGraphTraverseState) during traversing (that is, they don't do anything special in TX3DNode.BeforeTraverse / TX3DNode.MiddleTraverse / TX3DNode.AfterTraverse). So it's guaranteed that changing some field's value of a node within TVRML1State
affects only the shapes that have given node inside State.VRML1State. TCastleSceneCore.InternalChangedField depends on that.
Hierarchy
Overview
Methods
Properties
Description
Methods
|
destructor Destroy; override; |
Destructor automatically frees and nils all Nodes that are owned.
|
|
procedure CreateNodes; |
Create and assign all Nodes. All nodes become owned.
|
|
procedure Assign(const Source: TVRML1State); |
Assign from Source.
During doing this, old nodes are freed if they were owned. New nodes are not owned.
This takes care of checking for each TVRML1StateNode if the old node is equal to new one. If yes, then the node if not freed (regardless of "owned" status), and the "owned" status is left as-is (not chaned to false). This way calling something like MyState.Assign(MyState) is a valid and harmless operation.
|
|
procedure SetOwnNode(const StateNode: TVRML1StateNode; const Node: TX3DNode); |
Set the node, and make it owned by this class. Contrast this with Nodes[StateNode] := Node that makes the node not owned. This is just a shortcut for
Nodes[StateNode] := Node;
Owned[StateNode] := true;
|
Properties
Generated by PasDoc 0.16.0.