1#ifndef SMALLCHANGE_SCENERYGLUE_H
2#define SMALLCHANGE_SCENERYGLUE_H
27#ifndef SMALLCHANGE_INTERNAL
28#error this is a private header file
31#include <Inventor/SbBasic.h>
39#define SS_RENDER_BIT_WEST (0x0010)
40#define SS_RENDER_BIT_SOUTH (0x0020)
41#define SS_RENDER_BIT_EAST (0x0040)
42#define SS_RENDER_BIT_NORTH (0x0080)
44#define SS_ELEVATION_TYPE (1)
45#define SS_TEXTURE_TYPE (2)
47#define SS_USE_RESIDENT_ONLY (0x0001)
51typedef struct ss_system ss_system;
52typedef struct ss_render_block_cb_info ss_render_block_cb_info;
54typedef int ss_cull_pre_cb(
void * closure,
55 const double * bbmin,
const double * bbmax);
56typedef void ss_cull_post_cb(
void * closure);
57typedef void ss_render_block_cb(
void * closure, ss_render_block_cb_info * info);
58typedef void ss_render_cb(
void * closure,
const int x,
const int y,
59 const int len,
const unsigned int omitmask);
60typedef uint32_t ss_rttexture2d_cb(
void * closure,
double * pos,
float elevation,
double * spacing);
64int sc_scenery_available(
void);
66int sc_ssglue_initialize(
void);
67ss_system * sc_ssglue_system_create_for_cross_and_line(
int maxviews,
double * minpos,
double * spacing,
int * minelements);
68ss_system * sc_ssglue_system_open(
const char * filename,
int maxviews);
69void sc_ssglue_system_close(ss_system * system);
71ss_system * sc_ssglue_system_construct(
int maxviews,
double * origo,
72 double * spacing,
int * elements,
73 float * values,
float undef);
74ss_system * sc_ssglue_system_construct_rotated(
int maxviews,
int rows,
int cols,
75 double * xyzgrid,
double undef);
76ss_system * sc_ssglue_system_construct_randomized(
int maxviews,
int points,
77 double * xyzvals,
float reach);
79void sc_ssglue_render_get_elevation_measures(ss_render_block_cb_info * info,
81 double * vertex_spacing,
83 float ** elevation_array,
84 signed char ** normal_array,
85 int ** dataset_array);
87void sc_ssglue_render_get_texture_image(ss_render_block_cb_info * info,
88 unsigned int texture_id,
89 unsigned char ** bytes,
90 int * width,
int * height,
93void sc_ssglue_render_get_texture_measures(ss_render_block_cb_info * info,
94 unsigned int * texture_id,
97const signed char * sc_ssglue_render_get_undef_array(
unsigned int bitmask);
99int sc_ssglue_system_add_runtime_texture2d(ss_system * system,
101 ss_rttexture2d_cb * callback,
103int sc_ssglue_system_add_runtime_texture0d(ss_system * system, uint32_t abgr);
105int sc_ssglue_system_get_blocksize(ss_system * system);
107void sc_ssglue_system_get_origo_world_position(ss_system * system,
double * coordinates);
108void sc_ssglue_system_get_object_box(ss_system * system,
double * bbmin,
double * bbmax);
109void sc_ssglue_system_get_elevation_data_box(ss_system * system,
int id,
double * bbmin,
double * bbmax);
110void sc_ssglue_system_get_elevation_range(ss_system * system,
int num,
int * datasets,
float * minval,
float * maxval);
111void sc_ssglue_system_refresh_runtime_texture2d(ss_system * system,
int id);
113int sc_ssglue_view_allocate(ss_system * system);
114void sc_ssglue_view_deallocate(ss_system * system,
int viewid);
115void sc_ssglue_view_enable(ss_system * system,
int viewid);
116void sc_ssglue_view_evaluate(ss_system * system,
int viewid);
118void sc_ssglue_view_pre_frame(ss_system * system,
int viewid);
119int sc_ssglue_view_post_frame(ss_system * system,
int viewid);
121int sc_ssglue_view_render(ss_system * system,
int viewid);
122void sc_ssglue_view_set_culling_post_callback(ss_system * system,
int viewid,
123 ss_cull_post_cb * postcb,
126void sc_ssglue_view_set_culling_pre_callback(ss_system * system,
int viewid,
127 ss_cull_pre_cb * precb,
130void sc_ssglue_view_set_evaluate_rottger_parameters(ss_system * system,
133void sc_ssglue_view_get_evaluate_rottger_parameters(ss_system * system,
135 float * C,
float * c);
136void sc_ssglue_view_set_hotspots(ss_system * system,
int viewid,
137 int numhotspots,
double * hotspots);
138void sc_ssglue_view_set_load_rottger_parameters(ss_system * system,
int viewid,
140void sc_ssglue_view_get_load_rottger_parameters(ss_system * system,
int viewid,
141 float * C,
float * c);
142void sc_ssglue_view_set_render_callback(ss_system * system,
int viewid,
143 ss_render_cb * cb,
void * closure);
145void sc_ssglue_view_set_render_pre_callback(ss_system * system,
int viewid,
146 ss_render_block_cb * precb,
149void sc_ssglue_view_set_render_post_callback(ss_system * system,
int viewid,
150 ss_render_block_cb * postcb,
153void sc_ssglue_view_set_undef_render_callback(ss_system * system,
int viewid,
156void sc_ssglue_view_set_render_sequence_a(ss_system * system,
int viewid,
157 int num,
int * sequence);
159int sc_ssglue_system_get_num_datasets(ss_system * system);
160int sc_ssglue_system_get_datasetid(ss_system * system,
int datasetindex);
161int sc_ssglue_system_has_dataset(ss_system * system,
int datasetid);
162int sc_ssglue_system_get_dataset_type(ss_system * system,
int datasetid);
163void sc_ssglue_system_set_dataset_name(ss_system * system,
int datasetid,
const char * name);
164int sc_ssglue_system_get_dataset_name(ss_system * system,
int datasetid,
int maxchars,
char * name);
165int sc_ssglue_system_add_dataset(ss_system * system,
int type,
const char * name,
int flags);
166int sc_ssglue_system_delete_dataset(ss_system * system,
int datasetid);
168void sc_ssglue_system_set_dataset_cross_and_line_data(ss_system * handle,
int dataset,
169 int lodlevel,
int flags,
170 int startcross,
int startline,
171 int numcross,
int numline,
172 float * crosslineelevation);
173float sc_ssglue_system_get_undef_elevation(ss_system * system);
174void sc_ssglue_system_get_spacing_for_lodlevel(ss_system * system,
int lodlevel,
double * spacing);
176void sc_ssglue_system_change_dataset_proximity(ss_system * handle,
int datasetid,
int numdatasets,
int * datasets,
float epsilon,
float newval);
178void sc_ssglue_system_cull_dataset_above(ss_system * handle,
int datasetid,
int numdatasets,
int * datasets,
float distance);
179void sc_ssglue_system_cull_dataset_below(ss_system * handle,
int datasetid,
int numdatasets,
int * datasets,
float distance);
181void sc_ssglue_system_oversample_dataset(ss_system * handle,
int datasetid);
182void sc_ssglue_system_smooth_dataset(ss_system * handle,
int datasetid);
183void sc_ssglue_system_strip_verticals(ss_system * handle,
int datasetid,
float dropsize);
184void sc_ssglue_system_strip_horizontals(ss_system * handle,
int datasetid,
float maxskew);
186int sc_ssglue_system_get_elevation(ss_system * system,
187 int numdatasets,
int * datasets,
188 int numpoints,
double * points,
189 float * normals, uint32_t * rgba,