C# Класс Universe.ClientStack.UniverseTerrainCompressor

Показать файл Открыть проект

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

Метод Описание
CreateLandPacket ( short heightmap, int x, int y, byte type, int regionSizeX, int regionSizeY ) : LayerDataPacket

Creates a LayerData packet for compressed land data given a full simulator heightmap and an array of indices of patches to compress

CreateLayerDataPacket ( TerrainPatch patches, byte type, int regionSizeX, int regionSizeY ) : LayerDataPacket
CreatePatch ( BitPack output, float patchData, int x, int y, int regionSizeX, int regionSizeY ) : void
CreatePatchFromHeightmap ( BitPack output, short heightmap, int x, int y, int regionSizeX, int regionSizeY ) : void

Add a patch of terrain to a BitPacker

DecodePatch ( int patches, BitPack bitpack, TerrainPatch header, int size ) : void
DecodePatchHeader ( BitPack bitpack ) : TerrainPatch.Header
DecompressPatch ( int patches, TerrainPatch header, TerrainPatch group ) : float[]

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

Метод Описание
BuildCopyMatrix16 ( ) : void
BuildDequantizeTable16 ( ) : void
BuildQuantizeTable16 ( ) : void
CompressPatch ( float patchData, TerrainPatch header, int prequant, int &wbits ) : int[]
CompressPatch ( short heightmap, int patchX, int patchY, TerrainPatch header, int prequant, int regionSizeX, int regionSizeY, int &wbits ) : int[]
DCTColumn16 ( float linein, int lineout, int column ) : void
DCTColumn16Wbits ( float linein, int lineout, int column, int wbits, int maxwbits ) : int
DCTLine16 ( float linein, float lineout, int line ) : void
EncodePatch ( BitPack output, int patch, int postquant, int wbits ) : void
EncodePatchHeader ( BitPack output, TerrainPatch header, int patch, int regionSizeX, int regionSizeY, int wbits ) : int
IDCTColumn16 ( float linein, float lineout, int column ) : void
IDCTLine16 ( float linein, float lineout, int line ) : void
PrescanPatch ( float patch ) : TerrainPatch.Header
PrescanPatch ( short heightmap, int patchX, int patchY, int regionSizeX, int regionSizeY ) : TerrainPatch.Header
SetupCosines16 ( ) : void
UniverseTerrainCompressor ( ) : System

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

CreateLandPacket() публичный статический Метод

Creates a LayerData packet for compressed land data given a full simulator heightmap and an array of indices of patches to compress
public static CreateLandPacket ( short heightmap, int x, int y, byte type, int regionSizeX, int regionSizeY ) : LayerDataPacket
heightmap short /// A 256 * 256 array of floating point values /// specifying the height at each meter in the simulator ///
x int /// Array of indexes in the 16x16 grid of patches /// for this simulator. For example if 1 and 17 are specified, patches /// x=1,y=0 and x=1,y=1 are sent ///
y int /// Array of indexes in the 16x16 grid of patches /// for this simulator. For example if 1 and 17 are specified, patches /// x=1,y=0 and x=1,y=1 are sent ///
type byte
regionSizeX int
regionSizeY int
Результат LayerDataPacket

CreateLayerDataPacket() публичный статический Метод

public static CreateLayerDataPacket ( TerrainPatch patches, byte type, int regionSizeX, int regionSizeY ) : LayerDataPacket
patches TerrainPatch
type byte
regionSizeX int
regionSizeY int
Результат LayerDataPacket

CreatePatch() публичный статический Метод

public static CreatePatch ( BitPack output, float patchData, int x, int y, int regionSizeX, int regionSizeY ) : void
output BitPack
patchData float
x int
y int
regionSizeX int
regionSizeY int
Результат void

CreatePatchFromHeightmap() публичный статический Метод

Add a patch of terrain to a BitPacker
public static CreatePatchFromHeightmap ( BitPack output, short heightmap, int x, int y, int regionSizeX, int regionSizeY ) : void
output BitPack BitPacker to write the patch to
heightmap short /// Heightmap of the simulator, must be a 256 * /// 256 float array ///
x int /// X offset of the patch to create, valid values are /// from 0 to 15 ///
y int /// Y offset of the patch to create, valid values are /// from 0 to 15 ///
regionSizeX int
regionSizeY int
Результат void

DecodePatch() публичный статический Метод

public static DecodePatch ( int patches, BitPack bitpack, TerrainPatch header, int size ) : void
patches int
bitpack BitPack
header TerrainPatch
size int
Результат void

DecodePatchHeader() публичный статический Метод

public static DecodePatchHeader ( BitPack bitpack ) : TerrainPatch.Header
bitpack BitPack
Результат TerrainPatch.Header

DecompressPatch() публичный статический Метод

public static DecompressPatch ( int patches, TerrainPatch header, TerrainPatch group ) : float[]
patches int
header TerrainPatch
group TerrainPatch
Результат float[]