C# Class LibNoise.Renderer.AbstractHeightmapRenderer

Abstract base class for an heightmap renderer
Inheritance: AbstractRenderer
ファイルを表示 Open project: everbytes/LibNoise

Protected Properties

Property Type Description
_WrapEnabled bool
_lowerHeightBound float
_upperHeightBound float

Public Methods

Method Description
AbstractHeightmapRenderer ( ) : System

template constructor

ExactFit ( ) : void

Find in the noise map the lowest and highest value to define the LowerHeightBound and UpperHeightBound

Render ( ) : void

Renders the destination heightmap using the contents of the source noise map

SetBounds ( float lowerBound, float upperBound ) : void

Sets the boundaries of the heightmap. @throw ArgumentException if the lower boundary equals the upper boundary or if the lower boundary is greater than upper boundary

Protected Methods

Method Description
CheckHeightmap ( ) : bool

RenderHeight ( int x, int y, float source, float boundDiff ) : void

SetHeightmapSize ( int width, int height ) : void

Sets the new size for the target heightmap.

Method Details

AbstractHeightmapRenderer() public method

template constructor
public AbstractHeightmapRenderer ( ) : System
return System

CheckHeightmap() protected abstract method

protected abstract CheckHeightmap ( ) : bool
return bool

ExactFit() public method

Find in the noise map the lowest and highest value to define the LowerHeightBound and UpperHeightBound
public ExactFit ( ) : void
return void

Render() public method

Renders the destination heightmap using the contents of the source noise map
public Render ( ) : void
return void

RenderHeight() protected abstract method

protected abstract RenderHeight ( int x, int y, float source, float boundDiff ) : void
x int
y int
source float
boundDiff float
return void

SetBounds() public method

Sets the boundaries of the heightmap. @throw ArgumentException if the lower boundary equals the upper boundary or if the lower boundary is greater than upper boundary
public SetBounds ( float lowerBound, float upperBound ) : void
lowerBound float The lower boundary of the heightmap
upperBound float The upper boundary of the heightmap
return void

SetHeightmapSize() protected abstract method

Sets the new size for the target heightmap.
protected abstract SetHeightmapSize ( int width, int height ) : void
width int width The new width for the heightmap
height int height The new height for the heightmap
return void

Property Details

_WrapEnabled protected_oe property

If wrapping is/ enabled, and the initial point is on the edge of the noise map, the appropriate neighbors that lie outside of the noise map will "wrap" to the opposite side(s) of the noise map. Enabling wrapping is useful when creating tileable heightmap
protected bool _WrapEnabled
return bool

_lowerHeightBound protected_oe property

Lower height boundary of the heightmap
protected float _lowerHeightBound
return float

_upperHeightBound protected_oe property

Upper height boundary of the heightmap
protected float _upperHeightBound
return float