edu.psu.geovista.ui
Class Fisheyes

java.lang.Object
  extended byedu.psu.geovista.ui.Fisheyes

public class Fisheyes
extends java.lang.Object

Fisheyes manage space deformation to maintain focus+context views by applying a space deformation. See Sheelagh Carpendale's PhD for full details.

Version:
$Revision: 1.1 $
Author:
Jean-Daniel Fekete

Nested Class Summary
static interface Fisheyes.LensProfile
           
static interface Fisheyes.Metric
           
static class Fisheyes.ProfileCos
           
 
Field Summary
static short DISTANCE_L1
          constant value for setDistanceMetric to use a L1 distance
static short DISTANCE_L2
          constant value for setDistanceMetric to use a L2 distance
static short DISTANCE_LINF
          constant value for setDistanceMetric to use a L infinity distance
static float distanceViewplance
          The virtual viewplane is located at this distance from the camera
static short LENS_COSINE
          constant value for setLensType to use a cosine lens types
static short LENS_GAUSSIAN
          constant value for setLensType to use a gaussian lens types
static short LENS_HEMISPHERE
          constant value for setLensType to use a hemisphere lens types
static short LENS_INVERSE_COSINE
          constant value for setLensType to use an inverse cosine lens types
static short LENS_LINEAR
          constant value for setLensType to use a linear lens types
static float referenceHeight
          The virtual camera height is 10.0f
 
Constructor Summary
Fisheyes()
          Constructor for Fisheyes.
Fisheyes(float lensRadius, float focusRadius, float focalHeight)
          Creates a new Fisheye object.
 
Method Summary
 float distance(float x, float y)
          Returns the distance of the specified point from the focus.
 java.awt.geom.Rectangle2D getBounds()
           
 short getDistanceMetric()
          Returns the distanceMetric.
 float getFocalHeight()
          Returns the focal height.
 float getFocusRadius()
          Returns the focusRadius.
 float getFocusX()
          Returns the focusX.
 float getFocusY()
          Returns the focusY.
 float getLensRadius()
          Returns the lensRadius.
 short getLensType()
          Returns the lensType.
 float getMaximumScale()
          Returns the maximum scale
 float getScale(float x, float y)
          DOCUMENT ME!
 float getTolerance()
          Returns the tolerance.
 float height(float dist)
          Returns the height at the specified distance from the focus
 boolean isTransformed(double x, double y)
          Returns true of point is transformed.
 boolean isTransformed(float x, float y)
          Returns true of point is transformed.
 boolean isTransformed(java.awt.geom.Point2D p)
          Returns true of point is transformed.
 boolean isTransformed(java.awt.geom.Rectangle2D bounds)
          DOCUMENT ME!
 boolean isTransformed(java.awt.Shape s)
          DOCUMENT ME!
 float lens(float t)
          Returns the height at the specified normalized distance from the focus
 float pointHeight(float x, float y)
          Returns the height of a specified point.
 void setDistanceMetric(short distanceMetrics)
          Sets the distanceMetric.
 void setFocalHeight(float focalHeight)
          Sets the focal height.
 void setFocus(float x, float y)
          Sets for focus position
 void setFocusRadius(float focusRadius)
          Sets the focusRadius.
 void setFocusX(float focusX)
          Sets the focusX.
 void setFocusY(float focusY)
          Sets the focusY.
 void setLensRadius(float radius)
          Sets the lensRadius.
 void setLensType(short lensType)
          Sets the lensType.
 void setMaximumScale(float scale)
          Change the maximum scale
 void setRadii(float focus, float lens)
          DOCUMENT ME!
 void setTolerance(float tolerance)
          Sets the tolerance.
 void subdivide(float x1, float y1, float tx1, float ty1, float x2, float y2, float tx2, float ty2, float x3, float y3, float tx3, float ty3, float x4, float y4, float tx4, float ty4, java.awt.geom.GeneralPath p)
          Subdivide a quad segment.
 void subdivide(float x1, float y1, float tx1, float ty1, float x2, float y2, float tx2, float ty2, float x3, float y3, float tx3, float ty3, java.awt.geom.GeneralPath p)
          Subdivide a quad segment.
 void subdivide(float x1, float y1, float tx1, float ty1, float x2, float y2, float tx2, float ty2, java.awt.geom.GeneralPath p)
          Subdivide a line segment.
 void transform(float[] coords, int npoints)
          DOCUMENT ME!
 void transform(java.awt.geom.Point2D.Float src, java.awt.geom.Point2D.Float dst)
          DOCUMENT ME!
 java.awt.Shape transform(java.awt.Shape s)
          DOCUMENT ME!
 float transformX(float x, float scale)
          DOCUMENT ME!
 float transformY(float y, float scale)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DISTANCE_L1

