Post

LayerSet

LayerSet

Overview

LayerSet defines a list of layers and a rendering order. The rendering order is specified by the order field.

The LayerSet node belongs to the Layering component and requires at least level 1, its default container field is children. It is available from X3D version 3.2 or higher.

Hierarchy

1
2
+ X3DNode
  + LayerSet

Fields

SFNode [in, out] metadata NULL [X3DMetadataObject]

Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.

Hint

SFInt32 [in, out] activeLayer 0 (0,∞)

activeLayer field specifies the layer in which navigation takes place.

Hint

  • Nodes that are not part of a layer are considered to be in layer 0.

MFInt32 [in, out] order [ 0 ] (0,∞)

The order list defines the order in which layers are rendered. Each value corresponds to the ordinals of the layers.

Hint

  • The order list may contain repetitions of ordinal values, in which case the layer is rendered again.

Warnings

  • If order contains number values that are not ordinals assigned to layers, such numbers are ignored.
  • Layers that are not included in the order list are not rendered.

MFNode [in, out] layers [ ] [X3DLayerNode]

The layers list defines a list of Layer nodes that contain the constituent parts of the scene. Each layer is assigned an ordinal number depending on its position in this contained list of nodes.

Hints

  • Ordinal values start with the numeral 1 representing the first item in the list.
  • Nodes that are not part of a layer are considered to be in layer 0.

Advice

Hints

  • The layer first specified in the order field is the first layer rendered and appears below any other layers. The layer last specified in the order field is the last layer rendered and correspondingly appears on top of all other layers.
  • X3D Architecture 35.2.1 Overview of layering

Warning

  • Only one LayerSet node is allowed in a scene, and it shall be a root node at the top of the scene graph.

Example

See Also

This post is licensed under CC BY 4.0 by the author.