|
|
VRML Script Tutorial
Full list
VRML Interactive Tutorial
Introduction
VRML File Structure
Drawing: Shape node
Geometry Nodes:
Appearance
Let there be Light
Materials with Colored Lights
Hierarchical Node Structures
Inlining Files
Defining and Instancing Nodes
Defining Levels of Detail
Events in VRML
Interpolators
Let the Music Play
Bindable Nodes
Adding Realism to the world
Information about your world
Definition for Auxiliary Nodes
|
|
|
|
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.
|