C# Class LibNoise.Modifier.Curve

Noise module that maps the output value from a source module onto an arbitrary function curve. This noise module maps the output value from the source module onto an application-defined curve. This curve is defined by a number of control points; each control point has an input value that maps to an output value. Refer to the following illustration: To add the control points to this curve, call the AddControlPoint() method. Since this curve is a cubic spline, an application must add a minimum of four control points to the curve. If this is not done, the GetValue() method fails. Each control point can have any input and output value, although no two control points can have the same input value. There is no limit to the number of control points that can be added to the curve.
Inheritance: ModifierModule, IModule3D
Show file Open project: everbytes/LibNoise

Protected Properties

Property Type Description
_controlPoints List

Public Methods

Method Description
AddControlPoint ( ControlPoint point ) : void

Adds a control point to the curve. No two control points have the same input value. @throw System.ArgumentException if two control points have the same input value. It does not matter which order these points are added.

AddControlPoint ( float input, float output ) : void

Adds a control point to the curve. No two control points have the same input value. @throw System.ArgumentException if two control points have the same input value. It does not matter which order these points are added.

ClearControlPoints ( ) : void

Deletes all the control points on the curve.

CountControlPoints ( ) : int

Return the size of the ControlPoint list

Curve ( ) : System
Curve ( IModule source ) : System
GetValue ( float x, float y, float z ) : float

Generates an output value given the coordinates of the specified input value.

getControlPoints ( ) : IList

Returns a read-only IList wrapper for the current ControlPoint list.

Protected Methods

Method Description
SortControlPoints ( ) : void

Method Details

AddControlPoint() public method

Adds a control point to the curve. No two control points have the same input value. @throw System.ArgumentException if two control points have the same input value. It does not matter which order these points are added.
public AddControlPoint ( ControlPoint point ) : void
point ControlPoint
return void

AddControlPoint() public method

Adds a control point to the curve. No two control points have the same input value. @throw System.ArgumentException if two control points have the same input value. It does not matter which order these points are added.
public AddControlPoint ( float input, float output ) : void
input float The input value stored in the control point.
output float The output value stored in the control point.
return void

ClearControlPoints() public method

Deletes all the control points on the curve.
public ClearControlPoints ( ) : void
return void

CountControlPoints() public method

Return the size of the ControlPoint list
public CountControlPoints ( ) : int
return int

Curve() public method

public Curve ( ) : System
return System

Curve() public method

public Curve ( IModule source ) : System
source IModule
return System

GetValue() public method

Generates an output value given the coordinates of the specified input value.
public GetValue ( float x, float y, float z ) : float
x float The input coordinate on the x-axis.
y float The input coordinate on the y-axis.
z float The input coordinate on the z-axis.
return float

SortControlPoints() protected method

protected SortControlPoints ( ) : void
return void

getControlPoints() public method

Returns a read-only IList wrapper for the current ControlPoint list.
public getControlPoints ( ) : IList
return IList

Property Details

_controlPoints protected property

protected List _controlPoints
return List