j3d.org Code

org.j3d.device.input
Class Tracker

java.lang.Object
  extended by org.j3d.device.input.Tracker
Direct Known Subclasses:
AxisTracker

public abstract class Tracker
extends java.lang.Object

An abstract representation of a tracker. A tracker is a sensor on a device. A device may contain many trackers.

With the introduction of layers and compositing, tracker state in the world coordinates is dependent on the layer that is being processed. For each layer, the device will have a different set of world coordinates. Within a given rendered frame a tracker may be called multiple times; once for each layer/sublayer combo and asked for the state information relative to that layer.

Version:
$Revision: 1.1 $
Author:
Alan Hudson

Field Summary
static int MASK_NONE
          This sensor only issues button events
static int MASK_ORIENTATION
          This sensor can change orientation in the scene
static int MASK_PICKING
          This sensor can pick items in the scene
static int MASK_POSITION
          This sensor can change position in the scene
 
Constructor Summary
Tracker()
           
 
Method Summary
 boolean actionChanges()
          Can the action type of this sensor change over time?
abstract  void beginPolling()
          Notification that tracker polling is beginning.
abstract  void endPolling()
          Notification that tracker polling is ending.
abstract  int getActionMask()
          What action types does this sensor return.
abstract  void getState(int layer, int subLayer, TrackerState state)
          Get the current state of this tracker.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MASK_NONE

public static final int MASK_NONE
This sensor only issues button events

See Also:
Constant Field Values

MASK_PICKING

public static final int MASK_PICKING
This sensor can pick items in the scene

See Also:
Constant Field Values

MASK_POSITION

public static final int MASK_POSITION
This sensor can change position in the scene

See Also:
Constant Field Values

MASK_ORIENTATION

public static final int MASK_ORIENTATION
This sensor can change orientation in the scene

See Also:
Constant Field Values
Constructor Detail

Tracker

public Tracker()
Method Detail

actionChanges

public boolean actionChanges()
Can the action type of this sensor change over time?

Returns:
Is this an action figure?

getActionMask

public abstract int getActionMask()
What action types does this sensor return. This a combination of ACTION masks.

Returns:
The action mask.

beginPolling

public abstract void beginPolling()
Notification that tracker polling is beginning.


endPolling

public abstract void endPolling()
Notification that tracker polling is ending.


getState

public abstract void getState(int layer,
                              int subLayer,
                              TrackerState state)
Get the current state of this tracker.

Parameters:
layer - The ID of the layer to get the state for
subLayer - The ID of the sub layer within the parent layer
state - The current state

j3d.org Code

Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org