C# Class Glare.Graphics.Terrains.Planar.TerrainEditor

Provides editing of a Terrain, using the GPU to accelerate all operations.
显示文件 Open project: Burton-Radons/Alexandria Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
Clear ( float value ) : void

Clear the terrain to a specific value.

ColorByElevationAndTilt ( Texture2D texture, System.Angle maximumTilt ) : void
ColorByElevationAndTilt ( Texture2D texture, Length minimumElevation, Length maximumElevation, System.Angle maximumTilt ) : void
ColorByElevationAndTilt ( Texture2D texture, System.Matrix4d transform ) : void

Set the terrain's color texture according to the elevation and the tilt of the terrain, where higher elevation increases x and higher tilt increases y.

CreateMatchedRenderTarget ( bool mipMap, System.Text.Format format ) : Texture2D

Create a Texture2D that matches the terrain's dimensions.

CreatePerlinGradientTexture ( byte permutations ) : void
CreatePerlinPermutationTexture ( byte permutations ) : void
CreateTemporaryTexture ( ) : void
Fault ( Vector4nb lines, int count, float push ) : void

Perform a set of fault line increments on the height texture.

Fault ( int count, float push ) : void

Perform a set of random fault line increments on the height texture.

FractalBrownianMotion ( float strength, float scale, float offset, int octaves ) : void
FractalBrownianMotion ( float strength, float scale, float offset, int octaves, float lacunarity, float gain ) : void

Add fractal brownian motion to the height texture.

LoadRandomPerlinTransform ( ) : void
ProcessHeight ( string techniqueName, Box2i modified ) : void
ProcessHeight ( string techniqueName, int x, int y, int width, int height ) : void
ProcessHeightAll ( string techniqueName ) : void
ProcessHeightNone ( string techniqueName ) : void
ProcessTarget ( Texture2D target, string techniqueName ) : void
SwitchToBlock ( Vector2i blockIndex ) : PlanarTerrainBlock
SwitchToBlock ( int blockIndexX, int blockIndexY ) : PlanarTerrainBlock
TerrainEditor ( PlanarTerrainBlock block ) : System

Initialise the editor.

WriteTemporaryTexture ( Vector4nb data, int count ) : void

Method Details

Clear() public method

Clear the terrain to a specific value.
public Clear ( float value ) : void
value float
return void

ColorByElevationAndTilt() public method

public ColorByElevationAndTilt ( Texture2D texture, System.Angle maximumTilt ) : void
texture Texture2D
maximumTilt System.Angle
return void

ColorByElevationAndTilt() public method

public ColorByElevationAndTilt ( Texture2D texture, Length minimumElevation, Length maximumElevation, System.Angle maximumTilt ) : void
texture Texture2D
minimumElevation Length
maximumElevation Length
maximumTilt System.Angle
return void

ColorByElevationAndTilt() public method

Set the terrain's color texture according to the elevation and the tilt of the terrain, where higher elevation increases x and higher tilt increases y.
public ColorByElevationAndTilt ( Texture2D texture, System.Matrix4d transform ) : void
texture Texture2D The texture to colour the terrain by.
transform System.Matrix4d A transform to apply when mapping the terrain color.
return void

CreateMatchedRenderTarget() public method

Create a Texture2D that matches the terrain's dimensions.
public CreateMatchedRenderTarget ( bool mipMap, System.Text.Format format ) : Texture2D
mipMap bool Whether to mipmap the render target automatically.
format System.Text.Format What to use.
return Texture2D

CreatePerlinGradientTexture() public method

public CreatePerlinGradientTexture ( byte permutations ) : void
permutations byte
return void

CreatePerlinPermutationTexture() public method

public CreatePerlinPermutationTexture ( byte permutations ) : void
permutations byte
return void

CreateTemporaryTexture() public method

public CreateTemporaryTexture ( ) : void
return void

Fault() public method

Perform a set of fault line increments on the height texture.
public Fault ( Vector4nb lines, int count, float push ) : void
lines Vector4nb Each pair of values is a line to separate the texture. Any point on the left of the line is pushed down, any point on the right of the line is pulled up.
count int The number of lines to push.
push float How much to push the height texture up or down.
return void

Fault() public method

Perform a set of random fault line increments on the height texture.
public Fault ( int count, float push ) : void
count int The number of lines to push.
push float How much to push the height texture up or down per line.
return void

FractalBrownianMotion() public method

public FractalBrownianMotion ( float strength, float scale, float offset, int octaves ) : void
strength float
scale float
offset float
octaves int
return void

FractalBrownianMotion() public method

Add fractal brownian motion to the height texture.
public FractalBrownianMotion ( float strength, float scale, float offset, int octaves, float lacunarity, float gain ) : void
strength float
scale float
offset float
octaves int
lacunarity float
gain float
return void

LoadRandomPerlinTransform() public method

public LoadRandomPerlinTransform ( ) : void
return void

ProcessHeight() public method

public ProcessHeight ( string techniqueName, Box2i modified ) : void
techniqueName string
modified Box2i
return void

ProcessHeight() public method

public ProcessHeight ( string techniqueName, int x, int y, int width, int height ) : void
techniqueName string
x int
y int
width int
height int
return void

ProcessHeightAll() public method

public ProcessHeightAll ( string techniqueName ) : void
techniqueName string
return void

ProcessHeightNone() public method

public ProcessHeightNone ( string techniqueName ) : void
techniqueName string
return void

ProcessTarget() public method

public ProcessTarget ( Texture2D target, string techniqueName ) : void
target Texture2D
techniqueName string
return void

SwitchToBlock() public method

public SwitchToBlock ( Vector2i blockIndex ) : PlanarTerrainBlock
blockIndex Vector2i
return PlanarTerrainBlock

SwitchToBlock() public method

public SwitchToBlock ( int blockIndexX, int blockIndexY ) : PlanarTerrainBlock
blockIndexX int
blockIndexY int
return PlanarTerrainBlock

TerrainEditor() public method

Initialise the editor.
public TerrainEditor ( PlanarTerrainBlock block ) : System
block PlanarTerrainBlock
return System

WriteTemporaryTexture() public method

public WriteTemporaryTexture ( Vector4nb data, int count ) : void
data Vector4nb
count int
return void