Class ptviewer
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
dirty
Indicates whether image needs to be rerendered at next repaint() call.
hfov
Current horizontal field of view
hfov_max
minimum horizontal field of view
hfov_min
maximum horizontal field of view
pitch
tilt angle
pitch_max
maximum tilt angle
pitch_min
minimum tilt angle
vheight
Dimension of viewer window
vwidth
Dimension of viewer window
yaw
Current Pan Angle
yaw_max
maximum pan angle
yaw_min
minimum pan angle
ptviewer ()
bil (int, int, int, int, int, int)
destroy ()
DrawHSImage (int)
Draw hotspot image
DrawSHSImage (int)
Draw static hotspot image
DrawWarpedImage (Image, int, int)
Insert image into panorama
DrawWarpedImage (int[], int, int, int)
Insert image into panorama
This method is slightly faster than the one using Images
fov ()
Return current field of view angle
get_x ()
The current horizontal and relative mouse coordinates
in the panoramic image.
get_y ()
The current vertical and relative mouse coordinates
in the panoramic image.
getAppletInfo ()
getAutoPan ()
Returns true if autopanning, or ongoing moveTo()
or moveFromTo() processes.
getPanoNumber ()
The list number of the current panoramic image
gotoHS (int)
Jump to the url-link specified in a hotspot
gotoView (double, double, double)
Jump to specific position
hideHS ()
Hide Hotspot Images
HideHSImage (int)
Hide hotspot image
HideSHSImage (int)
Hide static hotspot image
init ()
isVisibleHS ()
Are Hotspot Images visible?
keyDown (Event, int)
loadImage (String)
Load an image with name name.
mouseDown (Event, int, int)
mouseDrag (Event, int, int)
mouseEnter (Event, int, int)
mouseExit (Event, int, int)
mouseMove (Event, int, int)
mouseUp (Event, int, int)
moveFromTo (double, double, double, double, double, double, int)
Moves from a specific position to another position using a specified amount of frames
moveTo (double, double, double, int)
Moves from the current position to another position using a specified amount of frames
myGetParameter (String, String)
Read parameter values from a list of parameter tags.
newPanoFromList (int)
Load a new panoramic image from a list.
newPanoFromList (int, double, double, double)
Load a new panoramic image from a list.
paint (Graphics)
pan ()
Return current pan angle
panDown ()
Tilt down 5 degrees
panLeft ()
Pan left 5 degrees
panRight ()
Pan right 5 degrees
panUp ()
Tilt up 5 degrees
PlaySound (int)
Playback Sound file
run ()
Run threads to load and display the panoramic images and
run ptviewer:commands.
showHS ()
Show Hotspot Images
start ()
startApplet (int)
Start Applet from list of applets
startAutoPan (double, double, double)
Starts autopanning.
startCommunicating (Applet)
Specify an applet to communicate with.
stop ()
stopApplet (int)
Stop Applet from list of applets
stopAutoPan ()
Stops autopanning.
stopCommunicating (Applet)
Stop communicationg with applet.
tilt ()
Return current tilt angle
toggleHS ()
Toggle Visibility of Hotspot Images
ToggleHSImage (int)
Toggle visibility of hotspot image
ToggleSHSImage (int)
Toggle visibility of static hotspot image
update (Graphics)
waitWhilePanning ()
Wait while autopanning
ZoomIn ()
Zoom in 3%
ZoomOut ()
Zoom out 3%
vwidth
public int vwidth
Dimension of viewer window
vheight
public int vheight
Dimension of viewer window
dirty
public boolean dirty
Indicates whether image needs to be rerendered at next repaint() call.
yaw
public double yaw
Current Pan Angle
hfov
public double hfov
Current horizontal field of view
hfov_min
public double hfov_min
maximum horizontal field of view
hfov_max
public double hfov_max
minimum horizontal field of view
pitch
public double pitch
tilt angle
pitch_max
public double pitch_max
maximum tilt angle
pitch_min
public double pitch_min
minimum tilt angle
yaw_max
public double yaw_max
maximum pan angle
yaw_min
public double yaw_min
minimum pan angle
ptviewer
public ptviewer()
init
public void init()
Overrides:
init in class Applet
getAppletInfo
public String getAppletInfo()
Overrides:
getAppletInfo in class Applet
start
public void start()
Overrides:
start in class Applet
stop
public synchronized void stop()
Overrides:
stop in class Applet
destroy
public synchronized void destroy()
Overrides:
destroy in class Applet
run
public void run()
Run threads to load and display the panoramic images and
run ptviewer:commands.
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.
mouseDown
public boolean mouseDown(Event evt,
int x,
int y)
Overrides:
mouseDown in class Component
mouseDrag
public boolean mouseDrag(Event evt,
int x,
int y)
Overrides:
mouseDrag in class Component
mouseUp
public boolean mouseUp(Event evt,
int x,
int y)
Overrides:
mouseUp in class Component
mouseEnter
public boolean mouseEnter(Event evt,
int x,
int y)
Overrides:
mouseEnter in class Component
mouseExit
public boolean mouseExit(Event evt,
int x,
int y)
Overrides:
mouseExit in class Component
keyDown
public boolean keyDown(Event evt,
int key)
Overrides:
keyDown in class Component
mouseMove
public boolean mouseMove(Event evt,
int x,
int y)
Overrides:
mouseMove in class Component
update
public void update(Graphics g)
Overrides:
update in class Container
paint
public synchronized void paint(Graphics g)
Overrides:
paint in class Container
bil
public int bil(int p00,
int p01,
int p10,
int p11,
int dx,
int dy)
waitWhilePanning
public void waitWhilePanning()
Wait while autopanning
ZoomIn
public void ZoomIn()
Zoom in 3%
ZoomOut
public void ZoomOut()
Zoom out 3%
panUp
public void panUp()
Tilt up 5 degrees
panDown
public void panDown()
Tilt down 5 degrees
panLeft
public void panLeft()
Pan left 5 degrees
panRight
public void panRight()
Pan right 5 degrees
showHS
public void showHS()
Show Hotspot Images
hideHS
public void hideHS()
Hide Hotspot Images
toggleHS
public void toggleHS()
Toggle Visibility of Hotspot Images
isVisibleHS
public boolean isVisibleHS()
Are Hotspot Images visible?
pan
public double pan()
Return current pan angle
tilt
public double tilt()
Return current tilt angle
fov
public double fov()
Return current field of view angle
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
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
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
stopAutoPan
public void stopAutoPan()
Stops autopanning. Also stops ongoing moveTo()
or moveFromTo() processes.
getAutoPan
public boolean getAutoPan()
Returns true if autopanning, or ongoing moveTo()
or moveFromTo() processes.
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
gotoHS
public void gotoHS(int n)
Jump to the url-link specified in a hotspot
Parameters:
n - The list number of the hotspot
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
newPanoFromList
public synchronized void newPanoFromList(int k)
Load a new panoramic image from a list.
Parameters:
k - The list number of the panorama
startApplet
public void startApplet(int n)
Start Applet from list of applets
Parameters:
n - The list number
stopApplet
public void stopApplet(int n)
Stop Applet from list of applets
Parameters:
n - The list number
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.
PlaySound
public synchronized void PlaySound(int n)
Playback Sound file
Parameters:
n - The list number of the Sound file
DrawSHSImage
public synchronized void DrawSHSImage(int n)
Draw static hotspot image
Parameters:
n - The list number of the static hotspot
HideSHSImage
public synchronized void HideSHSImage(int n)
Hide static hotspot image
Parameters:
n - The list number of the static hotspot
ToggleSHSImage
public synchronized void ToggleSHSImage(int n)
Toggle visibility of static hotspot image
Parameters:
n - The list number of the static hotspot
DrawHSImage
public synchronized void DrawHSImage(int n)
Draw hotspot image
Parameters:
n - The list number of the hotspot
HideHSImage
public synchronized void HideHSImage(int n)
Hide hotspot image
Parameters:
n - The list number of the hotspot
ToggleHSImage
public synchronized void ToggleHSImage(int n)
Toggle visibility of hotspot image
Parameters:
n - The list number of the hotspot
get_x
public double get_x()
The current horizontal and relative mouse coordinates
in the panoramic image. 0 - left, 100 - right.
get_y
public double get_y()
The current vertical and relative mouse coordinates
in the panoramic image. 0 - top, 100 - bottom.
getPanoNumber
public int getPanoNumber()
The list number of the current panoramic image
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
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
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.
stopCommunicating
public synchronized void stopCommunicating(Applet a)
Stop communicationg with applet.
Parameters:
a - the applet.
Capturé par MemoWeb ŕ partir de http://www.fh-furtwangen.de/%7Edersch/PTVJ/ptviewer.html le 30/05/01