C# Class VoxelTerrain.CPUGenerator

Inheritance: IGenerate
Afficher le fichier Open project: barograf/VoxelTerrain Class Usage Examples

Méthodes publiques

Méthode Description
CPUGenerator ( SlimDX.Direct3D11.Device graphicsDevice, VoxelMeshContainer container ) : System
Dispose ( ) : void
GenerateFromFormula ( int width, int height, int depth ) : void

Generates mesh using mathematical functions.

GenerateFromNoiseCube ( int width, int height, int depth ) : void

Generates mesh using some random values interpolated with trilinear interpolation.

GenerateFromNoiseCubeWithWarp ( int width, int height, int depth ) : void

Generates mesh using some random values interpolated with trilinear interpolation. Uses coordinates transformed with warp values.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Private Methods

Méthode Description
ComputeAmbient ( Voxel voxels ) : void

Computes ambient color for each voxel.

ComputeNormal ( Voxel voxels ) : void

Computes normal vectors based on weight of each voxel.

ComputeTriangles ( Voxel voxels, int levelOfDetail ) : List

Computes triangle positions and normal vectors based on array of voxels.

CreateGeometryBuffer ( List triangles ) : void

Creates shader vertex buffer based on computed triangles.

Method Details

CPUGenerator() public méthode

public CPUGenerator ( SlimDX.Direct3D11.Device graphicsDevice, VoxelMeshContainer container ) : System
graphicsDevice SlimDX.Direct3D11.Device
container VoxelMeshContainer
Résultat System

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

GenerateFromFormula() public méthode

Generates mesh using mathematical functions.
public GenerateFromFormula ( int width, int height, int depth ) : void
width int Mesh width.
height int Mesh height.
depth int Mesh depth.
Résultat void

GenerateFromNoiseCube() public méthode

Generates mesh using some random values interpolated with trilinear interpolation.
public GenerateFromNoiseCube ( int width, int height, int depth ) : void
width int Mesh widht.
height int Mesh height.
depth int Mesh depth.
Résultat void

GenerateFromNoiseCubeWithWarp() public méthode

Generates mesh using some random values interpolated with trilinear interpolation. Uses coordinates transformed with warp values.
public GenerateFromNoiseCubeWithWarp ( int width, int height, int depth ) : void
width int Mesh widht.
height int Mesh height.
depth int Mesh depth.
Résultat void