Class ptviewer

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----ptviewer

public class ptviewer
extends Applet
implements Runnable

Variable Index

 o dirty
Indicates whether image needs to be rerendered at next repaint() call.
 o hfov
Current horizontal field of view
 o hfov_max
minimum horizontal field of view
 o hfov_min
maximum horizontal field of view
 o pitch
tilt angle
 o pitch_max
maximum tilt angle
 o pitch_min
minimum tilt angle
 o vheight
Dimension of viewer window
 o vwidth
Dimension of viewer window
 o yaw
Current Pan Angle
 o yaw_max
maximum pan angle
 o yaw_min
minimum pan angle

Constructor Index

 o ptviewer()

Method Index

 o bil(int, int, int, int, int, int)
 o destroy()
 o DrawHSImage(int)
Draw hotspot image
 o DrawSHSImage(int)
Draw static hotspot image
 o DrawWarpedImage(Image, int, int)
Insert image into panorama
 o DrawWarpedImage(int[], int, int, int)
Insert image into panorama This method is slightly faster than the one using Images
 o fov()
Return current field of view angle
 o get_x()
The current horizontal and relative mouse coordinates in the panoramic image.
 o get_y()
The current vertical and relative mouse coordinates in the panoramic image.
 o getAppletInfo()
 o getAutoPan()
Returns true if autopanning, or ongoing moveTo() or moveFromTo() processes.
 o getPanoNumber()
The list number of the current panoramic image
 o gotoHS(int)
Jump to the url-link specified in a hotspot
 o gotoView(double, double, double)
Jump to specific position
 o hideHS()
Hide Hotspot Images
 o HideHSImage(int)
Hide hotspot image
 o HideSHSImage(int)
Hide static hotspot image
 o init()
 o isVisibleHS()
Are Hotspot Images visible?
 o keyDown(Event, int)
 o loadImage(String)
Load an image with name name.
 o mouseDown(Event, int, int)
 o mouseDrag(Event, int, int)
 o mouseEnter(Event, int, int)
 o mouseExit(Event, int, int)
 o mouseMove(Event, int, int)
 o mouseUp(Event, int, int)
 o moveFromTo(double, double, double, double, double, double, int)
Moves from a specific position to another position using a specified amount of frames
 o moveTo(double, double, double, int)
Moves from the current position to another position using a specified amount of frames
 o myGetParameter(String, String)
Read parameter values from a list of parameter tags.
 o newPanoFromList(int)
Load a new panoramic image from a list.
 o newPanoFromList(int, double, double, double)
Load a new panoramic image from a list.
 o paint(Graphics)
 o pan()
Return current pan angle
 o panDown()
Tilt down 5 degrees
 o panLeft()
Pan left 5 degrees
 o panRight()
Pan right 5 degrees
 o panUp()
Tilt up 5 degrees
 o PlaySound(int)
Playback Sound file
 o run()
Run threads to load and display the panoramic images and run ptviewer:commands.
 o showHS()
Show Hotspot Images
 o start()
 o startApplet(int)
Start Applet from list of applets
 o startAutoPan(double, double, double)
Starts autopanning.
 o startCommunicating(Applet)
Specify an applet to communicate with.
 o stop()
 o stopApplet(int)
Stop Applet from list of applets
 o stopAutoPan()
Stops autopanning.
 o stopCommunicating(Applet)
Stop communicationg with applet.
 o tilt()
Return current tilt angle
 o toggleHS()
Toggle Visibility of Hotspot Images
 o ToggleHSImage(int)
Toggle visibility of hotspot image
 o ToggleSHSImage(int)
Toggle visibility of static hotspot image
 o update(Graphics)
 o waitWhilePanning()
Wait while autopanning
 o ZoomIn()
Zoom in 3%
 o ZoomOut()
Zoom out 3%

Variables

 o vwidth
 public int vwidth

Dimension of viewer window

 o vheight
 public int vheight
Dimension of viewer window

 o dirty
 public boolean dirty
Indicates whether image needs to be rerendered at next repaint() call.

 o yaw
 public double yaw
Current Pan Angle

 o hfov

 public double hfov
