L3DT documentation
Large 3D terrain generator



Initialise a hfzHeader struct.

Function prototype

long hfzHeader_Init(hfzHeader &fh, long nx, long ny, unsigned short TileSize, float Precis, float HorizScale, long nExtHeaderBlocks);


Name Type Comment
fh hfzHeader& The hfzHeader struct to be initialised.
nx long The width of the map, in pixels.
ny long The height of the map, in pixels.
TileSize unsigned short The tile size used within the HF2/HFZ file for compression. Allowed values are 8…65535.
Precis float The desired vertical precision for the HF2/HFZ compression, in metres. Default is 0.01m.
HorizScale float The Horizontal scale of the map, in metres. Default is 1m.
nExtHeaderBlocks long The number of extended header blocks to be written to the file.

Return value

LIBHFZ_STATUS_OK if the operation completed successfully, and otherwise an error code. Use hfzGetErrorStr to retrieve the error description.


Using extended header blocks

After calling hfzHeader_Init, you may then set the data in each of the extended header blocks using hfzExtHeaderBlock_InitEx.

libhfz/functions/hfzheader_init.txt · Last modified: 2017/08/31 05:33 (external edit)
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki