Lighthouse3d.com

Send me bugs and suggestions, please
VRML Script Tutorial
Full list

VRML Interactive Tutorial

Introduction
VRML File Structure
Drawing: Shape node
Geometry Nodes:
Box
Sphere
Cone
Cylinder
PointSet
IndexedLineSet
IndexedFaceSet
Extrusion
ElevationGrid
Example: Chessboard
Text
FontStyle
Appearance
Material
Textures
Image Texture
Movie Texture
Pixel Texture
Texture Coordinate
Texture Transform
Let there be Light
Directional Light
Point Light
Spot Light
Materials with Colored Lights
Hierarchical Node Structures
Group
Transform
Collision
Anchor
Billboard
Switch
Inlining Files
Defining and Instancing Nodes
Defining Levels of Detail
Events in VRML
Creating Paths between events: ROUTE
Generating Events based on Timers or User Actions
Timers
Touch Sensor
Visibility Sensor
Dragging Sensors
Plane Sensor
Sphere Sensor
Cylinder Sensor
Proximity Sensors
Example: Proximity sensor
Interpolators
Color
Coordinate
Normal
Orientation
Position
Scalar
Example
Let the Music Play
Sound
AudioClip
Bindable Nodes
Who Am I: NavigationInfo
Where Am I: ViewPoint
Adding Realism to the world
Background
Fog
Information about your world
WorldInfo
Definition for Auxiliary Nodes
Coordinate
Color
Normal

Page not found » Lighthouse3d.com
Help end child hunger

Error 404 - Not Found

Sorry, the page that you are looking for does not exist.

VisibilitySensor Node


The VisibilitySensor node is used to detect visibility changes in a virtual box, generating events when the visibility status changes. This sensor does not relate to the shapes defined within the same group, i.e. it does not detect if a shape within a group is visible or not. The Visibility sensor does not detect if the box is hidden from view due to other shapes in the scene. The sensor behaves as if there were no other shapes being drawn.

The following fields are present:
  • center: The center of the rectangular box
  • size: The dimensions of the rectangular box
  • enabled: determines the status of the sensor.
  • The following events are generated by this sensor:
  • enterTime: outputs the time when the box becomes visible
  • exitTime: outputs the time when the box stops being visible
  • isActive: outputs TRUE when the box becomes visible, and FALSE when the box becomes invisible


  • Syntax:
    VisibilitySensor {
    enabled TRUE
    center 0 0 0
    size 0 0 0
    }


    When defining several VisibilitySensor inside nested groups, all the sensors will generate events when the respective boxes are visible.

    Example of a VisibilitySensor to play a sound. When the Shape becomes visible you should hear a sound.

    The following source code describes a group with a Visibility Sensor, a Shape and a Sound.

    Example:
    #VRML V2.0 utf8 Group {
      children [
        DEF vs VisibilitySensor { size 1 1 1}
        Sound { source DEF ac AudioClip { loop FALSE url "sfx.mid" } }
        Shape { geometry Box { size 1 1 1 }
      ]
    } ROUTE vs.enterTime TO ac.set_startTime