Aviatrix3D
2.1.0

org.j3d.aviatrix3d.pipeline.graphics
Class ViewportResizeManager

java.lang.Object
  extended by org.j3d.aviatrix3d.pipeline.graphics.ViewportResizeManager
All Implemented Interfaces:
GraphicsResizeListener

public class ViewportResizeManager
extends java.lang.Object
implements GraphicsResizeListener

Convenience class for managing the resizing of the viewports based on listener feedback from the surface.

This class deals only with fullscreen resizing capabilities. All viewports registered for management will resize to the full screen size handed to us by the listener.

Version:
$Revision: 3.3 $
Author:
Justin Couch

Constructor Summary
ViewportResizeManager()
          Create a new instance of this manager now.
 
Method Summary
 void addManagedViewport(Viewport view)
          Add a viewport to be managed.
 void clear()
          Clear all of the current viewports from the manager.
 void graphicsDeviceResized(int x, int y, int width, int height)
          Notification that the graphics output device has changed dimensions to the given size.
 void removeManagedViewport(Viewport view)
          Remove a viewport that is being managed.
 void sendResizeUpdates()
          Clock the updates that should be sent now.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewportResizeManager

public ViewportResizeManager()
Create a new instance of this manager now.

Method Detail

graphicsDeviceResized

public void graphicsDeviceResized(int x,
                                  int y,
                                  int width,
                                  int height)
Notification that the graphics output device has changed dimensions to the given size. Dimensions are in pixels.

Specified by:
graphicsDeviceResized in interface GraphicsResizeListener
Parameters:
x - The lower left x coordinate for the view
y - The lower left y coordinate for the view
width - The width of the viewport in pixels
height - The height of the viewport in pixels

sendResizeUpdates

public void sendResizeUpdates()
Clock the updates that should be sent now. This should only be called during the application update cycle callbacks. Ideally this should be called as the first thing in updateSceneGraph() method so that anything else that relies on view frustum projection will have the latest information.


addManagedViewport

public void addManagedViewport(Viewport view)
Add a viewport to be managed. Duplicate requests are ignored, as are null values.

Parameters:
view - The viewport instance to use

removeManagedViewport

public void removeManagedViewport(Viewport view)
Remove a viewport that is being managed. If the viewport is not currently registered, the request is silently ignored.

Parameters:
view - The viewport instance to remove

clear

public void clear()
Clear all of the current viewports from the manager. Typically used when you want to completely change the scene.


Aviatrix3D
2.1.0

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