The SceneGraph3D Description Language
user
| Derived from: |
TransformNode3D |
| Class name: |
User3D |
| Placement: |
Anywhere |
| Description: |
This type of node implements an autonomous entity that can navigate through the virtual world as a result of a controller that provides input and therefore drives the node. User is not a unique node; many users may populate the virtual world, each one representing a different actual user (e.g. for multiplayer games) or computer-controlled characters, animals or avatars in general. The user nodes do not implement a viewing system, as this is part of the camera node, which of course can be bound ( attached) to any scene graph node, including a user. Cameras and users are completely different entities in SceneGraph3D, allowing a large diversity of configurations, multiple angles, multiple users and any dynamic combination of them. User is derived from the transformation node type, which means that it can therefore contain other nodes. This makes the addition of a visual represntation of the avatar very easy, as you only add whatever node you want as the content of the user and it will move along with it.
|
| Special notes: |
Although derived from a transformation node type, all direct transformation messages are ignored. |
| Inherited attributes: |
name, active, visible |
| New attributes: |
| attribute |
type |
description |
| input |
STRING |
Declares the input node that will provide all control for the user. |
| position |
VEC3 |
The initial position of the user. Default value is (0,0,0). |
| lookat |
VEC3 |
Where the user initially points to. Inital value is (0,0,-100). |
| freeroll |
BOOLEAN |
When true, the input controller also affects the roll of the user, otherwise, the user remains upright (the "right" axis lies on the xz plane). Default value is false. |
| turn |
FLOAT |
The rate at which the user turns. Default value is 1.0, which is quite fast. |
| speed |
FLOAT |
The linear speed of the user in world units. Default value is 1.0. |
| control |
OPTION
navigate
orbit
passive |
Configures the type of motion the user performs with regard to the look-at point and the input parameters. If the navigate option is set (default), the user turns using its position as a pivot point. If the orbit mode is set, the user turns around the look-at point. When passive mode is used, the user ignores all input. |
|
| Events: |
| event name |
condition |
| moveforward |
Issued when the user moves forward. Ideal for changing in the appearance of the user when performing this action. This is independent of the input control type. |
| movebackward |
Issued when the user moves backward. Ideal for changing in the appearance of the user when performing this action. This is independent of the input control type. |
| moveleft |
Issued when the user moves (strafes) left. Ideal for changing in the appearance of the user when performing this action. This is independent of the input control type. |
| moveright |
Issued when the user moves (strafes) right. Ideal for changing in the appearance of the user when performing this action. This is independent of the input control type. |
| tiltup |
Issued when the user front direction tilts toward its "up" vector. Ideal for changing in the appearance of the user when performing this action. This is independent of the input control type. |
| tiltdown |
Issued when the user front direction tilts away from its "up" vector. Ideal for changing in the appearance of the user when performing this action. This is independent of the input control type. |
| turnleft |
Issued when the user front direction turns away from its "right" direction vector. Ideal for changing in the appearance of the user when performing this action. This is independent of the input control type. |
| turnright |
Issued when the user front direction turns toward its "right" direction vector. Ideal for changing in the appearance of the user when performing this action. This is independent of the input control type. |
|
| Inherited events: |
- |
| New messages: |
| attribute |
value |
description |
| control |
OPTION
navigate
orbit
passive |
Same as corresponding node attribute. |
| freeroll |
BOOLEAN |
Same as corresponding node attribute. |
| speed |
FLOAT |
Same as corresponding node attribute. |
| turn |
FLOAT |
Same as corresponding node attribute. |
| position |
VEC3 |
Same as corresponding node attribute. |
| lookat |
VEC3 |
Same as corresponding node attribute. |
| input |
STRING |
Same as corresponding node attribute. |
|
| Inherited messages: |
active, visible, hide, show, deactivate, enable, activate, disable |
| Redefined messages: |
- |
| Obsolete messages: |
translation, scale, rotation |
Example
<world ambient_occlusion="ssao" bloom="yes" shadows="disk"
ao_radius="6" ambient="0.3 0.3 0.3" defocus="yes">
<camera name="first_person" apperture="50.0"
focal_distance ="30.0" focal_range="30.0"
near="2.0" far="1000" follow="Myself" primary="true">
</camera>
<transformation name="environment" scale="1.0,1.0,1.0" translation="0,0,-10">
<object name="geom1" file="arena.obj"></object>
</transformation>
<user name="Myself" control="navigate" speed="2.0" turn="0.5 freeroll="false"
position="0,50,50" lookat="0,0,-10" input="Console">
</user>
<input name="Console" type="mousekeyboard">
</input>
</world>
|
Last update: 16 Feb. 2009