Xj3D VRML/X3D Code API

org.web3d.browser
Interface SensorStatusListener

All Known Implementing Classes:
CursorManager, OGLBrowserCanvas, VRMLBrowserCanvas

public interface SensorStatusListener

A listener to notify that a sensor's status has changed in relation to an input device. Any VRML/X3D node that interacts with a tracker will issue these events. TODO: This interface does not allow you to seperate events when the user has multiple picking devices like two gloves. In the future we will add parameters to determine which device was used.

Version:
$Revision: 1.1 $
Author:
Alan Hudson

Field Summary
static int TYPE_ANCHOR
          The sensor is an Anchor
static int TYPE_DRAG_SENSOR
          The sensor is a DragSensor
static int TYPE_TOUCH_SENSOR
          The sensor is a TouchSensor
 
Method Summary
 void deviceActivated(int type)
          Invoked when a tracker activates the sensor.
 void deviceNotOver(int type)
          Invoked when a tracker leaves contact with a sensor.
 void deviceOver(int type, java.lang.String desc)
          Invoked when a sensor/anchor is in contact with a tracker capable of picking.
 void linkActivated(java.lang.String[] url)
          Invoked when a tracker follows a link.
 

Field Detail

TYPE_ANCHOR

public static final int TYPE_ANCHOR
The sensor is an Anchor

See Also:
Constant Field Values

TYPE_TOUCH_SENSOR

public static final int TYPE_TOUCH_SENSOR
The sensor is a TouchSensor

See Also:
Constant Field Values

TYPE_DRAG_SENSOR

public static final int TYPE_DRAG_SENSOR
The sensor is a DragSensor

See Also:
Constant Field Values
Method Detail

deviceOver

public void deviceOver(int type,
                       java.lang.String desc)
Invoked when a sensor/anchor is in contact with a tracker capable of picking.

Parameters:
type - The sensor type
desc - The sensor's description string

deviceNotOver

public void deviceNotOver(int type)
Invoked when a tracker leaves contact with a sensor.

Parameters:
type - The sensor type

deviceActivated

public void deviceActivated(int type)
Invoked when a tracker activates the sensor. Anchors will not receive this event, they get a linkActivated call.

Parameters:
type - The sensor type

linkActivated

public void linkActivated(java.lang.String[] url)
Invoked when a tracker follows a link.

Parameters:
url - The url to load.

Xj3D VRML/X3D Code API

Copyright © 2001 - 2005 Web3D Consortium