Aviatrix3D
2.1.0

org.j3d.renderer.aviatrix3d.navigation
Class ViewpointManager

java.lang.Object
  extended by org.j3d.renderer.aviatrix3d.navigation.ViewpointManager
All Implemented Interfaces:
org.j3d.ui.navigation.ViewpointSelectionListener

public class ViewpointManager
extends java.lang.Object
implements org.j3d.ui.navigation.ViewpointSelectionListener

A handler for viewpoint information for a given canvas.

Version:
$Revision $
Author:
Justin Couch

Constructor Summary
ViewpointManager()
          Create a new manager for the viewpoint information with no handlers or information set and the default transition time of 2 seconds.
ViewpointManager(int time)
          Create a new manager for the viewpoint information with no handlers or information set and the the given transition time.
 
Method Summary
 void setFrameUpdateListener(FrameUpdateListener l)
          Set the listener for frame update notifications.
 void setToolbar(org.j3d.ui.navigation.ViewpointToolbar tbr)
          Set the toolbar instance to use.
 void setTransitionTime(int time)
          Change the transition time between viewpoints.
 void setViewInfo(Viewpoint view, TransformGroup tg)
          Set the view and it's related transform group to use.
 void viewpointSelected(org.j3d.ui.navigation.ViewpointData vp)
          A new viewpoint has been selected and this is it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewpointManager

public ViewpointManager()
Create a new manager for the viewpoint information with no handlers or information set and the default transition time of 2 seconds.


ViewpointManager

public ViewpointManager(int time)
                 throws java.lang.IllegalArgumentException
Create a new manager for the viewpoint information with no handlers or information set and the the given transition time.

Parameters:
time - The time to transit when changing
Throws:
java.lang.IllegalArgumentException - The time was negative
Method Detail

setToolbar

public void setToolbar(org.j3d.ui.navigation.ViewpointToolbar tbr)
Set the toolbar instance to use. Setting a value of null will clear the currently set instance.

Parameters:
tbr - The new toolbar instance to use

setTransitionTime

public void setTransitionTime(int time)
Change the transition time between viewpoints. Only takes effect for the next transition. Will not change the current one. Value must be non-negative. A value of zero results in a jump between the two locations.

Parameters:
time - The new time to use in milliseconds
Throws:
java.lang.IllegalArgumentException - The time was negative

setViewInfo

public void setViewInfo(Viewpoint view,
                        TransformGroup tg)
Set the view and it's related transform group to use. If a canvas is set and these are non-null the interaction will start immediately. Calling with both values as null will remove them and stop the process of updating the canvas.

Parameters:
view - is the View object that we're modifying.
tg - The transform group above the view object that should be used

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

viewpointSelected

public void viewpointSelected(org.j3d.ui.navigation.ViewpointData vp)
A new viewpoint has been selected and this is it. Move to this viewpoint location according to the requested means.

Specified by:
viewpointSelected in interface org.j3d.ui.navigation.ViewpointSelectionListener
Parameters:
vp - The new viewpoint to use

Aviatrix3D
2.1.0

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