C# Класс VoxelTerrain.CPUGenerator

Наследование: IGenerate
Показать файл Открыть проект Примеры использования класса

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

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

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Приватные методы

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

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

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

public CPUGenerator ( SlimDX.Direct3D11.Device graphicsDevice, VoxelMeshContainer container ) : System
graphicsDevice SlimDX.Direct3D11.Device
container VoxelMeshContainer
Результат System

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

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

Dispose() защищенный Метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

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

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

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

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

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

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