Post

Layer

Overview

Layer contains a list of children nodes that define the contents of the layer.

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

Hierarchy

1
2
3
+ X3DNode
  + X3DLayerNode
    + Layer

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

SFBool [in, out] pickable TRUE

pickable determines whether pick traversal is performed for this layer.

MFString [in, out] objectType “ALL” [“ALL”, “NONE”, “TERRAIN”, …]

The objectType field specifies a set of labels used in the picking process. Each string specified is treated as an independent label that needs to be matched against the same type in one of the pick sensor instances. Example: labeling a PickableGroup with the objectType value “WATER” and then attempting to intersect a pick sensor with objectType value “GROUND” fails since the objectType values do not match. Example: the special value “ALL” means that each node is available for picking regardless of the type specified by the pick sensor. Example: the special value “NONE” effectively disables all picking for this node and is the equivalent of setting the pickable field to false.

Hints

  • Authors may define any value for objectType.
  • MFString arrays can have multiple values, so “separate each individual string” “by using quote marks”.

SFBool [in, out] visible TRUE

Whether or not renderable content within this node is visually displayed.

Hints

  • The visible field has no effect on animation behaviors, event passing or other non-visual characteristics.
  • Content must be visible to be collidable and to be pickable.

SFNode [in, out] viewport NULL [X3DViewportNode]

The viewport field is a single Viewport node that constrains layer output to a sub-region of the render surface.

MFNode [in] addChildren

Input field addChildren.

MFNode [in] removeChildren

Input field removeChildren.

MFNode [in, out] children [ ] [X3DChildNode]

Nodes making up this layer.

Hints

  • No transformations are possible above each LayerSet/Layer combination in the scene graph hierarchy.
  • InputOnly MFNode addChildren field can append new X3DChildNode nodes via a ROUTE connection, duplicate input nodes (i.e. matching DEF, USE values) are ignored.
  • InputOnly MFNode removeChildren field can remove nodes from the children list, unrecognized input nodes (i.e. nonmatching DEF, USE values) are ignored.
  • X3D Architecture 10.2.1 Grouping and children node types

Advice

Hints

  • No transformations are possible above each LayerSet/Layer combination in the scene graph hierarchy.
  • Each Layer node contains its own binding stacks and thus has its own viewpoints and navigation.

See Also

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