ffe.behaviors
Class CollisionBehavior

java.lang.Object
  extended byjavax.media.j3d.SceneGraphObject
      extended byjavax.media.j3d.Node
          extended byjavax.media.j3d.Leaf
              extended byjavax.media.j3d.Behavior
                  extended byffe.behaviors.CollisionBehavior

public final class CollisionBehavior
extends javax.media.j3d.Behavior

The CollisionBehavior class creates a behavior which controls how atoms interact when they collide in the Java3D Universe. It needs work, but might end up being a useful tool for configuring/docking systems.


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
 
Fields inherited from class javax.media.j3d.SceneGraphObject
 
Constructor Summary
CollisionBehavior(javax.media.j3d.Shape3D s, javax.media.j3d.TransformGroup a, javax.media.j3d.TransformGroup m)
          CollisionBehavior Constructor
 
Method Summary
 void initialize()
          This method is called by the Java3D engine to determine what causes this behavior to Wake up
 void processStimulus(java.util.Enumeration e)
          This method is called whenever another atom collides with the armingNode atom
 
Methods inherited from class javax.media.j3d.Behavior
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, getView, getWakeupCondition, postId, setEnable, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval, updateNodeReferences, wakeupOn
 
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, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollisionBehavior

public CollisionBehavior(javax.media.j3d.Shape3D s,
                         javax.media.j3d.TransformGroup a,
                         javax.media.j3d.TransformGroup m)
CollisionBehavior Constructor

Parameters:
s - is the armingNode atom's Shape3D geometry
a - is the TransformGroup that represents the position of the atom relative to other atoms in the System
m - is the TransformGroup that represents the position of the System in the Java3D VirtualUniverse
Method Detail

initialize

public void initialize()
This method is called by the Java3D engine to determine what causes this behavior to Wake up


processStimulus

public void processStimulus(java.util.Enumeration e)
This method is called whenever another atom collides with the armingNode atom

Parameters:
e - An emuration of the WakeUp Conditions, currently always a WakeUpCollisionMovement, from which one can obtain information about what caused the collision