public class J3DKeyBehavior
extends Behavior
Modifier and Type | Field and Description |
---|---|
protected static double |
FAST_SPEED |
protected WakeupCondition |
keyCriterion |
protected static double |
NORMAL_SPEED |
protected TransformGroup |
tGroup |
protected Transform3D |
transform |
Constructor and Description |
---|
J3DKeyBehavior(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) |
protected static final double FAST_SPEED
protected static final double NORMAL_SPEED
protected TransformGroup tGroup
protected Transform3D transform
protected WakeupCondition keyCriterion
public void initialize()
public void processStimulus(java.util.Enumeration criteria)
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()