j3d.utils
Class KeyBehavior

java.lang.Object
  extended by javax.media.j3d.SceneGraphObject
      extended by javax.media.j3d.Node
          extended by javax.media.j3d.Leaf
              extended by javax.media.j3d.Behavior
                  extended by j3d.utils.KeyBehavior

public class KeyBehavior
extends javax.media.j3d.Behavior

KeyBehavior is a generic behavior class to take key presses and move a TransformGroup through a Java3D scene. The actions resulting from the key strokes are modified by using the Ctrl, Alt and Shift keys.

(version 1.0) reconstructed class to make more generic.

MODIFIED:

Version:
1.0, 25 September 1998 aajc
Author:
Andrew AJ Cain, Swinburne University, Australia

edited from code by: Gary S. Moss U. S. Army Research Laboratory

CLASS NAME: KeyBehavior

PUBLIC FEATURES: // Data

// Constructors

// Methods:

COLLABORATORS:


Field Summary
 
Fields inherited from class javax.media.j3d.Node
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
 
Constructor Summary
KeyBehavior(javax.media.j3d.TransformGroup viewTransformGroup)
           
 
Method Summary
 void bulletMove()
           
 void initialize()
           
 void processStimulus(java.util.Enumeration criteria)
           
 void setBackKey(int key)
           
 void setBulletTransformGroup(javax.media.j3d.TransformGroup bulletTransformGroup)
           
 void setForwardKey(int key)
           
 void setGunTransformGroup(javax.media.j3d.TransformGroup gunTransformGroup)
           
 void setLeftKey(int key)
           
 void setMovementRate(double meters)
           
 void setRightKey(int key)
           
 void setRotateXAmount(double radians)
           
 void setRotateYAmount(double radians)
           
 void setRotateZAmount(double radians)
           
 void setTargetTransformGroup(javax.media.j3d.TransformGroup targetTransformGroup)
           
 
Methods inherited from class javax.media.j3d.Behavior
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, postId, setEnable, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval, updateNodeReferences
 
Methods inherited from class javax.media.j3d.Node
cloneNode, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
 
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KeyBehavior

public KeyBehavior(javax.media.j3d.TransformGroup viewTransformGroup)
Method Detail

setTargetTransformGroup

public void setTargetTransformGroup(javax.media.j3d.TransformGroup targetTransformGroup)

setBulletTransformGroup

public void setBulletTransformGroup(javax.media.j3d.TransformGroup bulletTransformGroup)

setGunTransformGroup

public void setGunTransformGroup(javax.media.j3d.TransformGroup gunTransformGroup)

initialize

public void initialize()
Specified by:
initialize in class javax.media.j3d.Behavior

processStimulus

public void processStimulus(java.util.Enumeration criteria)
Specified by:
processStimulus in class javax.media.j3d.Behavior

bulletMove

public void bulletMove()

setRotateXAmount

public void setRotateXAmount(double radians)

setRotateYAmount

public void setRotateYAmount(double radians)

setRotateZAmount

public void setRotateZAmount(double radians)

setMovementRate

public void setMovementRate(double meters)

setForwardKey

public void setForwardKey(int key)

setBackKey

public void setBackKey(int key)

setLeftKey

public void setLeftKey(int key)

setRightKey

public void setRightKey(int key)