public class J3DKeyBehavior
extends javax.media.j3d.Behavior
Modifier and Type | Field and Description |
---|---|
protected static double |
FAST_SPEED |
protected javax.media.j3d.WakeupCondition |
keyCriterion |
protected static double |
NORMAL_SPEED |
protected javax.media.j3d.TransformGroup |
tGroup |
protected javax.media.j3d.Transform3D |
transform |
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 and Description |
---|
J3DKeyBehavior(javax.media.j3d.TransformGroup tg) |
Modifier and Type | Method and Description |
---|---|
protected void |
altMove(int keycode) |
protected void |
controlMove(int keycode) |
protected double |
getMovementRate() |
void |
initialize() |
void |
moveAlongAxis(int axis,
int dir)
Method to shift along axis in direction provided
|
protected void |
processKeyEvent(java.awt.event.KeyEvent event) |
void |
processStimulus(java.util.Enumeration criteria) |
protected boolean |
rotate(int axis,
double radians,
boolean force)
Method that rotates along given axis
|
protected void |
rotateAlongAxis(int axis,
int dir)
Method to rotate along given axis and direction provided
|
void |
setHomeRotation(double[] rotVals)
Method to set the original rotation
|
protected boolean |
updateTransform(boolean force) |
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, getView, getWakeupCondition, postId, setEnable, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval, updateNodeReferences, wakeupOn
cloneNode, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
protected static final double FAST_SPEED
protected static final double NORMAL_SPEED
protected javax.media.j3d.TransformGroup tGroup
protected javax.media.j3d.Transform3D transform
protected javax.media.j3d.WakeupCondition keyCriterion
public void initialize()
initialize
in class javax.media.j3d.Behavior
public void processStimulus(java.util.Enumeration criteria)
processStimulus
in class javax.media.j3d.Behavior
protected void processKeyEvent(java.awt.event.KeyEvent event)
protected void altMove(int keycode)
protected void controlMove(int keycode)
public void moveAlongAxis(int axis, int dir)
axis
- dir
- protected void rotateAlongAxis(int axis, int dir)
axis
- dir
- protected boolean updateTransform(boolean force)
public void setHomeRotation(double[] rotVals)
rotVals
- protected boolean rotate(int axis, double radians, boolean force)
axis
- radians
- protected double getMovementRate()