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

ZF~ 4 Xy,ox³rXRlL{E@\O66 MjbFB^WYݛ0KիkU¯ok 3=ӱHC{Qx 08K8|>\bI}(-$qҙlcFX'&1E,DCsUu˺^ͺuu%,|Ϳ6k$Z[o1XUz5y}ݫDg%4?Ou|{Q,^8(usZߛY%p`"m-\ Iԧw2Be#?j̯}"Y*xv2%H6H ? Pb3/Nهg3U0 h'fz.#1!tӱҧT $'_*H-I@Ƿ,Dir+ƷyR\ƌ>zt> bJI?yt%ҧ_ @4^C ’&^zaʼ0lɆB0I0;cru qijQЁ6Wܲ4!yx$&Ƴ4ć)BЦ Bv:yu3AO) IJ5BCR#$/x:*7E#JS :]& (d[삡jT>{J7?O h}44Ma,, IGb-t#9nv4Ck=g"nyKϷ@Ql*"&!zg*|HgU!f^#e,qﮅ S>) )B.yJ(/ "%Qh=.)[gxdq ɐ*@Jx(t. e}Jj@i_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:6}7sY5K'(uO68?+=YjLLeBsգ7 {`>}ɞ,] DM?Js$钏{ͦz2W~"ܾ>߾m^mű *)ny̿gxZ0XeSˆ#˜-Beu}=OZ; - {8ͽ=mRNThb+V J@x8]HVtEz{]鐤eR0}o8Aʹ2w&>h*V ;chv48Vhw1QF0͈JQBse9K؝0չq Ž:8 FxO0OGG8z0ˋ'wWgw~OƒcЋ ڶʐnH3i1h㥙1`]ŞƬ_LTi]zIqTmctA.e_؜jV[c/Ъj/ >訸W葤X>5+yVƘ ~3ʱ+Yx,#3WeZ_V79>3&s͡?5EG7#)Ҍ | +>{Q޾k{ӣ: ڃ}S PNUT+!O-j3}zBݛG?usCHE3whdzP5~WOl8qhQhRR(IY ^4љ`FeQ,Lu/䂺2uGJ4Kd6*{r=` v)U+Nu*lxlyYXJveeB=S #X4_="6%0JQIR*啃Y J+"͉)m~Y}l * eyaL04;V=*z+-{acdWNFHGլf _N^S5Hگ1%=GTFm<(687pPJ&M9%hV|Px&2G XVoPvnZ(zuF{W2R,ԾLUղ9O6JƵrzڝ*N9 U,*ePU9Xf;Zey ]Pг'chԫaO8 ~|&|X0LN= y;h*G `+y1 qՒeE-BmU+S5|ODPJZ5jBijH\X.QTm=;5"/o4$\zT)boZRDJVWXvkOu.TΞ"j58Μ I jzPDp1W(RԺP.]\_mbUAvʺhE>IB/D -{xQ 垾 aj R>i֡H=XlG2[uP>nĝO>x)'Gϲ#^Q8I]n8&Q4b <Llw>mC:24uRu@~6*n/p)?`N~9Λӳu.)ƚkxN_֠ {uo@9'H{v+VI`r ī\|igF$EL-|Vϖ {ja[쨶y}?u>QF8 $
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