The SceneGraph3D Description Language
input
| Derived from: |
Node3D |
| Class name: |
Input3D |
| Placement: |
Anywhere |
| Description: |
Represents the control input from a user interface or device. It provides enumerated axes with raw and normalized values as well as a set of buttons (actuators) which can be polled at any time. When a user node is attached to an input node, it modifies its internal transformation according to the values polled at each frame cycle from the input node. If you are planning to implement behabioral simulation for the control of individual users in the virtual environment, it is advised to subclass this node. |
| Special notes: |
- |
| Inherited attributes: |
name |
| New attributes: |
| attribute |
type |
description |
| type |
OPTION [INTEGER]
mousekeyboard
joystick |
Defines what kind of input device to use as input. When a joystick is selected as the input device, the user may specify which joystick to use. This allows for multiple users being controlled by multiple joysticks. |
|
| Events: |
| event name |
condition |
| button1down |
Issued continually when the left mouse button or joystick button 1 is down |
| button1pressed |
Fired when the left mouse button or the joystick button 1 is pressed |
| button1released |
Fired when the left mouse button or the joystick button 1 is released |
| button2down |
Issued continually when the right mouse button or joystick button 2 is down |
| button2pressed |
Fired when the right mouse button or the joystick button 2 is pressed |
| button2released |
Fired when the right mouse button or the joystick button 2 is released |
| button3down |
Issued continually when the middle mouse button or joystick button 3 is down |
| button3pressed |
Fired when the middle mouse button or the joystick button 3 is pressed |
| button3released |
Fired when the middle mouse button or the joystick button 3 is released |
| |
|
| - |
- |
|
| Inherited events: |
- |
| New messages: |
| attribute |
value |
description |
| - |
- |
- |
|
| Inherited messages: |
- |
| Redefined messages: |
- |
| Obsolete messages: |
active, visible, hide, show, deactivate, enable, activate, disable |
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>
<object name="castle" file="castledoom.obj"></object>
<user name="Myself" control="navigate" speed="2.0" turn="0.5"
position="0,10,100" lookat="0,10,0" input="Console">
</user>
<input name="Console" type="mousekeyboard">
</input>
<input name="Joystick1" type="joystick">
</input>
</world>
|
Last update: 22 Feb. 2010