public class KeyboardBehaviorJ3D extends Behavior implements KeyboardBehavior
Modifier and Type | Field and Description |
---|---|
static int |
ROTATE_X_NEG
Identifier for function to rotate negatively around the X viewing axis
|
static int |
ROTATE_X_POS
Identifier for function to rotate positively around the X viewing axis
|
static int |
ROTATE_Y_NEG
Identifier for function to rotate negatively around the Y viewing axis
|
static int |
ROTATE_Y_POS
Identifier for function to rotate positively around the Y viewing axis
|
static int |
ROTATE_Z_NEG
Identifier for function to rotate negatively around the Z viewing axis
|
static int |
ROTATE_Z_POS
Identifier for function to rotate positively around the Z viewing axis
|
protected WakeupCondition |
wakeupCondition
Condition that causes this Behavior to wake up.
|
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
NO_MASK, RESET, TRANSLATE_DOWN, TRANSLATE_LEFT, TRANSLATE_RIGHT, TRANSLATE_UP, ZOOM_IN, ZOOM_OUT
Constructor and Description |
---|
KeyboardBehaviorJ3D(DisplayRendererJ3D r)
Construct a new keyboard behavior for the DisplayRenderer.
|
KeyboardBehaviorJ3D(DisplayRendererJ3D r,
int num_functions) |
Modifier and Type | Method and Description |
---|---|
void |
execFunction(int function)
Executes the given function.
|
void |
initialize()
Initialize this behavior.
|
void |
mapKeyToFunction(int function,
int keycode,
int modifiers)
Maps key represented by keycode & modifiers to the given function.
|
void |
processKeyEvent(KeyEvent event)
Process a key event.
|
void |
processStimulus(Enumeration criteria)
Process a stimulus meant for this behavior.
|
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
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString
public static final int ROTATE_Z_POS
public static final int ROTATE_Z_NEG
public static final int ROTATE_X_POS
public static final int ROTATE_X_NEG
public static final int ROTATE_Y_POS
public static final int ROTATE_Y_NEG
protected WakeupCondition wakeupCondition
public KeyboardBehaviorJ3D(DisplayRendererJ3D r)
Rotation (3D renderer only):
r
- DisplayRenderer to use.DisplayRendererJ3D.addKeyboardBehavior(KeyboardBehaviorJ3D behavior)
,
to
change default key to function mappings
public KeyboardBehaviorJ3D(DisplayRendererJ3D r, int num_functions)
public void initialize()
initialize
in class Behavior
public void processStimulus(Enumeration criteria)
processStimulus
in class Behavior
criteria
- an enumeration of triggered wakeup criteriapublic void mapKeyToFunction(int function, int keycode, int modifiers)
mapKeyToFunction
in interface KeyboardBehavior
function
- keyboard function (ROTATE_X_POS, ZOOM_IN, etc)keycode
- KeyEvent
virtual keycodesmodifiers
- InputEvent
key maskKeyEvent
,
InputEvent
public void processKeyEvent(KeyEvent event)
processKeyEvent
in interface KeyboardBehavior
event
- KeyEvent stimuluspublic void execFunction(int function)
execFunction
in interface KeyboardBehavior
function
- function to perform (TRANSLATE_UP, ZOOM_IN, etc)Copyright © 1996–2023 The SSEC Visualization Project. All rights reserved.