C# Class TerrainGeneration.TerrainGenPass2

Inheritance: GameComponentBase, ITerrainGen
Show file Open project: geofftnz/TestBench1

Public Properties

Property Type Description
parameters Parameters

Public Methods

Method Description
AddPowder ( float amount, Vector3 direction ) : void
AddPowderRandom ( int numSamples, float amount ) : void
CalculateNormals ( ) : void
CompactPowder ( float minDepth, float amount, float invDensityRatio ) : void
CompactPowderRandom ( int numSamples, float minDepth, float amount, float invDensityRatio ) : void
InitFromPass1 ( TerrainGen pass1 ) : void
Load ( string filename ) : void
ModifyTerrain ( ) : void
Save ( string filename ) : void
SlumpPowderRandom ( int numIterations, float slopeThreshold, float depthThreshold, float amount ) : void
TerrainGenPass2 ( int width, int height ) : System

Private Methods

Method Description
AddDiffMapToPowder ( float diffmap ) : void
ClearDiffMap1 ( ) : void
ClearDiffMap2 ( ) : void
ClearTempDiffMap ( ) : void
CombineDiffMapsForDirection ( int xofs, int yofs ) : void
SlumpPowder ( float slopeThreshold, float depthThreshold, float amount ) : void
SlumpPowderOneDirection ( float slopeThreshold, float depthThreshold, float amount, int xofs, int yofs ) : void

Calculates how much material would slump down to the current location from the point at the given offset. This is written into the first temporary buffer.

Method Details

AddPowder() public method

public AddPowder ( float amount, Vector3 direction ) : void
amount float
direction Vector3
return void

AddPowderRandom() public method

public AddPowderRandom ( int numSamples, float amount ) : void
numSamples int
amount float
return void

CalculateNormals() public method

public CalculateNormals ( ) : void
return void

CompactPowder() public method

public CompactPowder ( float minDepth, float amount, float invDensityRatio ) : void
minDepth float
amount float
invDensityRatio float
return void

CompactPowderRandom() public method

public CompactPowderRandom ( int numSamples, float minDepth, float amount, float invDensityRatio ) : void
numSamples int
minDepth float
amount float
invDensityRatio float
return void

InitFromPass1() public method

public InitFromPass1 ( TerrainGen pass1 ) : void
pass1 TerrainGen
return void

Load() public method

public Load ( string filename ) : void
filename string
return void

ModifyTerrain() public method

public ModifyTerrain ( ) : void
return void

Save() public method

public Save ( string filename ) : void
filename string
return void

SlumpPowderRandom() public method

public SlumpPowderRandom ( int numIterations, float slopeThreshold, float depthThreshold, float amount ) : void
numIterations int
slopeThreshold float
depthThreshold float
amount float
return void

TerrainGenPass2() public method

public TerrainGenPass2 ( int width, int height ) : System
width int
height int
return System

Property Details

parameters public property

public Parameters parameters
return Parameters