com.steema.teechart.functions
Class Spline

java.lang.Object
  extended by com.steema.teechart.functions.Spline

public class Spline
extends java.lang.Object

Title: Spline class

Description: Spline smoothing.

Copyright (c) 2005-2013 by Steema Software SL. All Rights Reserved.

Company: Steema Software SL


Constructor Summary
Spline()
          Spline smoothing.
 
Method Summary
 void addPoint(double x, double y)
          Adds a new source point with specified X and Y values.
 void clear()
          Removes all source points.
 boolean getBuild()
          Indicates the spline has already calculated smooth points.
 int getFragments()
          The number of resulting smooth points.
 boolean getInterpolated()
          When true, the spline calculates interpolated points that will pass exactly over source points.
 Point.Double getPoint(int index)
           
 int numberOfVertices()
          Returns the number of total source points.
 void rebuild()
          Calculates new smoothed points from list of points.
 void setBuild(boolean value)
          Indicates the spline has already calculated smooth points.
 void setFragments(int value)
          Sets the number of resulting smooth points.
 void setInterpolated(boolean value)
          When true, the spline calculates interpolated points that will pass exactly over source points.
 void setKnuckle(int index, boolean value)
          Makes the Index source point a control point.
 void setPoint(int index, Point.Double value)
          Use to set the source point for the Knuckle

 Point.Double value(double parameter)
          Returns an interpolated point.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Spline

public Spline()
Spline smoothing.

Method Detail

getBuild

public boolean getBuild()
Indicates the spline has already calculated smooth points.
Set to false to force the spline to rebuild smooth points.

Returns:
boolean

setBuild

public void setBuild(boolean value)
Indicates the spline has already calculated smooth points.
Set to false to force the spline to rebuild smooth points.

Parameters:
value - boolean

getFragments

public int getFragments()
The number of resulting smooth points.
Must be a multiple of source points.

Returns:
int

setFragments

public void setFragments(int value)
Sets the number of resulting smooth points.
Must be a multiple of source points.

Parameters:
value - int

getInterpolated

public boolean getInterpolated()
When true, the spline calculates interpolated points that will pass exactly over source points.
When false, the spline resulting points do not necessarily pass over source points.
Default value: false

Returns:
boolean

setInterpolated

public void setInterpolated(boolean value)
When true, the spline calculates interpolated points that will pass exactly over source points.
When false, the spline resulting points do not necessarily pass over source points.
Default value: false

Parameters:
value - boolean

getPoint

public Point.Double getPoint(int index)

setPoint

public void setPoint(int index,
                     Point.Double value)
Use to set the source point for the Knuckle

Parameters:
index - int
value - Double

setKnuckle

public void setKnuckle(int index,
                       boolean value)
Makes the Index source point a control point.

By default, TSmoothingFunction does not set any source point
as a control point.

Parameters:
index - int
value - boolean

numberOfVertices

public int numberOfVertices()
Returns the number of total source points.
For each point that is a control point ( Knuckle[ Index ] is true ), the number of vertices is incremented by 2.

Returns:
int

rebuild

public void rebuild()
Calculates new smoothed points from list of points.


addPoint

public void addPoint(double x,
                     double y)
Adds a new source point with specified X and Y values.

Parameters:
x - double
y - double

clear

public void clear()
Removes all source points.


value

public Point.Double value(double parameter)
Returns an interpolated point.

Parameters:
parameter - double
Returns:
Double