Current horizontal field of view

 o hfov_min
 public double hfov_min
maximum horizontal field of view

 o hfov_max
 public double hfov_max
minimum horizontal field of view

 o pitch
 public double pitch
tilt angle

 o pitch_max
 public double pitch_max
maximum tilt angle

 o pitch_min
 public double pitch_min
minimum tilt angle

 o yaw_max
 public double yaw_max
maximum pan angle

 o yaw_min
 public double yaw_min
minimum pan angle

Constructors

 o ptviewer
 public ptviewer()

Methods

 o init
 public void init()
Overrides:
init in class Applet
 o getAppletInfo
 public String getAppletInfo()
Overrides:
getAppletInfo in class Applet
 o start
 public void start()
Overrides:
start in class Applet
 o stop
 public synchronized void stop()
Overrides:
stop in class Applet
 o destroy
 public synchronized void destroy()
Overrides:
destroy in class Applet
 o run
 public void run()
Run threads to load and display the panoramic images and run ptviewer:commands.

 o loadImage
 public Image loadImage(String name)
Load an image with name name. This method extends the default getImage() of Java, and searches the Resources (archive) also. The image is loaded in memory when the function returns, or null is returned.

 o mouseDown
 public boolean mouseDown(Event evt,
                          int x,
                          int y)
Overrides:
mouseDown in class Component
 o mouseDrag
 public boolean mouseDrag(Event evt,
                          int x,
                          int y)
Overrides:
mouseDrag in class Component
 o mouseUp
 public boolean mouseUp(Event evt,
                        int x,
                        int y)
Overrides:
mouseUp in class Component
 o mouseEnter
 public boolean mouseEnter(Event evt,
                           int x,
                           int y)
Overrides:
mouseEnter in class Component
 o mouseExit
 public boolean mouseExit(Event evt,
                          int x,
                          int y)
Overrides:
mouseExit in class Component
 o keyDown
 public boolean keyDown(Event evt,
                        int key)
Overrides:
keyDown in class Component
 o mouseMove
 public boolean mouseMove(Event evt,
                          int x,
                          int y)
Overrides:
mouseMove in class Component
 o update
 public void update(Graphics g)
Overrides:
update in class Container
 o paint
 public synchronized void paint(Graphics g)
Overrides:
paint in class Container
 o bil
 public int bil(int p00,
                int p01,
                int p10,
                int p11,
                int dx,
                int dy)
 o waitWhilePanning
 public void waitWhilePanning()
Wait while autopanning

 o ZoomIn
 public void ZoomIn()
Zoom in 3%

 o ZoomOut
 public void ZoomOut()
Zoom out 3%

 o panUp
 public void panUp()
Tilt up 5 degrees

 o panDown
 public void panDown()
Tilt down 5 degrees

 o panLeft
 public void panLeft()
Pan left 5 degrees

 o panRight
 public void panRight()
Pan right 5 degrees

 o showHS
 public void showHS()
Show Hotspot Images

 o hideHS
 public void hideHS()
Hide Hotspot Images

 o toggleHS
 public void toggleHS()
Toggle Visibility of Hotspot Images

 o isVisibleHS
 public boolean isVisibleHS()
Are Hotspot Images visible?

 o pan
 public double pan()
Return current pan angle

 o tilt
 public double tilt()
Return current tilt angle

 o fov
 public double fov()
Return current field of view angle

 o moveFromTo
 public void moveFromTo(double p0,
                        double p1,
                        double t0,
                        double t1,
                        double f0,
                        double f1,
                        int nframes)
Moves from a specific position to another position using a specified amount of frames

Parameters:
p0 - Pan angle of starting view
p1 - Pan angle of target view
t0 - Tilt angle of starting view
t1 - Tilt angle of target view
f0 - Field of View angle of starting view
f1 - Field of View of target view
nframes - the number of frames
 o moveTo
 public void moveTo(double pan,
                    double tilt,
                    double fov,
                    int nframes)
Moves from the current position to another position using a specified amount of frames

