The SceneGraph3D Description Language

Home About EaZD Deferred renderer API SceneGraph3D API SceneGraph3D scene description language

Index

| Scene file structure | camera | character | directory | eventmessage | group | input | light | linearmotion | material | node | object | proximitytrigger | skylight | spinner | surface | transformation | user | world |

eventmessage

Derived from: -
Class name: -
Placement: Within any node
Description: Declares an association between an event that is produced by the incuding (parent) node and a message that should be sent to a recipient node.
Special notes: Multiple eventmessages can be included within the scope of a node, even if they respond to the same event. This is necessary if you need to notify many nodes at once when an event occurs. The event, message and recipient attributes are mandatory.
Inherited attributes: -
New attributes:
attribute type description
event STRING The event that the eventmessage should respond to. Whenever the event is triggered, the text defined in the message attribute is posted to the recipient node, after a time period defined by the delay attribute. No default value.
recipient STRING The scene graph name of the recipient to receive the message.
message STRING The message that is posted to the recipient. Accepted messages and their corresponding values are listed in the documentation of each node.
delay FLOAT The time delay between the event triggering and the message post operations. Default is zero, e.g. the message is dispatched as soon as the event is activated.
Events:
event name condition
-  
Inherited events: -
New messages:
attribute value description
Inherited messages: -
Redefined messages: -
Obsolete messages: -


Example

<world ambient="0.3 0.3 0.3" defocus="no">
  
    <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="geom2" file="arena.obj"></object>
    
    </transformation>
 
    <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">
        <eventmessage event="button2pressed" recipient="%world" delay="2.0" message="reset">
        </eventmessage>    
        <eventmessage event="button1pressed" recipient="%world" message="defocus true">
        </eventmessage>    
        <eventmessage event="button1released" recipient="%world" message="defocus false">
        </eventmessage>    
    </input>
</world>

Last update: 6 Feb. 2009