C# Class OpenMetaverse.TerrainCompressor

ファイルを表示 Open project: 3di/3di-viewer-rei-libs Class Usage Examples

Public Methods

Method Description
CreateLandPacket ( float heightmap, int patches ) : LayerDataPacket

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

CreateLandPacket ( float patchData, int x, int y ) : LayerDataPacket
CreateLayerDataPacket ( TerrainPatch patches, TerrainPatch type ) : LayerDataPacket
CreatePatch ( OpenMetaverse.BitPack output, float patchData, int x, int y ) : void
CreatePatchFromHeightmap ( OpenMetaverse.BitPack output, float heightmap, int x, int y ) : void

Add a patch of terrain to a BitPacker

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

Private Methods

Method Description
BuildCopyMatrix16 ( ) : void
BuildDequantizeTable16 ( ) : void
BuildQuantizeTable16 ( ) : void
CompressPatch ( float patchData, TerrainPatch header, int prequant ) : int[]
CompressPatch ( float heightmap, int patchX, int patchY, TerrainPatch header, int prequant ) : int[]
DCTColumn16 ( float linein, int lineout, int column ) : void
DCTLine16 ( float linein, float lineout, int line ) : void
EncodePatch ( OpenMetaverse.BitPack output, int patch, int postquant, int wbits ) : void
EncodePatchHeader ( OpenMetaverse.BitPack output, TerrainPatch header, int patch ) : int
IDCTColumn16 ( float linein, float lineout, int column ) : void
IDCTLine16 ( float linein, float lineout, int line ) : void
PrescanPatch ( float patch ) : TerrainPatch.Header
PrescanPatch ( float heightmap, int patchX, int patchY ) : TerrainPatch.Header
SetupCosines16 ( ) : void
TerrainCompressor ( ) : System

Method Details

CreateLandPacket() public static method

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 ( float heightmap, int patches ) : LayerDataPacket
heightmap float A 256 * 256 array of floating point values /// specifying the height at each meter in the simulator
patches 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
return LayerDataPacket

CreateLandPacket() public static method

public static CreateLandPacket ( float patchData, int x, int y ) : LayerDataPacket
patchData float
x int
y int
return LayerDataPacket

CreateLayerDataPacket() public static method

public static CreateLayerDataPacket ( TerrainPatch patches, TerrainPatch type ) : LayerDataPacket
patches TerrainPatch
type TerrainPatch
return LayerDataPacket

CreatePatch() public static method

public static CreatePatch ( OpenMetaverse.BitPack output, float patchData, int x, int y ) : void
output OpenMetaverse.BitPack
patchData float
x int
y int
return void

CreatePatchFromHeightmap() public static method

Add a patch of terrain to a BitPacker
public static CreatePatchFromHeightmap ( OpenMetaverse.BitPack output, float heightmap, int x, int y ) : void
output OpenMetaverse.BitPack BitPacker to write the patch to
heightmap float 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
return void

DecodePatch() public static method

public static DecodePatch ( int patches, OpenMetaverse.BitPack bitpack, TerrainPatch header, int size ) : void
patches int
bitpack OpenMetaverse.BitPack
header TerrainPatch
size int
return void

DecodePatchHeader() public static method

public static DecodePatchHeader ( OpenMetaverse.BitPack bitpack ) : TerrainPatch.Header
bitpack OpenMetaverse.BitPack
return TerrainPatch.Header

DecompressPatch() public static method

public static DecompressPatch ( int patches, TerrainPatch header, TerrainPatch group ) : float[]
patches int
header TerrainPatch
group TerrainPatch
return float[]