endrov.windowLineage
Class HierarchicalPainter.Camera

java.lang.Object
  extended by endrov.windowLineage.HierarchicalPainter.Camera
Enclosing class:
HierarchicalPainter

public static class HierarchicalPainter.Camera
extends java.lang.Object

Location of camera and current zoom


Field Summary
 double cameraX
           
 double cameraY
           
 double zoomX
           
 double zoomY
           
 
Constructor Summary
HierarchicalPainter.Camera()
           
 
Method Summary
 void panCorrespondenceX(double screenX, double worldX)
          Make screen coordinate correspond to world coordinate by moving camera
 void panCorrespondenceY(double screenY, double worldY)
          Make screen coordinate correspond to world coordinate by moving camera
 double scaleScreenDistX(double x)
          How much to add to screenX given distance in screen space
 double scaleScreenDistY(double y)
           
 double scaleWorldDistX(double x)
          How much to add to screenX given distance in world space
 double scaleWorldDistY(double y)
           
 void showArea(HierarchicalPainter.BoundingBox bb, int width, int height)
          Set camera so that it covers given area
 int toScreenX(double x)
           
 int toScreenY(double y)
           
 java.lang.String toString()
           
 double toWorldX(double x)
           
 double toWorldY(double y)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cameraX

public double cameraX

cameraY

public double cameraY

zoomX

public double zoomX

zoomY

public double zoomY
Constructor Detail

HierarchicalPainter.Camera

public HierarchicalPainter.Camera()
Method Detail

toScreenX

public int toScreenX(double x)

toScreenY

public int toScreenY(double y)

toWorldX

public double toWorldX(double x)

toWorldY

public double toWorldY(double y)

scaleScreenDistX

public double scaleScreenDistX(double x)
How much to add to screenX given distance in screen space


scaleScreenDistY

public double scaleScreenDistY(double y)

scaleWorldDistX

public double scaleWorldDistX(double x)
How much to add to screenX given distance in world space


scaleWorldDistY

public double scaleWorldDistY(double y)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

showArea

public void showArea(HierarchicalPainter.BoundingBox bb,
                     int width,
                     int height)
Set camera so that it covers given area


panCorrespondenceX

public void panCorrespondenceX(double screenX,
                               double worldX)
Make screen coordinate correspond to world coordinate by moving camera


panCorrespondenceY

public void panCorrespondenceY(double screenY,
                               double worldY)
Make screen coordinate correspond to world coordinate by moving camera