Post

VisibilitySensor

VisibilitySensor

Overview

VisibilitySensor detects when user can see a specific object or region as they navigate the world. The region sensed for visibility to the user is bounded by a rectangular box.

The VisibilitySensor node belongs to the EnvironmentalSensor component and requires at least level 2, its default container field is children. It is available since VRML 2.0 and from X3D version 3.0 or higher.

Hierarchy

1
2
3
4
5
+ X3DNode
  + X3DChildNode
    + X3DSensorNode
      + X3DEnvironmentalSensorNode
        + VisibilitySensor

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

SFString [in, out] description “”

Author-provided prose that describes intended purpose of the node.

Hint

  • Many XML tools substitute XML character references for special characters automatically if needed within an attribute value (such as & for & ampersand character, or " for “ quotation-mark character).

SFBool [in, out] enabled TRUE

Enables/disables node operation.

SFVec3f [in, out] size 0 0 0 [0,∞)

size of Proximity box around center location, oriented within local transformation frame.

Hint

  • size 0 0 0 is same as enabled false.

SFVec3f [in, out] center 0 0 0 (-∞,∞)

Position offset from origin of local coordinate system.

SFTime [out] enterTime

Time event generated when user’s camera enters the box.

Warning

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

SFTime [out] exitTime

Time event generated when user’s camera exits the box.

Warning

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

SFBool [out] isActive

isActive true/false events are sent as viewer enters/exits Proximity box. isActive=true when viewer enters Proximity box, isActive=false when viewer exits Proximity box.

Warning

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

Advice

Hints

  • Often used to attract user attention or improve performance.
  • This sensor detects user interactions affecting peer nodes and their child geometry.

Example

See Also

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