C# 클래스 LibNoise.Modifier.Terrace

Noise module that maps the output value from a source module onto a terrace-forming curve. This noise module maps the output value from the source module onto a terrace-forming curve. The start of this curve has a slope of zero; its slope then smoothly increases. This curve also contains control points which resets the slope to zero at that point, producing a "terracing" effect. Refer to the following illustration: To add a control point to this noise module, call the AddControlPoint() method. An application must add a minimum of two control points to the curve. If this is not done, the GetValue() method fails. The control points can have any value, although no two control points can have the same value. There is no limit to the number of control points that can be added to the curve. This noise module clamps the output value from the source module if that value is less than the value of the lowest control point or greater than the value of the highest control point. This noise module is often used to generate terrain features such as your stereotypical desert canyon.
상속: ModifierModule, IModule3D
파일 보기 프로젝트 열기: everbytes/LibNoise 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
_controlPoints List
_invert bool

공개 메소드들

메소드 설명
AddControlPoint ( float input ) : 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

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

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

MakeControlPoints ( int controlPointCount ) : void

Creates a number of equally-spaced control points that range from -1 to +1. The number of control points must be greater than or equal to 2 The previous control points on the terrace-forming curve are deleted. Two or more control points define the terrace-forming curve. The start of this curve has a slope of zero; its slope then smoothly increases. At the control points, its slope resets to zero. @throw ArgumentException if an invalid parameter was specified

Terrace ( ) : System
Terrace ( IModule source ) : System
Terrace ( IModule source, bool invert ) : System
getControlPoints ( ) : IList

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

보호된 메소드들

메소드 설명
SortControlPoints ( ) : void

메소드 상세

AddControlPoint() 공개 메소드

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 ) : void
input float The input value stored in the control point.
리턴 void

ClearControlPoints() 공개 메소드

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

CountControlPoints() 공개 메소드

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

GetValue() 공개 메소드

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.
리턴 float

MakeControlPoints() 공개 메소드

Creates a number of equally-spaced control points that range from -1 to +1. The number of control points must be greater than or equal to 2 The previous control points on the terrace-forming curve are deleted. Two or more control points define the terrace-forming curve. The start of this curve has a slope of zero; its slope then smoothly increases. At the control points, its slope resets to zero. @throw ArgumentException if an invalid parameter was specified
public MakeControlPoints ( int controlPointCount ) : void
controlPointCount int The number of control points to generate.
리턴 void

SortControlPoints() 보호된 메소드

protected SortControlPoints ( ) : void
리턴 void

Terrace() 공개 메소드

public Terrace ( ) : System
리턴 System

Terrace() 공개 메소드

public Terrace ( IModule source ) : System
source IModule
리턴 System

Terrace() 공개 메소드

public Terrace ( IModule source, bool invert ) : System
source IModule
invert bool
리턴 System

getControlPoints() 공개 메소드

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

프로퍼티 상세

_controlPoints 보호되어 있는 프로퍼티

protected List _controlPoints
리턴 List

_invert 보호되어 있는 프로퍼티

Enables or disables the inversion of the terrace-forming curve between the control points.
protected bool _invert
리턴 bool