C# Класс Glare.Graphics.Terrains.Planar.TerrainEditor

Provides editing of a Terrain, using the GPU to accelerate all operations.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание

Открытые методы

Метод Описание
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

Описание методов

Clear() публичный Метод

Clear the terrain to a specific value.
public Clear ( float value ) : void
value float
Результат void

ColorByElevationAndTilt() публичный Метод

public ColorByElevationAndTilt ( Texture2D texture, System.Angle maximumTilt ) : void
texture Texture2D
maximumTilt System.Angle
Результат void

ColorByElevationAndTilt() публичный Метод

public ColorByElevationAndTilt ( Texture2D texture, Length minimumElevation, Length maximumElevation, System.Angle maximumTilt ) : void
texture Texture2D
minimumElevation Length
maximumElevation Length
maximumTilt System.Angle
Результат void

ColorByElevationAndTilt() публичный Метод

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.
Результат void

CreateMatchedRenderTarget() публичный Метод

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.
Результат Texture2D

CreatePerlinGradientTexture() публичный Метод

public CreatePerlinGradientTexture ( byte permutations ) : void
permutations byte
Результат void

CreatePerlinPermutationTexture() публичный Метод

public CreatePerlinPermutationTexture ( byte permutations ) : void
permutations byte
Результат void

CreateTemporaryTexture() публичный Метод

public CreateTemporaryTexture ( ) : void
Результат void

Fault() публичный Метод

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.
Результат void

Fault() публичный Метод

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.
Результат void

FractalBrownianMotion() публичный Метод

public FractalBrownianMotion ( float strength, float scale, float offset, int octaves ) : void
strength float
scale float
offset float
octaves int
Результат void

FractalBrownianMotion() публичный Метод

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
Результат void

LoadRandomPerlinTransform() публичный Метод

public LoadRandomPerlinTransform ( ) : void
Результат void

ProcessHeight() публичный Метод

public ProcessHeight ( string techniqueName, Box2i modified ) : void
techniqueName string
modified Box2i
Результат void

ProcessHeight() публичный Метод

public ProcessHeight ( string techniqueName, int x, int y, int width, int height ) : void
techniqueName string
x int
y int
width int
height int
Результат void

ProcessHeightAll() публичный Метод

public ProcessHeightAll ( string techniqueName ) : void
techniqueName string
Результат void

ProcessHeightNone() публичный Метод

public ProcessHeightNone ( string techniqueName ) : void
techniqueName string
Результат void

ProcessTarget() публичный Метод

public ProcessTarget ( Texture2D target, string techniqueName ) : void
target Texture2D
techniqueName string
Результат void

SwitchToBlock() публичный Метод

public SwitchToBlock ( Vector2i blockIndex ) : PlanarTerrainBlock
blockIndex Vector2i
Результат PlanarTerrainBlock

SwitchToBlock() публичный Метод

public SwitchToBlock ( int blockIndexX, int blockIndexY ) : PlanarTerrainBlock
blockIndexX int
blockIndexY int
Результат PlanarTerrainBlock

TerrainEditor() публичный Метод

Initialise the editor.
public TerrainEditor ( PlanarTerrainBlock block ) : System
block PlanarTerrainBlock
Результат System

WriteTemporaryTexture() публичный Метод

public WriteTemporaryTexture ( Vector4nb data, int count ) : void
data Vector4nb
count int
Результат void