C# Class Universe.Modules.Terrain.FileLoaders.Terragen

Terragen File Format Loader Built from specification at http://www.planetside.co.uk/terragen/dev/tgterrain.html
Inheritance: ITerrainLoader
Show file Open project: Virtual-Universe/Virtual-Universe

Public Methods

Method Description
LoadFile ( string filename, IScene scene ) : ITerrainChannel
LoadFile ( string filename, IScene scene, int offsetX, int offsetY, int fileWidth, int fileHeight, int sectionWidth, int sectionHeight ) : ITerrainChannel
LoadStream ( Stream s, IScene scene ) : ITerrainChannel
SaveFile ( string filename, ITerrainChannel map ) : void
SaveStream ( Stream stream, ITerrainChannel map ) : void
ToString ( ) : string

Private Methods

Method Description
ToLittleEndian ( float number ) : byte[]

Terragen SCAL floats need to be written Intel ordered regardless of big or little Endian system

Method Details

LoadFile() public method

public LoadFile ( string filename, IScene scene ) : ITerrainChannel
filename string
scene IScene
return ITerrainChannel

LoadFile() public method

public LoadFile ( string filename, IScene scene, int offsetX, int offsetY, int fileWidth, int fileHeight, int sectionWidth, int sectionHeight ) : ITerrainChannel
filename string
scene IScene
offsetX int
offsetY int
fileWidth int
fileHeight int
sectionWidth int
sectionHeight int
return ITerrainChannel

LoadStream() public method

public LoadStream ( Stream s, IScene scene ) : ITerrainChannel
s Stream
scene IScene
return ITerrainChannel

SaveFile() public method

public SaveFile ( string filename, ITerrainChannel map ) : void
filename string
map ITerrainChannel
return void

SaveStream() public method

public SaveStream ( Stream stream, ITerrainChannel map ) : void
stream Stream
map ITerrainChannel
return void

ToString() public method

public ToString ( ) : string
return string