Aviatrix3D
2.1.0

org.j3d.renderer.aviatrix3d.navigation
Class ViewpointTransition

java.lang.Object
  extended by org.j3d.renderer.aviatrix3d.navigation.ViewpointTransition
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class ViewpointTransition
extends java.lang.Object
implements java.awt.event.ActionListener

This class will create smooth transitions from one viewpoint to another.

The transition effects start when a new set of transform groups are used to drive the view. To provide the driving factor, a Swing Timer object is used rather than using the Java 3D behaviour system.

Version:
$Revision $
Author:
Halden VR Centre, Institute for Energy Technology
Updated for j3d.org by Justin Couch

Constructor Summary
ViewpointTransition()
          Construct a new transition object ready to work.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
          Process an action event from the timer.
 void setFrameUpdateListener(FrameUpdateListener l)
          Set the listener for frame update notifications.
 void transitionTo(TransformGroup viewTg, javax.vecmath.Matrix4f endTx, int totalTime)
          Transition between two locations represented by the initial TranformGroup and the destination transform information starting immediately.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewpointTransition

public ViewpointTransition()
Construct a new transition object ready to work.

Method Detail

setFrameUpdateListener

public void setFrameUpdateListener(FrameUpdateListener l)
Set the listener for frame update notifications. By setting a value of null it will clear the currently set instance

Parameters:
l - The listener to use for this transition

transitionTo

public void transitionTo(TransformGroup viewTg,
                         javax.vecmath.Matrix4f endTx,
                         int totalTime)
Transition between two locations represented by the initial TranformGroup and the destination transform information starting immediately.

Parameters:
viewTg - is the transformgroup to be transitioned that holds the view.
endTx - is the final state to be transitioned to
totalTime - The time to be spent with this transition (in miliseconds)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Process an action event from the timer. This event is only for the time and should not be associated with any other sort of action event like menu callbacks.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
evt - The event that caused this action to be called

Aviatrix3D
2.1.0

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2009 j3d.org