com.bbn.openmap.omGraphics
Class NatCubicSpline

java.lang.Object
  extended bycom.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
 float[] calc(float[] llpoints, float precision)
          Calculates a float lat/lon cubic spline
 int[][] 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 int[][] calc(int[] xpoints,
                    int[] ypoints)
Calculates a cubic spline polyline

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

calc

public float[] calc(float[] llpoints,
                    float 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