j3d.org Code

org.j3d.device.input
Class TrackerState

java.lang.Object
  extended by org.j3d.device.input.DeviceState
      extended by org.j3d.device.input.TrackerState

public class TrackerState
extends DeviceState

Holds a single tracker's state.

A sensor is responsible for converting its coordinates into worldCoordinates Needs to return position, orientation and button state action(Picking, Navigation, Orientation)

Version:
$Revision: 1.1 $
Author:
Alan Hudson

Field Summary
 int actionMask
          A mask of actions this tracker might return.
 int actionType
          What action is this state record for
 boolean altModifier
          Alt key modifier
 int[] buttonMode
          What navigation mode should this button use
 boolean[] buttonState
           
 boolean ctrlModifier
          Ctrl key modifier
 float[] deviceOri
          An orientation vector in device coords
 float[] devicePos
          The position of the tracker in device coordinates
 int numButtons
          The number of buttons the tracker has
 boolean[] pickingEnabled
          Is picking enabled for this button
 boolean shiftModifier
          Shift key modifier
static int TYPE_BUTTON
          Only a button changed state, nothing else
static int TYPE_CLICK
          The action type was a click
static int TYPE_DRAG
          The action type was a drag
static int TYPE_MOVE
          The action type was a movement
static int TYPE_NONE
          No type event was processed
static int TYPE_ORIENTATION
          The action type was a orientation change
static int TYPE_PRESS
          The action type was a press
static int TYPE_RELEASE
          The action type was a release
static int TYPE_WHEEL
          The action type was a wheel rotation
 int wheelClicks
          The number of 'clicks' a wheel has rotated by
 float[] worldOri
          The orientation in world coordinates
 float[] worldPos
          The position in world coordinates.
 
Constructor Summary
TrackerState()
          Create a new default state.
 
Method Summary
 java.lang.String toString()
          Generate a string representation of this tracker's current state.
 
Methods inherited from class org.j3d.device.input.DeviceState
clearChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_NONE

public static final int TYPE_NONE
No type event was processed

See Also:
Constant Field Values

TYPE_PRESS

public static final int TYPE_PRESS
The action type was a press

See Also:
Constant Field Values

TYPE_DRAG

public static final int TYPE_DRAG
The action type was a drag

See Also:
Constant Field Values

TYPE_CLICK

public static final int TYPE_CLICK
The action type was a click

See Also:
Constant Field Values

TYPE_RELEASE

public static final int TYPE_RELEASE
The action type was a release

See Also:
Constant Field Values

TYPE_MOVE

public static final int TYPE_MOVE
The action type was a movement

See Also:
Constant Field Values

TYPE_ORIENTATION

public static final int TYPE_ORIENTATION
The action type was a orientation change

See Also:
Constant Field Values

TYPE_BUTTON

public static final int TYPE_BUTTON
Only a button changed state, nothing else

See Also:
Constant Field Values

TYPE_WHEEL

public static final int TYPE_WHEEL
The action type was a wheel rotation

See Also:
Constant Field Values

actionMask

public int actionMask
A mask of actions this tracker might return. Defined in Tracker


actionType

public int actionType
What action is this state record for


devicePos

public float[] devicePos
The position of the tracker in device coordinates


deviceOri

public float[] deviceOri
An orientation vector in device coords


worldPos

public float[] worldPos
The position in world coordinates.


worldOri

public float[] worldOri
The orientation in world coordinates


buttonState

public boolean[] buttonState

pickingEnabled

public boolean[] pickingEnabled
Is picking enabled for this button


buttonMode

public int[] buttonMode
What navigation mode should this button use


numButtons

public int numButtons
The number of buttons the tracker has


wheelClicks

public int wheelClicks
The number of 'clicks' a wheel has rotated by


shiftModifier

public boolean shiftModifier
Shift key modifier


altModifier

public boolean altModifier
Alt key modifier


ctrlModifier

public boolean ctrlModifier
Ctrl key modifier

Constructor Detail

TrackerState

public TrackerState()
Create a new default state. The type is set to NONE and all items are initialised to zero arrays.

Method Detail

toString

public java.lang.String toString()
Generate a string representation of this tracker's current state.

Overrides:
toString in class java.lang.Object
Returns:
A string containing all the state detail

j3d.org Code

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