org.opensourcephysics.sip.ch17
Class QuaternionApp

java.lang.Object
  extended by org.opensourcephysics.controls.AbstractCalculation
      extended by org.opensourcephysics.sip.ch17.QuaternionApp
All Implemented Interfaces:
Calculation

public class QuaternionApp
extends AbstractCalculation

QuaternionApp demonstrates how to use quaternions to rotate objects.


Field Summary
 
Fields inherited from class org.opensourcephysics.controls.AbstractCalculation
control, decimalFormat, mainFrame
 
Constructor Summary
QuaternionApp()
          Constructs the QuaternionApp.
 
Method Summary
 void calculate()
          Does a calcuation by setting the transformation and applying the transformation to the box.
static void main(java.lang.String[] args)
          Starts the Java application.
 void reset()
          Resets the default values.
 
Methods inherited from class org.opensourcephysics.controls.AbstractCalculation
addChildFrame, clearChildFrames, getChildFrames, getLoader, getMainFrame, getOSPApp, resetCalculation, setControl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuaternionApp

public QuaternionApp()
Constructs the QuaternionApp.

Method Detail

calculate

public void calculate()
Does a calcuation by setting the transformation and applying the transformation to the box.

Specified by:
calculate in interface Calculation
Specified by:
calculate in class AbstractCalculation

reset

public void reset()
Resets the default values. The default quaternion represents the identity transformation.

Overrides:
reset in class AbstractCalculation

main

public static void main(java.lang.String[] args)
Starts the Java application.

Parameters:
args - command line parameters