videoRangePanel
Class ShoreManager

java.lang.Object
  extended by videoRangePanel.ShoreManager

public class ShoreManager
extends java.lang.Object

Separate class to manage shore functions for the video range, all this could go in the controller, but might as well keep it separate.

Author:
Douglas Gillespie

Field Summary
private  MapFileManager mapFileManager
           
 
Constructor Summary
ShoreManager()
           
ShoreManager(MapFileManager mapFileManager)
           
 
Method Summary
 LatLong getIntercept(LatLong origin, double bearing, LatLong ll1, LatLong ll2)
          See if a line drawn at a given bearing from some origin intercepts a line between two other points.
 MapFileManager getMapFileManager()
           
 java.util.Vector<LatLong> getShoreInterceptList(LatLong origin, double trueBearing)
           
 double[] getSortedShoreRanges(LatLong origin, double trueBearing)
           
 void setMapFileManager(MapFileManager mapFileManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapFileManager

private MapFileManager mapFileManager
Constructor Detail

ShoreManager

public ShoreManager()

ShoreManager

public ShoreManager(MapFileManager mapFileManager)
Method Detail

getMapFileManager

public MapFileManager getMapFileManager()

setMapFileManager

public void setMapFileManager(MapFileManager mapFileManager)

getShoreInterceptList

public java.util.Vector<LatLong> getShoreInterceptList(LatLong origin,
                                                       double trueBearing)

getIntercept

public LatLong getIntercept(LatLong origin,
                            double bearing,
                            LatLong ll1,
                            LatLong ll2)
See if a line drawn at a given bearing from some origin intercepts a line between two other points. If they do, then return the LatLong of the intercept point, otherwise return null.

Parameters:
origin - origin of bearing line
bearing - true bearing (degrees clockwise from North)
ll1 - lat long of start of line segment
ll2 - lat long of end of line segment
Returns:
LatLong of intercept or null

getSortedShoreRanges

public double[] getSortedShoreRanges(LatLong origin,
                                     double trueBearing)