NCSA Portfolio

ncsa.devices.spaceorb
Class SpaceOrb

java.lang.Object
  |
  +--ncsa.devices.spaceorb.SpaceOrb

public class SpaceOrb
extends java.lang.Object
implements javax.media.j3d.InputDevice

This is the j3d implementation for the space orb device.


Fields inherited from interface javax.media.j3d.InputDevice
BLOCKING, DEMAND_DRIVEN, NON_BLOCKING, POLLED, STREAMING
 
Constructor Summary
SpaceOrb()
          This is default for com1 on a sparc needs to be changed.
SpaceOrb(java.lang.String port)
          Opens the space orb device and starts reading from the serial port.
 
Method Summary
 void close()
          Default implementation for InputDevice.close()
 int getProcessingMode()
          Returns the current processing mdoe for this InputDevice.
 javax.media.j3d.Sensor getSensor(int index)
          Returns the sensor at the specified index.
 int getSensorCount()
          Returns the number of sensors used by this device.
 boolean initialize()
          The default implementation of initialize.
 void pollAndProcessInput()
          The method to sample the device.
 void processStreamInput()
          Empty method.
 void setNominalPositionAndOrientation()
          Empty method.
 void setProcessingMode(int mode)
          The processing mode does not change.
 void setRotationScale(float value)
          Method to scale the rotation.
 void setTranslationScale(float value)
          Method to scale the translation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpaceOrb

public SpaceOrb()
This is default for com1 on a sparc needs to be changed.

SpaceOrb

public SpaceOrb(java.lang.String port)
Opens the space orb device and starts reading from the serial port. Did you start the jvm with 'java -native'?
Parameters:
port - The comm port to use.
Method Detail

setRotationScale

public void setRotationScale(float value)
Method to scale the rotation.
Parameters:
value - The new value. 1.0f would be no scale.

setTranslationScale

public void setTranslationScale(float value)
Method to scale the translation.
Parameters:
value - The new value. 512(the default) would put the values between [-1,1].

pollAndProcessInput

public final void pollAndProcessInput()
The method to sample the device.
Specified by:
pollAndProcessInput in interface javax.media.j3d.InputDevice

close

public void close()
Default implementation for InputDevice.close()
Specified by:
close in interface javax.media.j3d.InputDevice

getProcessingMode

public int getProcessingMode()
Returns the current processing mdoe for this InputDevice.
Specified by:
getProcessingMode in interface javax.media.j3d.InputDevice

getSensorCount

public int getSensorCount()
Returns the number of sensors used by this device.
Specified by:
getSensorCount in interface javax.media.j3d.InputDevice

getSensor

public javax.media.j3d.Sensor getSensor(int index)
Returns the sensor at the specified index.
Specified by:
getSensor in interface javax.media.j3d.InputDevice
Parameters:
index - The index of the sensor to return.

initialize

public boolean initialize()
The default implementation of initialize.
Specified by:
initialize in interface javax.media.j3d.InputDevice

processStreamInput

public void processStreamInput()
Empty method.
Specified by:
processStreamInput in interface javax.media.j3d.InputDevice

setNominalPositionAndOrientation

public void setNominalPositionAndOrientation()
Empty method.
Specified by:
setNominalPositionAndOrientation in interface javax.media.j3d.InputDevice

setProcessingMode

public void setProcessingMode(int mode)
The processing mode does not change. It is DEMAND_DRIVEN.
Specified by:
setProcessingMode in interface javax.media.j3d.InputDevice
Parameters:
mode - This parameter does not matter.

NCSA Portfolio

NCSA Portfolio, Copyright 1997-1999, National Center for Supercomputing Applications, University of Illinois Urbana-Champaign, All Rights Reserved