Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members | Related Pages

ValueSensor Class Reference

ValueSensor listens for changes in value of the target device (mouse motion by default). More...

Inheritance diagram for ValueSensor:

DeviceSensorNode ChildNode EventHandler Node Object List of all members.

Public Member Functions

virtual bool handleEvent (const Event &event)
 Callback function that is implemented by the callee.

Detailed Description

ValueSensor listens for changes in value of the target device (mouse motion by default).

Authoring Interface:

        ValueSensor {
                // from DeviceSensorNode
            field       SFBoolean   enabled         true
            field       SFURL       device          ""
            field       MFString    valueOfInterest [ ]
       
            eventOut    MFFloat     value
        }

Parameters:
enabled specifies whether this node will emit any events. Default value: true
device provides a string identifying the device this sensor is listening to. Default value: ""
valueOfInterest specifies a list of one or more values from the selected device that will cause the value eventOut to fire. If more than one value is given this node will fire when any of those values change. The value event will contain an array containing the most recent value for each element specified in the valueOfInterest array, in the order given. Each element of this array must be a single recognized value enumerant, such as "MOUSEX" or "JOYSTICKY". Default value: [ ]
value emits an array of floating point values. Each element is the most recent value received from the valuator specified in the valueOfInterest array.

Functionality:

...

The valuator string constants defined by default include:

"MOUSEX"Mouse X location
"MOUSEY"Mouse Y location


Member Function Documentation

virtual bool handleEvent const Event event  )  [virtual]
 

Callback function that is implemented by the callee.

Parameters:
event specifies the time of the event. Event time will be the same for events occurring in the same render phase For example, PREUPDATE, POSTUPDATE, PRERENDER and POSTRENDER event callbacks will all pass the same event time for the same frame. Returning stop Emma from calling the rest of the handlers for this event If you return true, Emma will keep on calling rest of the handlers for this event

Reimplemented from DeviceSensorNode.


Generated on Sat Apr 1 06:08:08 2006 for Emma Content Development Kit by  doxygen 1.4.3