Post

BooleanToggle

BooleanToggle

Overview

BooleanToggle maintains state and negates output when a true input is provided.

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

Hierarchy

1
2
3
+ X3DNode
  + X3DChildNode
    + BooleanToggle

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] set_boolean

If input event set_boolean is true, flip state by negating current value of the toggle field

Hint

  • For logical consistency, input event set_boolean false has no effect (under review as part of Mantis issue 519).

Warning

  • It is an error to define this transient inputOnly field in an X3D file, instead only use it a destination for ROUTE events.

SFBool [in, out] toggle FALSE

Persistent state value that gets toggled or reset.

Hint

  • Directly setting a new value for the toggle field generates a corresponding toggle_changed output event.

Advice

Hints

See Also

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