public static final short DISTANCE_L1
constant value for setDistanceMetric to use a L1 distance

See Also:
Constant Field Values

DISTANCE_L2

public static final short DISTANCE_L2
constant value for setDistanceMetric to use a L2 distance

See Also:
Constant Field Values

DISTANCE_LINF

public static final short DISTANCE_LINF
constant value for setDistanceMetric to use a L infinity distance

See Also:
Constant Field Values

LENS_GAUSSIAN

public static final short LENS_GAUSSIAN
constant value for setLensType to use a gaussian lens types

See Also:
Constant Field Values

LENS_COSINE

public static final short LENS_COSINE
constant value for setLensType to use a cosine lens types

See Also:
Constant Field Values

LENS_HEMISPHERE

public static final short LENS_HEMISPHERE
constant value for setLensType to use a hemisphere lens types

See Also:
Constant Field Values

LENS_LINEAR

public static final short LENS_LINEAR
constant value for setLensType to use a linear lens types

See Also:
Constant Field Values

LENS_INVERSE_COSINE

public static final short LENS_INVERSE_COSINE
constant value for setLensType to use an inverse cosine lens types

See Also:
Constant Field Values

referenceHeight

public static final float referenceHeight
The virtual camera height is 10.0f

See Also:
Constant Field Values

distanceViewplance

public static final float distanceViewplance
The virtual viewplane is located at this distance from the camera

See Also:
Constant Field Values
Constructor Detail

Fisheyes

public Fisheyes()
Constructor for Fisheyes.


Fisheyes

public Fisheyes(float lensRadius,
                float focusRadius,
                float focalHeight)
Creates a new Fisheye object.

Parameters:
lensRadius - the lens radius.
focusRadius - DOCUMENT ME!
focalHeight - the focal heigt (0 <= 9)
Method Detail

getBounds

public java.awt.geom.Rectangle2D getBounds()

isTransformed

public boolean isTransformed(float x,
                             float y)
Returns true of point is transformed.

Parameters:
x - X coordinate
y - Y coordinate
Returns:
true of point is transformed.

isTransformed

public boolean isTransformed(double x,
                             double y)
Returns true of point is transformed.

Parameters:
x - X coordinate
y - Y coordinate
Returns:
true of point is transformed.

isTransformed

public boolean isTransformed(java.awt.geom.Point2D p)
Returns true of point is transformed.

Parameters:
p - the point
Returns:
true of point is transformed.

isTransformed

public boolean isTransformed(java.awt.geom.Rectangle2D bounds)
DOCUMENT ME!

Parameters:
bounds - DOCUMENT ME!
Returns:
DOCUMENT ME!

isTransformed

public boolean isTransformed(java.awt.Shape s)
DOCUMENT ME!

Parameters:
s - DOCUMENT ME!
Returns:
DOCUMENT ME!

transform

public java.awt.Shape transform(java.awt.Shape s)
DOCUMENT ME!

Parameters:
s - DOCUMENT ME!
Returns:
DOCUMENT ME!

subdivide

public void subdivide(float x1,
                      float y1,
                      float tx1,
                      float ty1,
                      float x2,
                      float y2,
                      float tx2,
                      float ty2,
                      java.awt.geom.GeneralPath p)
Subdivide a line segment.

Parameters:
x1 - X coordinate of first point
y1 - Y coordinate of first point
tx1 - Y coordinate of first point
ty1 - transformed Y coordinate of first point
x2 - X coordinate of second point
y2 - Y coordinate of second point
tx2 - Y coordinate of second point
ty2 - transformed Y coordinate of second point
p - GeneralPath to fill

subdivide

public void subdivide(float x1,
                      float y1,
                      float tx1,
                      float ty1,
                      float x2,
                      float y2,
                      float tx2,
                      float ty2,
                      float x3,
                      float y3,
                      float tx3,
                      float ty3,
                      java.awt.geom.GeneralPath p)
Subdivide a quad segment.

Parameters:
x1 - X coordinate of first point
y1 - Y coordinate of first point
tx1 - Y coordinate of first point
ty1 - transformed Y coordinate of first point
x2 - X coordinate of second point
y2 - Y coordinate of second point
tx2 - Y coordinate of second point
ty2 - transformed Y coordinate of second point
x3 - X coordinate of third point
y3 - Y coordinate of third point
tx3 - Y coordinate of third point
ty3 - transformed Y coordinate of third point
p - GeneralPath to fill

subdivide

public void subdivide(float x1,
                      float y1,
                      float tx1,
                      float ty1,
                      float x2,
                      float y2,
                      float tx2,
                      float ty2,
                      float x3,
                      float y3,
                      float tx3,
                      float ty3,
                      float x4,
                      float y4,
                      float tx4,
                      float ty4,
                      java.awt.geom.GeneralPath p)