Parameters:
pan - Pan angle of target view
tilt - Tilt angle of target view
fov - Field of View of target view
nframes - the number of frames
 o startAutoPan
 public void startAutoPan(double p,
                          double t,
                          double z)

Starts autopanning.

Parameters:
p - Pan angle increment per frame
t - Tilt angle increment per frame
z - Field of View angle factor per frame
 o stopAutoPan
 public void stopAutoPan()
Stops autopanning. Also stops ongoing moveTo() or moveFromTo() processes.

 o getAutoPan
 public boolean getAutoPan()
Returns true if autopanning, or ongoing moveTo() or moveFromTo() processes.

 o gotoView
 public void gotoView(double pan,
                      double tilt,
                      double fov)
Jump to specific position

Parameters:
pan - Pan angle
tilt - Tilt angle
fov - Field of View angle
 o gotoHS
 public void gotoHS(int n)
Jump to the url-link specified in a hotspot

Parameters:
n - The list number of the hotspot
 o newPanoFromList
 public synchronized void newPanoFromList(int k,
                                          double pan,
                                          double tilt,
                                          double fov)
Load a new panoramic image from a list.

Parameters:
k - The list number of the panorama
pan - Pan angle
tilt - Tilt angle
fov - Field of view angle
 o newPanoFromList
 public synchronized void newPanoFromList(int k)
Load a new panoramic image from a list.

Parameters:
k - The list number of the panorama
 o startApplet
 public void startApplet(int n)
Start Applet from list of applets

Parameters:
n - The list number
 o stopApplet
 public void stopApplet(int n)

Stop Applet from list of applets

Parameters:
n - The list number
 o myGetParameter
 public String myGetParameter(String p,
                              String param)
Read parameter values from a list of parameter tags. The list has the syntax

{param1=value1} {param2=value2} {param3=value3}

Parameters:
p - The list string.
param - The parameter name.
 o PlaySound
 public synchronized void PlaySound(int n)

Playback Sound file

Parameters:
n - The list number of the Sound file
 o DrawSHSImage
 public synchronized void DrawSHSImage(int n)
Draw static hotspot image

Parameters:
n - The list number of the static hotspot
 o HideSHSImage
 public synchronized void HideSHSImage(int n)
Hide static hotspot image

Parameters:
n - The list number of the static hotspot
 o ToggleSHSImage
 public synchronized void ToggleSHSImage(int n)

Toggle visibility of static hotspot image

Parameters:
n - The list number of the static hotspot
 o DrawHSImage
 public synchronized void DrawHSImage(int n)
Draw hotspot image

Parameters:
n - The list number of the hotspot
 o HideHSImage
 public synchronized void HideHSImage(int n)
Hide hotspot image

Parameters:
n - The list number of the hotspot
 o ToggleHSImage
 public synchronized void ToggleHSImage(int n)

Toggle visibility of hotspot image

Parameters:
n - The list number of the hotspot
 o get_x
 public double get_x()
The current horizontal and relative mouse coordinates in the panoramic image. 0 - left, 100 - right.

 o get_y

 public double get_y()
The current vertical and relative mouse coordinates in the panoramic image. 0 - top, 100 - bottom.

 o getPanoNumber
 public int getPanoNumber()
The list number of the current panoramic image

 o DrawWarpedImage
 public void DrawWarpedImage(Image im,
                             int xi,
                             int yi)
Insert image into panorama

Parameters:
im - The image to be inserted
xi - x coordinate of top left point
yi - y coordinate of top left point
 o DrawWarpedImage
 public synchronized void DrawWarpedImage(int idata[],
                                          int w,
                                          int xi,
                                          int yi)
Insert image into panorama This method is slightly faster than the one using Images

Parameters:
idata - image pixel data to be inserted
w - width of image in pixels
xi - x coordinate of top left point
yi - y coordinate of top left point
 o startCommunicating
 public synchronized void startCommunicating(Applet a)
Specify an applet to communicate with. This applet's paint() method will be called whenever the view changes.

Parameters:
a - the applet.
 o stopCommunicating
 public synchronized void stopCommunicating(Applet a)
Stop communicationg with applet.

Parameters:
a - the applet.