Class View2D

java.lang.Object
  extended by View2D

public class View2D
extends java.lang.Object

controll class to have 2D (pan && zoom) controll over the applet ..


Constructor Summary
View2D()
           
 
Method Summary
 void display()
          call to display courser in view and 0,0 point
 void displayMenu()
          call to display stored views
 float Height2D()
           
 void keyPress(char k)
          user controll to access and store views preset keys : 'S' to save view 'R' to delete all saved views 1 - 9 to access saved views
 PVector mouse2D()
           
 float mouseX2D()
           
 float mouseY2D()
           
 boolean panZoom()
          Call to pan and zoom 'alt' = zoom 'shift' = pan
 void pushView()
          Call to switch from screen to model space
 void rescale(PVector BBmax, PVector BBmin)
          rescale the view so that the evrything between the given koordinates is displayed
 void resetKey()
          Call this function in the keyReleased void to reset the key && keycode variables to 0.
 float scale2D()
           
 float Width2D()
          get current Width of the Modell Space displayed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

View2D

public View2D()
Method Detail

mouseX2D

public float mouseX2D()
Returns:
current X mouse position in modell space

mouseY2D

public float mouseY2D()
Returns:
current Y mouse position in modell space

mouse2D

public PVector mouse2D()
Returns:
current mouse position in modell space

scale2D

public float scale2D()
Returns:
current scale of the Modell Space

Width2D

public float Width2D()
get current Width of the Modell Space displayed


Height2D

public float Height2D()
Returns:
current Height of the Modell Space displayed

rescale

public void rescale(PVector BBmax,
                    PVector BBmin)
rescale the view so that the evrything between the given koordinates is displayed

Parameters:
BBmax - : maximum
BBmin - : minimum

displayMenu

public void displayMenu()
call to display stored views


pushView

public void pushView()
Call to switch from screen to model space


panZoom

public boolean panZoom()
Call to pan and zoom 'alt' = zoom 'shift' = pan

Returns:
true if aktion happens

resetKey

public void resetKey()
Call this function in the keyReleased void to reset the key && keycode variables to 0. This doesn't happen automaticly!


keyPress

public void keyPress(char k)
user controll to access and store views preset keys : 'S' to save view 'R' to delete all saved views 1 - 9 to access saved views


display

public void display()
call to display courser in view and 0,0 point