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

Provides editing of a Terrain, using the GPU to accelerate all operations.
Afficher le fichier Open project: Burton-Radons/Alexandria Class Usage Examples

Private Properties

Свойство Type Description

Méthodes publiques

Méthode 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 méthode

Clear the terrain to a specific value.
public Clear ( float value ) : void
value float
Résultat void

ColorByElevationAndTilt() public méthode

public ColorByElevationAndTilt ( Texture2D texture, System.Angle maximumTilt ) : void
texture Texture2D
maximumTilt System.Angle
Résultat void

ColorByElevationAndTilt() public méthode

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

ColorByElevationAndTilt() public méthode

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.
Résultat void

CreateMatchedRenderTarget() public méthode

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.
Résultat Texture2D

CreatePerlinGradientTexture() public méthode

public CreatePerlinGradientTexture ( byte permutations ) : void
permutations byte
Résultat void

CreatePerlinPermutationTexture() public méthode

public CreatePerlinPermutationTexture ( byte permutations ) : void
permutations byte
Résultat void

CreateTemporaryTexture() public méthode

public CreateTemporaryTexture ( ) : void
Résultat void

Fault() public méthode

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.
Résultat void

Fault() public méthode

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.
Résultat void

FractalBrownianMotion() public méthode

public FractalBrownianMotion ( float strength, float scale, float offset, int octaves ) : void
strength float
scale float
offset float
octaves int
Résultat void

FractalBrownianMotion() public méthode

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
Résultat void

LoadRandomPerlinTransform() public méthode

public LoadRandomPerlinTransform ( ) : void
Résultat void

ProcessHeight() public méthode

public ProcessHeight ( string techniqueName, Box2i modified ) : void
techniqueName string
modified Box2i
Résultat void

ProcessHeight() public méthode

public ProcessHeight ( string techniqueName, int x, int y, int width, int height ) : void
techniqueName string
x int
y int
width int
height int
Résultat void

ProcessHeightAll() public méthode

public ProcessHeightAll ( string techniqueName ) : void
techniqueName string
Résultat void

ProcessHeightNone() public méthode

public ProcessHeightNone ( string techniqueName ) : void
techniqueName string
Résultat void

ProcessTarget() public méthode

public ProcessTarget ( Texture2D target, string techniqueName ) : void
target Texture2D
techniqueName string
Résultat void

SwitchToBlock() public méthode

public SwitchToBlock ( Vector2i blockIndex ) : PlanarTerrainBlock
blockIndex Vector2i
Résultat PlanarTerrainBlock

SwitchToBlock() public méthode

public SwitchToBlock ( int blockIndexX, int blockIndexY ) : PlanarTerrainBlock
blockIndexX int
blockIndexY int
Résultat PlanarTerrainBlock

TerrainEditor() public méthode

Initialise the editor.
public TerrainEditor ( PlanarTerrainBlock block ) : System
block PlanarTerrainBlock
Résultat System

WriteTemporaryTexture() public méthode

public WriteTemporaryTexture ( Vector4nb data, int count ) : void
data Vector4nb
count int
Résultat void