<user> ‐ A user
This element defines a user inside a scene graph. There can be several users inside a scene. Each active window is associated with a unique user. The active user is the current user associated with the selected window layout of the windows element in the environment node of the configuration file,
Each user has a current viewpoint chosen among the viewpoints defined in the current scene and the base viewpoint (a default viewpoint located at the origin). It is defined in its viewpoints child node. The view_volume child node defines the type of projection and the associated view volume. The navigation child node defines the parameters of the user motion in the coordinate system of its current viewpoint.
For each active user there is only one current viewpoint at a time. The viewpoint of each user can be modified interactively through predefined commands as described in Section 3.2.2, through a definition of successive shots in the configuration file (see environment node), or through the script commands set_current_viewpoint and set_viewpoint. Mouse motion controls the location of the active user in the coordinate system of its current viewpoint.
The boolean value of the sound_listener attribute defines whether a user is listening to sounds. If the boolean value is true, a default hearpoint is located at the user's viewpoint. In this case, the relative location of the user with respect to the sound sources is used to send messages for spatialized sound synthesis (see Figure 5-9). If desired, other active hearpoints can be defined for multi-point sound listening.
If the boolean value of the alternate_stereo_viewer attribute is true, the graphical rendering is made by alternating between the viewpoints of two users. This used for stereo rendering through devices that require switching every other frame to your right then left eye. In this case, viewpoints should provide two default viewpoints (a right one and a left one) and each shot should contain two viewpoints instead of one.
The end and the beginning of navigation are triggered by pressing and releasing the mouse button defined for navigation through the mouse_navigation attribute of the window layout element in the configuration file.. Beginnning and end of navigation cause messages sensor-mouse-navigation and sensor-mouse-end-navigation to be sent to all the active users (users currently bound to one of the window layouts).
This element expects the following elements: viewpoints, view_volume, and navigation. User interpolation implies interpolation of the embedded view_volumes.
The example below defines a user named user_#11. The projection is orthogonal. The user starts at the origin of the coordinate system of view point #3 with a rotation of 180 degrees. The background color of the window layout linked with this user is red. This user outputs sound location messages for sound spatialization.
<user id="user_#11" sound_listener="true"
r="1" g="0" b="0" >
<viewpoints default_viewpoint="3" shots="1">
1 0 1000000
</viewpoints>
<navigation navigation_mode="quad"
start_x="0.0" start_y="0.0" start_z="0.0"
navigation_maximal_y="10.0" navigation_minimal_y="-10.0"
navigation_step="1.0" start_pitch="0" start_yaw="180"/>
<view_volume type="ortho" x_min="-1.0" x_max="1.0"
y_min="-1.0" y_max="1.0"
near="1.0" far="1000" />
</user>
The example below is a script attached to a user used to trigger specific actions when navigation begins or ends by pressing or releasing the mouse button defined by the mouse_navigation attribute of the the window layout.
<script id="user1_script"> <command> <trigger type="message_event" value="sensor-mouse-navigation" /> <action> <write_console value="begin-navigation user 1" /> </action> </command> <command> <trigger type="message_event" value="sensor-mouse-end-navigation" /> <action> <write_console value="end-navigation user 1" /> </action> </command> </script>