edu.d.umn.behaviors
Class DEMViewerFlyBehavior

java.lang.Object
  extended by javax.media.j3d.SceneGraphObject
      extended by javax.media.j3d.Node
          extended by javax.media.j3d.Leaf
              extended by javax.media.j3d.Behavior
                  extended by com.sun.j3d.utils.behaviors.vp.ViewPlatformBehavior
                      extended by edu.d.umn.behaviors.FlyBehavior
                          extended by edu.d.umn.behaviors.DEMViewerFlyBehavior
Direct Known Subclasses:
StereoFlyBehavior

public class DEMViewerFlyBehavior
extends FlyBehavior

Basically, this is the same type of behavior available with Sun's java3d demo. It is just condensed down into one file, rather than several inheritances. Movement is as follows. Left Click - move forward and backward, turn left and right Middle Click - look up and down, and roll Right Click - change elevation, and strafe left and right


Field Summary
protected  java.util.ArrayList modelList
          a list of all the models currently in the scene.
 
Fields inherited from class edu.d.umn.behaviors.FlyBehavior
awtCondition, bothCondition, canvasBounds, canvasCenter, deadXSize, deadYSize, ignoreMouseMotion, MAX_ANGLE, maxVelocity, motion, pitchAngle, pitchTransform, rollAngle, rollTransform, targetTG, targetTransform, velocity, velocityTransform, yawAngle, yawTransform
 
Fields inherited from class com.sun.j3d.utils.behaviors.vp.ViewPlatformBehavior
homeTransform, vp
 
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_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
 
Constructor Summary
DEMViewerFlyBehavior()
          Creates a new instance of DEMViewerFlyBehavior
DEMViewerFlyBehavior(java.util.ArrayList modelList, javax.media.j3d.TransformGroup tg)
          Creates a new FlyBehavior
 
Method Summary
 void aerialView()
          Moves the targetTG to get an aerial view centered at the average coordinates of all the ElevationModels currently renedered.
 
Methods inherited from class edu.d.umn.behaviors.FlyBehavior
getTarget, init, initialize, integrateTransforms, levelOff, processAWTEvents, processKeyEvent, processMouseEvent, processStimulus, setMaxSpeed, setTarget
 
Methods inherited from class com.sun.j3d.utils.behaviors.vp.ViewPlatformBehavior
getHomeTransform, getViewingPlatform, goHome, setHomeTransform, setViewingPlatform
 
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, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
 
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

modelList

protected java.util.ArrayList modelList
a list of all the models currently in the scene.

Constructor Detail

DEMViewerFlyBehavior

public DEMViewerFlyBehavior(java.util.ArrayList modelList,
                            javax.media.j3d.TransformGroup tg)
Creates a new FlyBehavior

Parameters:
modelList - A list of all the models that can be seen. Used for the aerial view method to make sure that all models are viewable.
tg - The transform group this behavior will act on.

DEMViewerFlyBehavior

public DEMViewerFlyBehavior()
Creates a new instance of DEMViewerFlyBehavior

Method Detail

aerialView

public void aerialView()
Moves the targetTG to get an aerial view centered at the average coordinates of all the ElevationModels currently renedered.

Specified by:
aerialView in class FlyBehavior