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

Bindable Nodes


Bindable nodes are a special type of node in the sense that only one of each can be active at a certain type. Bindable nodes provide information about the environment and the user. The following nodes are bindable nodes:

  • Viewpoint: specifies the position of the user
  • NavigationInfo: specifies features of the user
  • Fog: adds atmosphere to the scene
  • Background: provides a sky, and background images that can enhance dramatically the scene.
  • When the scene is loaded the first of each of these nodes to be found becomes active, i.e. is bound (nodes within inlined files do not count). The bound nodes are put on the top of a stack. There is a stack for each type of node.

    When a node is bound it generates the boolean event isBound with the value TRUE.

    In order to bound a node, for instance to change the background, an event set_Bind with the value TRUE should be routed to the node. The newly bounded node goes to the top of the respective stack. The previously bound node sends an event isBound with value FALSE, and the newly bound node sends an isBound event with value TRUE.

    In order to unbind a node an event set_Bind with the value FALSE should be sent to the respective node. The unbounded node sends an event isBound with value FALSE and is pushed from the top of the stack. The node which is now in the top of the stack becomes the active node, i.e. it becomes bounded, and it sends an event isBound with value TRUE.

    If a node which is not bound but is in the stack receives an event set_Bind with the value FALSE, the node is removed from the stack. If the node is not in the stack the event is ignored.