Class TVRML1State

Unit

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

  • TObject
  • TVRML1State

Overview

Methods

Public function Coordinate3: TCoordinate3Node_1;
Public function ShapeHints: TShapeHintsNode_1;
Public function FontStyle: TFontStyleNode_1;
Public function Material: TMaterialNode_1;
Public function MaterialBinding: TMaterialBindingNode_1;
Public function Normal: TNormalNode;
Public function NormalBinding: TNormalBindingNode_1;
Public function Texture2: TTexture2Node_1;
Public function TextureCoordinate2: TTextureCoordinate2Node_1;
Public destructor Destroy; override;
Public procedure CreateNodes;
Public procedure Assign(const Source: TVRML1State);
Public procedure SetOwnNode(const StateNode: TVRML1StateNode; const Node: TX3DNode);

Properties

Public property Nodes [const StateNode: TVRML1StateNode]: TX3DNode read GetNode write SetNode;

Description

Methods

Public function Coordinate3: TCoordinate3Node_1;

This item has no description.

Public function ShapeHints: TShapeHintsNode_1;

This item has no description.

Public function FontStyle: TFontStyleNode_1;

This item has no description.

Public function Material: TMaterialNode_1;

This item has no description.

Public function MaterialBinding: TMaterialBindingNode_1;

This item has no description.

Public function Normal: TNormalNode;

This item has no description.

Public function NormalBinding: TNormalBindingNode_1;

This item has no description.

Public function Texture2: TTexture2Node_1;

This item has no description.

Public function TextureCoordinate2: TTextureCoordinate2Node_1;

This item has no description.

Public destructor Destroy; override;

Destructor automatically frees and nils all Nodes that are owned.

Public procedure CreateNodes;

Create and assign all Nodes. All nodes become owned.

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

Public 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

Public property Nodes [const StateNode: TVRML1StateNode]: TX3DNode read GetNode write SetNode;

Last nodes that occured when visiting this VRML 1.0 graph, indexed by TVRML1StateNode.


Generated by PasDoc 0.16.0-snapshot.