jat.attitude.util
Class AnimationWindow2

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by jat.attitude.util.AnimationWindow2
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ChangeListener

public class AnimationWindow2
extends javax.swing.JPanel
implements java.awt.event.ActionListener, javax.swing.event.ChangeListener

AnimatioWindow2 is a modification of AnimationWindow to include flexible beams and concentrated masses at the tip for 3D visualization of spacecraft attitude dynmics defined in jat.eom.FlexibleThreeD.java and jat.eom.FlexibleTwoD.java.

Version:
1.5 (03/09/2004) Modification since the last version Removed: import java.applet.*; import com.sun.j3d.utils.geometry.*;
Author:
Daniel Quock December 2001, July 2002, Noriko Takada
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
 javax.media.j3d.TransformGroup Beam1TG
           
 javax.media.j3d.TransformGroup Beam2TG
           
 javax.media.j3d.Transform3D BeamTrans1
           
 javax.media.j3d.Transform3D BeamTrans2
           
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AnimationWindow2(java.lang.String title, float ixxt, float iyyt, float izzt, int pts, float[][] tvars, java.lang.String simTypet, float[][] Beam1, float[][] Beam2, float a, float L)
          Creates the pop-up animation window
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Handles any button presses and the animation of the satellite by drawing the next frame and updating the slider
 javax.media.j3d.BranchGroup createSceneGraph()
          Create the scene graph of the universe, populates it with lights, the initial camera location, and allows mouse interaction with the scene
 void findDimensions()
          Finds the normalized lengths of the satellite based on the principal moments of inertia
 javax.media.j3d.TransformGroup generateAxes()
          Creates the inertial reference axis in the animation
 javax.media.j3d.TransformGroup generateAxesLabels()
          Creates the labels for the inertial reference axis in the animation (The white "X", "Y"m and "Z")
 javax.media.j3d.TransformGroup generateBeam1()
          Generates a massless beam and a tip mass on the negative side of the satellite x-axis
 javax.media.j3d.TransformGroup generateBeam2()
          Generates a massless beam and a tip mass on the positive side of the satellite y-axis
 javax.media.j3d.TransformGroup generateSatellite()
          Create the box shape of the satellite using the principal moments of inertia
 void stateChanged(javax.swing.event.ChangeEvent e)
          Handles events caused by the JSlider
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Beam1TG

public javax.media.j3d.TransformGroup Beam1TG

Beam2TG

public javax.media.j3d.TransformGroup Beam2TG

BeamTrans1

public javax.media.j3d.Transform3D BeamTrans1

BeamTrans2

public javax.media.j3d.Transform3D BeamTrans2
Constructor Detail

AnimationWindow2

public AnimationWindow2(java.lang.String title,
                        float ixxt,
                        float iyyt,
                        float izzt,
                        int pts,
                        float[][] tvars,
                        java.lang.String simTypet,
                        float[][] Beam1,
                        float[][] Beam2,
                        float a,
                        float L)
Creates the pop-up animation window

Parameters:
title - (String) title that goes in window title bar
ixxt - (float) temp principal moment of inertia, x-axis
iyyt - (float) temp principal moment of inertia, y-axis
izzt - (float) temp principal moment of inertia, z-axis
pts - (int) number of animation points
tvars - (float[][]) array of values
tsimType - (String) temp type of simulation (e.g. "Gravity Gradient")
Beam1 - (float[][]) array of quaternion values for Transform3D
Beam2 - (float[][]) array of quaternion values for Transform3D
a - (float) deimension of half the x_length of the spacecraft
L - (float) Length of the beam
Method Detail

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
Handles events caused by the JSlider

Specified by:
stateChanged in interface javax.swing.event.ChangeListener
Parameters:
e - (ChangeEvent) ChangeEvent)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Handles any button presses and the animation of the satellite by drawing the next frame and updating the slider

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - (ActionEvent) ActionEvent

createSceneGraph

public javax.media.j3d.BranchGroup createSceneGraph()
Create the scene graph of the universe, populates it with lights, the initial camera location, and allows mouse interaction with the scene


generateAxes

public javax.media.j3d.TransformGroup generateAxes()
Creates the inertial reference axis in the animation


generateAxesLabels

public javax.media.j3d.TransformGroup generateAxesLabels()
Creates the labels for the inertial reference axis in the animation (The white "X", "Y"m and "Z")


generateSatellite

public javax.media.j3d.TransformGroup generateSatellite()
Create the box shape of the satellite using the principal moments of inertia


findDimensions

public void findDimensions()
Finds the normalized lengths of the satellite based on the principal moments of inertia


generateBeam1

public javax.media.j3d.TransformGroup generateBeam1()
Generates a massless beam and a tip mass on the negative side of the satellite x-axis

Since:
August 2003

generateBeam2

public javax.media.j3d.TransformGroup generateBeam2()
Generates a massless beam and a tip mass on the positive side of the satellite y-axis

Since:
August 2003