Sidebar


Setting Up Larget Worlds

Multiple Vistas can be used together in order to give the effect of a larger, more complex space. For example, each room in a house might be represented by a Vista node. Because Image Worlds is an extension to standard VRML, Vistas may be included in a file any way the author chooses. However, RealSpace suggests navigating between multiple Vistas using a Switch node. A multiple-Vista world is set up in two stages: First, all the Vistas are arranged inside a Switch group; second, Script nodes are set up for the user to navigate from one node to another. Hot spots sensitive to mouse activity are designated on the surface of the panorama.

The world in the Listing One sample contains two Vistas; Node0 and Node1. When the file is opened, the user sees Node0 because the Switch node's whichChoice field names it. To jump to Node1, the whichChoice field must be changed to the value 1, which is accomplished by using VRML Script nodes. RealVR Traveler has a built-in mechanism for creating such scripts, so Java and VRML Script programming are unnecessary.

The user tells the RealVR Traveler to use its built-in linking script by adding Script nodes to the VRML scene with URLs of "rst:link". Each node's SFVec2f value must then be routed to the clickPt eventIn of the corresponding script. When jumping between Vistas, the user typically routes the clickPt eventOut of a Vista to the clickPt eventIn of this script. Then a value_changed eventOut is generated from this script if the user made a "legal" click. The contents of value_changed come from the outValue field of the script, typically of type SFInt32, are routed back to the Switch node to change the current Vista. --S.W.