C# 클래스 LibNoise.Model.Line

Model that defines the displacement of a line segment. This model returns an output value from a noise module given the one-dimensional coordinate of an input value located on a line segment, which can be used as displacements. This class is useful for creating: - roads and rivers - disaffected college students To generate an output value, pass an input value between 0.0 and 1.0 to the GetValue() method. 0.0 represents the start position of the line segment and 1.0 represents the end position of the line segment.
상속: AbstractModel
파일 보기 프로젝트 열기: everbytes/LibNoise

공개 메소드들

메소드 설명
GetValue ( float p ) : float

Returns the output value from the noise module given the one-dimensional coordinate of the specified input value located on the line segment. This value may be attenuated (moved toward 0.0) as p approaches either end of the line segment; this is the default behavior. If the value is not to be attenuated, p can safely range outside the 0.0 to 1.0 range; the output value will be extrapolated along the line that this segment is part of.

Line ( )

Initializes a new instance of the Line class. Default constructor

Line ( IModule module )

Initializes a new instance of the Line class. Constructor

SetEndPoint ( float x, float y, float z ) : void

Sets the position ( x, y, z ) of the end of the line segment to choose values along.

SetStartPoint ( float x, float y, float z ) : void

Sets the position ( x, y, z ) of the start of the line segment to choose values along.

메소드 상세

GetValue() 공개 메소드

Returns the output value from the noise module given the one-dimensional coordinate of the specified input value located on the line segment. This value may be attenuated (moved toward 0.0) as p approaches either end of the line segment; this is the default behavior. If the value is not to be attenuated, p can safely range outside the 0.0 to 1.0 range; the output value will be extrapolated along the line that this segment is part of.
public GetValue ( float p ) : float
p float The distance along the line segment (ranges from 0.0 to 1.0)
리턴 float

Line() 공개 메소드

Initializes a new instance of the Line class. Default constructor
public Line ( )

Line() 공개 메소드

Initializes a new instance of the Line class. Constructor
public Line ( IModule module )
module IModule The noise module that is used to generate the output values

SetEndPoint() 공개 메소드

Sets the position ( x, y, z ) of the end of the line segment to choose values along.
public SetEndPoint ( float x, float y, float z ) : void
x float x coordinate of the end position
y float y coordinate of the end position
z float z coordinate of the end position
리턴 void

SetStartPoint() 공개 메소드

Sets the position ( x, y, z ) of the start of the line segment to choose values along.
public SetStartPoint ( float x, float y, float z ) : void
x float x coordinate of the start position
y float y coordinate of the start position
z float z coordinate of the start position
리턴 void