com.bbn.openmap.omGraphics
Class NatCubicSpline

java.lang.Object
  extended by com.bbn.openmap.omGraphics.NatCubicSpline
Direct Known Subclasses:
NatCubicClosedSpline

public class NatCubicSpline
extends java.lang.Object

A natural cubic spline calculation.

Version:
21 juil. 2002
Author:
Eric LEPICIER
See Also:
Splines

Constructor Summary
NatCubicSpline()
           
 
Method Summary
 double[] calc(double[] llpoints, double precision)
          Calculates a float lat/lon cubic spline
 float[][] calc(float[] xpoints, float[] ypoints)
          Calculates a cubic spline polyline
 float[][] calc(int[] xpoints, int[] ypoints)
          Calculates a cubic spline polyline
 int getSteps()
          Returns the steps.
 void setSteps(int steps)
          Sets the number of points (steps) interpolated on the curve between the original points to draw it as a polyline.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NatCubicSpline

public NatCubicSpline()
Method Detail

calc

public float[][] calc(int[] xpoints,
                      int[] ypoints)
Calculates a cubic spline polyline

Parameters:
xpoints -
ypoints -
Returns:
float[][]

calc

public float[][] calc(float[] xpoints,
                      float[] ypoints)
Calculates a cubic spline polyline

Parameters:
xpoints - in float precision.
ypoints - in float precision.
Returns:
flaot[][]

calc

public double[] calc(double[] llpoints,
                     double precision)
Calculates a float lat/lon cubic spline

Parameters:
llpoints -
precision - for dividing floating coordinates to become int, e.g 0.01 means spline to be calculated with coordinates * 100
Returns:
float[]

getSteps

public int getSteps()
Returns the steps.

Returns:
int

setSteps

public void setSteps(int steps)
Sets the number of points (steps) interpolated on the curve between the original points to draw it as a polyline.

Parameters:
steps - The steps to set


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details