TmmT_Terrain_Reader_Load_Proc
Note: Requires Terrain Modeling Module functionality
Abstract
Callback: Called to load a given terrain source.
Syntax
<terrain_reader_load_proc_name> (terrain_type, source_path, coverage_limit, extra_param_names, extra_param_values, extra_params)
| Argument | Type | Description |
|---|---|---|
terrain_type |
struct TmmT_Terrain_Type * |
Terrain handler of interest |
source_path |
const char * |
Path to the terrain source file or directory |
coverage_limit |
const TmmT_Bounds * |
(optional) Rectangular boundary outside of which data from the terrain source should be ignored; OPC_NIL if none. |
extra_param_names |
const char ** |
Pointer to list of names of extra parameters |
extra_param_values |
const char ** |
Pointer to list of values for extra parameters |
n_extra_params |
int |
Number of extra parameters |
Return Value
struct TmmT_Terrain_Source *
Pointer to a terrain source object containing the requested terrain data.
Header
tmm.h
Details
This callback should allocate a terrain source object to be used for subsequent calls involving the terrain source and load data into it from the terrain source files. It should call TmmT_Catalog_Prepare_Step_Notify_Proc tmm_load_step_notify() after each load step (unless the TmmT_Terrain_Reader_Num_Source_Steps_Proc returns -1, in which case no call is needed).
The TmmT_Terrain_Source object is used to provide coverage and elevation data via the coverage_proc and elevation_proc, and is destroyed when the data source is unloaded via the unload_proc.
struct TmmT_Terrain_Source
{
/*** User modifiable fields ***/
/* Your load_proc is intended to fill in these fields. */
void * global_state_ptr; /* user-defined */
} TmmT_Terrain_Source;
The “extra param” arguments represent any special parameters defined for the terrain source in the <custom-settings> section of the terrain specification’s XML file.
Purpose
Callback used to load a given terrain source.