Class TX3DUnknownNode

Unit

Declaration

type TX3DUnknownNode = class(TX3DNode)

Description

Not recognized VRML/X3D node type. Used for nodes found when parsing VRML/X3D file that are not implemented.

TX3DUnknownNode is parsed (in classic VRML encoding) in a special way, to be able to omit it gracefully. While such "unknown" node doesn't really do match in our graph, it works correctly with VRML/X3D DEF/USE mechanism.

Never instantiate this class by a standard constructor. Always use CreateUnknown constructor, this way we can safely assume that X3DType is always correctly set.

Hierarchy

Overview

Methods

Protected function DeepCopyCreate(CopyState: TX3DNodeDeepCopyState): TX3DNode; override;
Public function X3DType: string; override;
Public procedure Parse(Lexer: TX3DLexer; Reader: TX3DReaderNames); override;
Public constructor Create(const AName: string; const ABaseUrl: String); override;
Public constructor CreateUnknown(const AName, ABaseUrl: String; const AX3DType :string);

Description

Methods

Protected function DeepCopyCreate(CopyState: TX3DNodeDeepCopyState): TX3DNode; override;

This item has no description. Showing description inherited from TX3DNode.DeepCopyCreate.

This should be a mere call to constructor of your own class.

In TX3DNode, this simply calls default virtual constructor, which is Ok for all normal nodes. But we have some special nodes, like TX3DPrototypeNode or TX3DUnknownNode, that simply cannot be created by default constructor. They need to override this.

Public function X3DType: string; override;

This item has no description. Showing description inherited from TX3DNode.X3DType.

Type of the node in X3D, like 'Group' or 'Shape'. Never empty. Constant for the class lifetime (even for special TX3DUnknownNode and TX3DPrototypeNode, where this is calculated at runtime).

Note that VRML/X3D is generally case-sensitive, so this property is too.

In TX3DNode, this returns ClassX3DType, which is suitable for most nodes. See ClassX3DType.

Public procedure Parse(Lexer: TX3DLexer; Reader: TX3DReaderNames); override;

This item has no description. Showing description inherited from TX3DNode.Parse.

Parse node. This should set values of your fields, VRML 1.0 Children list, BaseUrl.

In special cases like TX3DUnknownNode this may actually initialize whole Fields list (by VRML 1.0 "fields" extensibility feature).

Public constructor Create(const AName: string; const ABaseUrl: String); override;

base Create will throw exception. Always use CreateUnknown*

Public constructor CreateUnknown(const AName, ABaseUrl: String; const AX3DType :string);

This item has no description.


Generated by PasDoc 0.16.0-snapshot.