X3DNode {
  SFNode [in,out] metadata NULL
    range: X3DMetadataNode
    not-slim
    change: chNone
}

X3DBindableNode : X3DChildNode {
  SFBool [in]     set_bind
  SFTime [out]    bindTime
    not-slim
  SFBool [out]    isBound
}

X3DChildNode : X3DNode {
  default-container-field: children
}

X3DInfoNode : X3DChildNode {
}

# Note that we change hierarchy from X3D spec:
# https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/core.html .
# In CGE, X3DMetadataObject descends from X3DNode, unlike in X3D spec.
#
# This makes things simpler as it makes X3DMetadataObject
# a normal class in Pascal (not an interface).
# It doesn't change anything in actual capabilities:
# following X3D spec, metadata may have metadata too.
#
# Note that we rename X3DMetadataObject -> X3DMetadataNode, makes it a natural class.
#
# default-container-field below for this node is actually ignored
# when reading / writing X3D. We use instead
# TAbstractMetadataNode.DefaultContainerFieldInContext
# to account for the fact that X3D 3 and 4 changed it,
# see https://github.com/castle-engine/castle-model-viewer/issues/78 .

X3DMetadataNode : X3DNode {
  default-container-field: metadata
  SFString [in,out] name      ""
    change: chNone
  SFString [in,out] reference ""
    change: chNone
}

X3DSensorNode  : X3DChildNode {
  SFBool [in,out] enabled  TRUE
    change: chNone
  SFBool [out]    isActive
  SFString [in,out] description   ""
    change: chNone
}

MetadataBoolean : X3DMetadataNode {
  MFBool   [in,out] value     []
    change: chNone
}

MetadataDouble : X3DMetadataNode {
  MFDouble [in,out] value     []
    change: chNone
}

MetadataFloat : X3DMetadataNode {
  MFFloat  [in,out] value     []
    change: chNone
}

MetadataInteger : X3DMetadataNode {
  MFInt32  [in,out] value     []
    change: chNone
}

MetadataSet : X3DMetadataNode {
  MFNode   [in,out] value     []
    range: X3DMetadataNode
    change: chNone
}

MetadataString : X3DMetadataNode {
  MFString [in,out] value     []
    change: chNone
}

WorldInfo : X3DInfoNode {
  MFString []       info     []
    change: chNone
  SFString []       title    ""
    change: chNone
}
