C# Class LibNoise.Modifier.Select

Noise module that outputs the value selected from one of two source modules chosen by the output value from a control module. - LeftModule outputs a value. - RightModule outputs a value. - ControlModule is known as the control module. The control module determines the value to select. If the output value from the control module is within a range of values known as the selection range, this noise module outputs the value from the RightModule. Otherwise, this noise module outputs the value from the LeftModule By default, there is an abrupt transition between the output values from the two source modules at the selection-range boundary. To smooth the transition, pass a non-zero value to the EdgeFalloff method. Higher values result in a smoother transition.
Inheritance: SelectorModule, IModule3D
Datei anzeigen Open project: everbytes/LibNoise

Protected Properties

Property Type Description
_controlModule IModule
_edgeFalloff float
_leftModule IModule
_lowerBound float
_rightModule IModule
_upperBound float

Public Methods

Method Description
GetValue ( float x, float y, float z ) : float

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

Select ( ) : System.Diagnostics
Select ( IModule controlModule, IModule rightModule, IModule leftModule, float lower, float upper, float edge ) : System.Diagnostics
SetBounds ( float lower, float upper ) : void

Method Details

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

Select() public method

public Select ( ) : System.Diagnostics
return System.Diagnostics

Select() public method

public Select ( IModule controlModule, IModule rightModule, IModule leftModule, float lower, float upper, float edge ) : System.Diagnostics
controlModule IModule
rightModule IModule
leftModule IModule
lower float
upper float
edge float
return System.Diagnostics

SetBounds() public method

public SetBounds ( float lower, float upper ) : void
lower float
upper float
return void

Property Details

_controlModule protected_oe property

protected IModule _controlModule
return IModule

_edgeFalloff protected_oe property

The falloff value is the width of the edge transition at either edge of the selection range. By default, there is an abrupt transition between the values from the two source modules at the boundaries of the selection range. For example, if the selection range is 0.5 to 0.8, and the edge falloff value is 0.1, then the GetValue() method outputs: - the output value from the source module with an index value of 0 if the output value from the control module is less than 0.4 ( = 0.5 - 0.1). - a linear blend between the two output values from the two source modules if the output value from the control module is between 0.4 ( = 0.5 - 0.1) and 0.6 ( = 0.5 + 0.1). - the output value from the source module with an index value of 1 if the output value from the control module is between 0.6 ( = 0.5 + 0.1) and 0.7 ( = 0.8 - 0.1). - a linear blend between the output values from the two source modules if the output value from the control module is between 0.7 ( = 0.8 - 0.1 ) and 0.9 ( = 0.8 + 0.1). - the output value from the source module with an index value of 0 if the output value from the control module is greater than 0.9 ( = 0.8 + 0.1).
protected float _edgeFalloff
return float

_leftModule protected_oe property

The left input module
protected IModule _leftModule
return IModule

_lowerBound protected_oe property

Lower bound of the selection range.
protected float _lowerBound
return float

_rightModule protected_oe property

The right input module
protected IModule _rightModule
return IModule

_upperBound protected_oe property

Upper bound of the selection range.
protected float _upperBound
return float