Subdivide a quad segment.

Parameters:
x1 - X coordinate of first point
y1 - Y coordinate of first point
tx1 - Y coordinate of first point
ty1 - transformed Y coordinate of first point
x2 - X coordinate of second point
y2 - Y coordinate of second point
tx2 - Y coordinate of second point
ty2 - transformed Y coordinate of second point
x3 - X coordinate of third point
y3 - Y coordinate of third point
tx3 - Y coordinate of third point
ty3 - transformed Y coordinate of third point
p - GeneralPath to fill

pointHeight

public float pointHeight(float x,
                         float y)
Returns the height of a specified point.

Parameters:
x - X coordinate of the point
y - Y coordinate of the point
Returns:
the height of the specified point.

setFocus

public void setFocus(float x,
                     float y)
Sets for focus position

Parameters:
x - X coordinate of the position
y - X coordinate of the position

distance

public float distance(float x,
                      float y)
Returns the distance of the specified point from the focus.

Parameters:
x - X coordinate of the point
y - Y coordinate of the point
Returns:
the distance of the specified point from the focus.

height

public float height(float dist)
Returns the height at the specified distance from the focus

Parameters:
dist - the distance
Returns:
the height at the specified distance from the focus

lens

public float lens(float t)
Returns the height at the specified normalized distance from the focus

Parameters:
t - the normalized distance from the focus
Returns:
the height at the specified normalized distance from the focus

getFocusX

public float getFocusX()
Returns the focusX.

Returns:
float

getFocusY

public float getFocusY()
Returns the focusY.

Returns:
float

setFocusX

public void setFocusX(float focusX)
Sets the focusX.

Parameters:
focusX - The focusX to set

getLensRadius

public float getLensRadius()
Returns the lensRadius.

Returns:
float

setFocusY

public void setFocusY(float focusY)
Sets the focusY.

Parameters:
focusY - The focusY to set

setLensRadius

public void setLensRadius(float radius)
Sets the lensRadius.

Parameters:
radius - The lensRadius to set

getFocusRadius

public float getFocusRadius()
Returns the focusRadius.

Returns:
float

setFocusRadius

public void setFocusRadius(float focusRadius)
Sets the focusRadius.

Parameters:
focusRadius - The focusRadius to set

setRadii

public void setRadii(float focus,
                     float lens)
DOCUMENT ME!

Parameters:
focus - DOCUMENT ME!
lens - DOCUMENT ME!

getFocalHeight

public float getFocalHeight()
Returns the focal height.

Returns:
float

setFocalHeight

public void setFocalHeight(float focalHeight)
Sets the focal height.

Parameters:
focalHeight - The focal height to set

setMaximumScale

public void setMaximumScale(float scale)
Change the maximum scale

Parameters:
scale - the new maximum scale

getMaximumScale

public float getMaximumScale()
Returns the maximum scale

Returns:
the maximum scale

getScale

public float getScale(float x,
                      float y)
DOCUMENT ME!

Parameters:
x - DOCUMENT ME!
y - DOCUMENT ME!
Returns:
DOCUMENT ME!

transformX

public float transformX(float x,
                        float scale)
DOCUMENT ME!

Parameters:
x - DOCUMENT ME!
scale - DOCUMENT ME!
Returns:
DOCUMENT ME!

transformY

public float transformY(float y,
                        float scale)
DOCUMENT ME!

Parameters:
y - DOCUMENT ME!
scale - DOCUMENT ME!
Returns:
DOCUMENT ME!

transform

public void transform(float[] coords,
                      int npoints)
DOCUMENT ME!

Parameters:
coords - DOCUMENT ME!

transform

public void transform(java.awt.geom.Point2D.Float src,
                      java.awt.geom.Point2D.Float dst)
DOCUMENT ME!

Parameters:
src - DOCUMENT ME!
dst - DOCUMENT ME!

getDistanceMetric

public short getDistanceMetric()
Returns the distanceMetric.

Returns:
short the distanceMetric

getLensType

public short getLensType()
Returns the lensType.

Returns:
short

setDistanceMetric

public void setDistanceMetric(short distanceMetrics)
Sets the distanceMetric.

Parameters:
distanceMetrics - The distanceMetric to set

setLensType

public void setLensType(short lensType)
Sets the lensType.

Parameters:
lensType - The lensType to set

getTolerance

public float getTolerance()
Returns the tolerance.

Returns:
float

setTolerance

public void setTolerance(float tolerance)
Sets the tolerance.

Parameters:
tolerance - The tolerance to set


Copyright © 1996-2003 GeoVista Center. All Rights Reserved.