jwo.landserf.gui3d
Class Route3D

java.lang.Object
  |
  +--jwo.vfc.hub.XMLProcessor
        |
        +--jwo.landserf.gui3d.Route3D
All Implemented Interfaces:
ErrorHandler

public class Route3D
extends XMLProcessor

Class for storing 3d routes over a surface. Uses XML as the file format and a DOM for the route structure.

Version:
1.8.0, 11th April, 2002.
Author:
Jo Wood

Field Summary
 
Fields inherited from class jwo.vfc.hub.XMLProcessor
errorMessage, errors
 
Constructor Summary
Route3D()
          Creates an empty route.
Route3D(String fileName)
          Creates a route based on the given XML file.
 
Method Summary
 void addViewpoint(float x, float y, float z, float heading, float pitch)
          Adds a viewpoint to the route.
 JWRectangle getBounds()
          Reports the bounding rectangle of the route positions.
 float[][] getRoute()
          Returns the coordinates and viewing directions of the current route.
 String getTitle()
          Reports the title of the route.
 
Methods inherited from class jwo.vfc.hub.XMLProcessor
createDefault, error, fatalError, getDOM, getErrorMessage, hasErrors, readXML, validateDOM, warning, writeXML, writeXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Route3D

public Route3D()
Creates an empty route.


Route3D

public Route3D(String fileName)
Creates a route based on the given XML file.

Parameters:
fileName - Name of XML file storing route information.
Method Detail

addViewpoint

public void addViewpoint(float x,
                         float y,
                         float z,
                         float heading,
                         float pitch)
Adds a viewpoint to the route.

Parameters:
x - X coordinate of viewpoint.
y - Y coordinate of viewpoint.
z - Elevation of viewpoint.
heading - Viewpoint heading (azimuth).
pitch - Viewpoint pitch.

getRoute

public float[][] getRoute()
Returns the coordinates and viewing directions of the current route.

Returns:
Array holding coordinates and viewing directions of current route.

getBounds

public JWRectangle getBounds()
Reports the bounding rectangle of the route positions.

Returns:
Rectangle bounding all viewpoints in route.

getTitle

public String getTitle()
Reports the title of the route.

Returns:
Title of route.