C# 클래스 LibNoise.Modifier.Cache

Noise module that caches the last output value generated by a source module. If an application passes an input value to the GetValue() method that differs from the previously passed-in input value, this noise module instructs the source module to calculate the output value. This value, as well as the ( @a x, @a y, @a z ) coordinates of the input value, are stored (cached) in this noise module. If the application passes an input value to the GetValue() method that is equal to the previously passed-in input value, this noise module returns the cached output value without having the source module recalculate the output value. If an application passes a new source module to the SetSourceModule() method, the cache is invalidated. Caching a noise module is useful if it is used as a source module for multiple noise modules. If a source module is not cached, the source module will redundantly calculate the same output value once for each noise module in which it is included.
상속: ModifierModule, IModule3D
파일 보기 프로젝트 열기: everbytes/LibNoise

보호된 프로퍼티들

프로퍼티 타입 설명
_cachedValue float
_isCached bool
_xCache float
_yCache float
_zCache float

공개 메소드들

메소드 설명
Cache ( )
Cache ( IModule source )
GetValue ( float x, float y, float z ) : float

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

메소드 상세

Cache() 공개 메소드

public Cache ( )

Cache() 공개 메소드

public Cache ( IModule source )
source IModule

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

프로퍼티 상세

_cachedValue 보호되어 있는 프로퍼티

The cached output value at the cached input value.
protected float _cachedValue
리턴 float

_isCached 보호되어 있는 프로퍼티

Determines if a cached output value is stored in this noise module.
protected bool _isCached
리턴 bool

_xCache 보호되어 있는 프로퍼티

x coordinate of the cached input value.
protected float _xCache
리턴 float

_yCache 보호되어 있는 프로퍼티

y coordinate of the cached input value.
protected float _yCache
리턴 float

_zCache 보호되어 있는 프로퍼티

z coordinate of the cached input value.
protected float _zCache
리턴 float