unbboolean.gui.scenegraph
Class GeneralPickBehavior

java.lang.Object
  |
  +--javax.media.j3d.SceneGraphObject
        |
        +--javax.media.j3d.Node
              |
              +--javax.media.j3d.Leaf
                    |
                    +--javax.media.j3d.Behavior
                          |
                          +--unbboolean.gui.scenegraph.GeneralPickBehavior

public class GeneralPickBehavior
extends javax.media.j3d.Behavior

Class responsible for applying transformations on solids where the user drags one of them with a mouse on a screen

Author:
Danilo Balby Silva Castanheira (danbalby@yahoo.com)

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_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
 
Constructor Summary
GeneralPickBehavior(javax.media.j3d.BranchGroup root, javax.media.j3d.Canvas3D canvas, SolidsSelectionListener listener)
          Constructs a GeneralPickBehavior object
 
Method Summary
 void initialize()
          Initializes the behavior attributes
 void processStimulus(java.util.Enumeration criteria)
          Applies a transformation when a solid is dragged
 void setMoveMode(CSGSolid solid)
          Sets move mode on
 void unsetMoveMode(CSGSolid solid)
          Sets move mode off
 
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, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
 
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeneralPickBehavior

public GeneralPickBehavior(javax.media.j3d.BranchGroup root,
                           javax.media.j3d.Canvas3D canvas,
                           SolidsSelectionListener listener)
Constructs a GeneralPickBehavior object

Parameters:
root - root of the scene graph where the solids are
canvas - screen where the iteration with the solids occurs
listener - listener that receives information about solids selection
Method Detail

initialize

public void initialize()
Initializes the behavior attributes

Specified by:
initialize in class javax.media.j3d.Behavior

processStimulus

public void processStimulus(java.util.Enumeration criteria)
Applies a transformation when a solid is dragged

Specified by:
processStimulus in class javax.media.j3d.Behavior
Parameters:
criteria - set of stimulus received

setMoveMode

public void setMoveMode(CSGSolid solid)
Sets move mode on

Parameters:
solid - move mode solid

unsetMoveMode

public void unsetMoveMode(CSGSolid solid)
Sets move mode off

Parameters:
solid - solid to be selected after the move mode is off