Class TAbstractNode

Unit

Declaration

type TAbstractNode = class(TX3DNode)

Description

Base X3D node that can have some metadata.

Hierarchy

Overview

Methods

Public procedure InternalInsertMetadata(const M: TAbstractMetadataNode);
Public function FindMetadata(const Key: String): TAbstractMetadataNode;
Public procedure CreateNode; override;
Public class function ClassX3DType: string; override;

Properties

Public property MetadataBoolean[constKey:String]: Boolean read GetMetadataBoolean write SetMetadataBoolean;
Public property MetadataBooleanArray[constKey:String;constIndex:Cardinal]: Boolean read GetMetadataBooleanArray write SetMetadataBooleanArray;
Public property MetadataString[constKey:String]: String read GetMetadataString write SetMetadataString;
Public property MetadataStringArray[constKey:String;constIndex:Cardinal]: String read GetMetadataStringArray write SetMetadataStringArray;
Public property MetadataInteger[constKey:String]: Integer read GetMetadataInteger write SetMetadataInteger;
Public property MetadataIntegerArray[constKey:String;constIndex:Cardinal]: Integer read GetMetadataIntegerArray write SetMetadataIntegerArray;
Public property MetadataDouble[constKey:String]: Double read GetMetadataDouble write SetMetadataDouble;
Public property MetadataDoubleArray[constKey:String;constIndex:Cardinal]: Double read GetMetadataDoubleArray write SetMetadataDoubleArray;
Public property FdMetadata: TSFNode read FFdMetadata;
Public property Metadata: TAbstractMetadataNode read GetMetadata write SetMetadata;

Description

Methods

Public procedure InternalInsertMetadata(const M: TAbstractMetadataNode);
 
Public function FindMetadata(const Key: String): TAbstractMetadataNode;

Find a "metadata" information within this node with given key. Returns Nil if not found.

This seeks for a TAbstractMetadataNode instance within the X3D "metadata" field of this node. Looks for TAbstractMetadataNode with TAbstractMetadataNode.NameField matching the parameter Key. Note that X3D spec allows multiple metadata nodes to share the same key, this method only finds the first one.

It ignores TMetadataSet when searching, as TMetadataSet doesn't contain any simple data, it serves only as container for other metadata nodes.

Public procedure CreateNode; override;
 
Public class function ClassX3DType: string; override;
 

Properties

Public property MetadataBoolean[constKey:String]: Boolean read GetMetadataBoolean write SetMetadataBoolean;

Get/set metadata, identified by a given Key, as a Boolean. "Metadata" is any value you want to save with this node, it has no effect on the rendering/behavior. This property hides various complexities of the X3D metadata nodes.

This property looks for a TMetadataBooleanNode node inside the "metadata" of this node using FindMetadata. If found, it allows to operate TMetadataBooleanNode.FdValue array. The MetadataBooleanArray allows to get/set appropriate items of this array. The MetadataBoolean simply gets/sets the first array item.

If such metadata node is not found, or it's TMetadataBooleanNode.FdValue array is too short, this returns false. When setting, it adds such metadata node if necessary, and increases the TMetadataBooleanNode.FdValue array length if necessary.

Public property MetadataBooleanArray[constKey:String;constIndex:Cardinal]: Boolean read GetMetadataBooleanArray write SetMetadataBooleanArray;
 
Public property MetadataString[constKey:String]: String read GetMetadataString write SetMetadataString;

Get/set metadata, identified by a given Key, as a String. "Metadata" is any value you want to save with this node, it has no effect on the rendering/behavior. This property hides various complexities of the X3D metadata nodes.

This property looks for a TMetadataStringNode node inside the "metadata" of this node using FindMetadata. If found, it allows to operate TMetadataStringNode.FdValue array. The MetadataStringArray allows to get/set appropriate items of this array. The MetadataString simply gets/sets the first array item.

If such metadata node is not found, or it's TMetadataStringNode.FdValue array is too short, this returns ''. When setting, it adds such metadata node if necessary, and increases the TMetadataStringNode.FdValue array length if necessary.

Public property MetadataStringArray[constKey:String;constIndex:Cardinal]: String read GetMetadataStringArray write SetMetadataStringArray;
 
Public property MetadataInteger[constKey:String]: Integer read GetMetadataInteger write SetMetadataInteger;

Get/set metadata, identified by a given Key, as a Integer. "Metadata" is any value you want to save with this node, it has no effect on the rendering/behavior. This property hides various complexities of the X3D metadata nodes.

This property looks for a TMetadataIntegerNode node inside the "metadata" of this node using FindMetadata. If found, it allows to operate TMetadataIntegerNode.FdValue array. The MetadataIntegerArray allows to get/set appropriate items of this array. The MetadataInteger simply gets/sets the first array item.

If such metadata node is not found, or it's TMetadataIntegerNode.FdValue array is too short, this returns 0. When setting, it adds such metadata node if necessary, and increases the TMetadataIntegerNode.FdValue array length if necessary.

Public property MetadataIntegerArray[constKey:String;constIndex:Cardinal]: Integer read GetMetadataIntegerArray write SetMetadataIntegerArray;
 
Public property MetadataDouble[constKey:String]: Double read GetMetadataDouble write SetMetadataDouble;

Get/set metadata, identified by a given Key, as a Double. "Metadata" is any value you want to save with this node, it has no effect on the rendering/behavior. This property hides various complexities of the X3D metadata nodes.

This property looks for a TMetadataDoubleNode or TMetadataFloatNode node inside the "metadata" of this node using FindMetadata. If found, it allows to operate TMetadataDoubleNode.FdValue array or TMetadataFloatNode.FdValue array. The MetadataDoubleArray allows to get/set appropriate items of this array. The MetadataDouble simply gets/sets the first array item.

If such metadata node is not found, or it's TMetadataDoubleNode.FdValue array is too short, this returns 0.0. When setting, it adds such metadata node if necessary, and increases the TMetadataDoubleNode.FdValue array length if necessary.

Public property MetadataDoubleArray[constKey:String;constIndex:Cardinal]: Double read GetMetadataDoubleArray write SetMetadataDoubleArray;
 
Public property FdMetadata: TSFNode read FFdMetadata;

Internal wrapper for property Metadata. This wrapper API may change, we advise to access simpler Metadata instead.

Public property Metadata: TAbstractMetadataNode read GetMetadata write SetMetadata;
 

Generated by PasDoc 0.16.0.