ogsf.h 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740
  1. #ifndef GRASS_OGSFDEFS_H
  2. #define GRASS_OGSFDEFS_H
  3. /* GK2.c */
  4. int GK_set_interpmode(int);
  5. void GK_set_tension(float);
  6. void GK_showtension_start(void);
  7. void GK_showtension_stop(void);
  8. void GK_update_tension(void);
  9. void GK_update_frames(void);
  10. void GK_set_numsteps(int);
  11. void GK_clear_keys(void);
  12. void GK_print_keys(const char *);
  13. int GK_move_key(float, float, float);
  14. int GK_delete_key(float, float, int);
  15. int GK_add_key(float, unsigned long, int, float);
  16. void GK_do_framestep(int, int);
  17. void GK_show_path(int);
  18. void GK_show_vect(int);
  19. void GK_show_site(int);
  20. void GK_show_vol(int);
  21. void GK_show_list(int);
  22. /* GP2.c */
  23. int GP_site_exists(int);
  24. int GP_new_site(void);
  25. int GP_num_sites(void);
  26. int *GP_get_site_list(int *);
  27. int GP_delete_site(int);
  28. int GP_load_site(int, const char *);
  29. int GP_get_sitename(int, char **);
  30. int GP_get_style(int, int *, int *, float *, int *);
  31. int GP_set_style(int, int, int, float, int);
  32. int GP_set_style_thematic(int, int, const char *, const char *, const char *,
  33. const char *, struct Colors *);
  34. int GP_unset_style_thematic(int);
  35. int GP_attmode_color(int, const char *);
  36. int GP_attmode_none(int);
  37. int GP_set_zmode(int, int);
  38. int GP_get_zmode(int, int *);
  39. void GP_set_trans(int, float, float, float);
  40. void GP_get_trans(int, float *, float *, float *);
  41. int GP_select_surf(int, int);
  42. int GP_unselect_surf(int, int);
  43. int GP_surf_is_selected(int, int);
  44. void GP_draw_site(int);
  45. void GP_alldraw_site(void);
  46. int GP_Set_ClientData(int, void *);
  47. void *GP_Get_ClientData(int);
  48. int GP_str_to_marker(const char *);
  49. /* GS2.c */
  50. void void_func(void);
  51. void GS_libinit(void);
  52. int GS_get_longdim(float *);
  53. int GS_get_region(float *, float *, float *, float *);
  54. void GS_set_att_defaults(float *, float *);
  55. int GS_surf_exists(int);
  56. int GS_new_surface(void);
  57. int GS_new_light(void);
  58. void GS_set_light_reset(int);
  59. int GS_get_light_reset(void);
  60. void GS_setlight_position(int, float, float, float, int);
  61. void GS_setlight_color(int, float, float, float);
  62. void GS_setlight_ambient(int, float, float, float);
  63. void GS_lights_off(void);
  64. void GS_lights_on(void);
  65. void GS_switchlight(int, int);
  66. int GS_transp_is_set(void);
  67. void GS_get_modelposition1(float *);
  68. void GS_get_modelposition(float *, float *);
  69. void GS_draw_X(int, float *);
  70. void GS_set_Narrow(int *, int, float *);
  71. void GS_draw_line_onsurf(int, float, float, float, float);
  72. int GS_draw_nline_onsurf(int, float, float, float, float, float *, int);
  73. void GS_draw_flowline_at_xy(int, float, float);
  74. void GS_draw_lighting_model1(void);
  75. void GS_draw_lighting_model(void);
  76. int GS_update_curmask(int);
  77. int GS_is_masked(int, float *);
  78. void GS_unset_SDsurf(void);
  79. int GS_set_SDsurf(int);
  80. int GS_set_SDscale(float);
  81. int GS_get_SDsurf(int *);
  82. int GS_get_SDscale(float *);
  83. int GS_update_normals(int);
  84. int GS_get_att(int, int, int *, float *, char *);
  85. int GS_get_cat_at_xy(int, int, char *, float, float);
  86. int GS_get_norm_at_xy(int, float, float, float *);
  87. int GS_get_val_at_xy(int, int, char *, float, float);
  88. int GS_unset_att(int, int);
  89. int GS_set_att_const(int, int, float);
  90. int GS_set_maskmode(int, int);
  91. int GS_get_maskmode(int, int *);
  92. int GS_Set_ClientData(int, void *);
  93. void *GS_Get_ClientData(int);
  94. int GS_num_surfs(void);
  95. int *GS_get_surf_list(int *);
  96. int GS_delete_surface(int);
  97. int GS_load_att_map(int, const char *, int);
  98. void GS_draw_surf(int);
  99. void GS_draw_wire(int);
  100. void GS_alldraw_wire(void);
  101. void GS_alldraw_surf(void);
  102. void GS_set_exag(int, float);
  103. void GS_set_global_exag(float);
  104. float GS_global_exag(void);
  105. void GS_set_wire_color(int, int);
  106. int GS_get_wire_color(int, int *);
  107. int GS_setall_drawmode(int);
  108. int GS_set_drawmode(int, int);
  109. int GS_get_drawmode(int, int *);
  110. void GS_set_nozero(int, int, int);
  111. int GS_get_nozero(int, int, int *);
  112. int GS_setall_drawres(int, int, int, int);
  113. int GS_set_drawres(int, int, int, int, int);
  114. void GS_get_drawres(int, int *, int *, int *, int *);
  115. void GS_get_dims(int, int *, int *);
  116. int GS_get_exag_guess(int, float *);
  117. void GS_get_zrange_nz(float *, float *);
  118. void GS_set_trans(int, float, float, float);
  119. void GS_get_trans(int, float *, float *, float *);
  120. unsigned int GS_default_draw_color(void);
  121. unsigned int GS_background_color(void);
  122. void GS_set_draw(int);
  123. void GS_ready_draw(void);
  124. void GS_done_draw(void);
  125. void GS_set_focus(float *);
  126. int GS_get_focus(float *);
  127. void GS_set_focus_center_map(int);
  128. void GS_moveto(float *);
  129. void GS_moveto_real(float *);
  130. void GS_set_focus_real(float *);
  131. void GS_get_to_real(float *);
  132. int GS_get_zextents(int, float *, float *, float *);
  133. int GS_get_zrange(float *, float *, int);
  134. void GS_get_from(float *);
  135. void GS_get_from_real(float *);
  136. void GS_get_to(float *);
  137. void GS_get_viewdir(float *);
  138. void GS_set_viewdir(float *);
  139. void GS_set_fov(int);
  140. void GS_set_rotation(double, double, double, double);
  141. void GS_get_rotation_matrix(double *);
  142. void GS_set_rotation_matrix(double *);
  143. void GS_init_rotation(void);
  144. void GS_unset_rotation(void);
  145. int GS_get_fov(void);
  146. int GS_get_twist(void);
  147. void GS_set_twist(int);
  148. void GS_set_nofocus(void);
  149. void GS_set_infocus(void);
  150. void GS_set_viewport(int, int, int, int);
  151. int GS_look_here(int, int);
  152. int GS_get_selected_point_on_surface(int, int, int *, float *, float *,
  153. float *);
  154. void GS_set_cplane_rot(int, float, float, float);
  155. void GS_set_cplane_trans(int, float, float, float);
  156. void GS_draw_cplane(int);
  157. int GS_draw_cplane_fence(int, int, int);
  158. void GS_alldraw_cplane_fences(void);
  159. void GS_set_cplane(int);
  160. void GS_unset_cplane(int);
  161. void GS_get_scale(float *, float *, float *, int);
  162. void GS_set_fencecolor(int);
  163. int GS_get_fencecolor(void);
  164. int GS_get_distance_alongsurf(int, float, float, float, float, float *, int);
  165. int GS_save_3dview(const char *, int);
  166. int GS_load_3dview(const char *, int);
  167. void GS_init_view(void);
  168. void GS_clear(int);
  169. double GS_get_aspect(void);
  170. int GS_has_transparency(void);
  171. void GS_zoom_setup(int *, int *, int *, int *, int *, int *);
  172. int GS_write_zoom(const char *, unsigned int, unsigned int);
  173. void GS_draw_all_list(void);
  174. void GS_delete_list(GLuint);
  175. int GS_draw_legend(const char *, GLuint, int, int *, float *, int *);
  176. void GS_draw_fringe(int, unsigned long, float, int *);
  177. void GS_getlight_position(int, float *, float *, float *, int *);
  178. void GS_getlight_color(int, float *, float *, float *);
  179. void GS_getlight_ambient(int, float *, float *, float *);
  180. /* GSX.c */
  181. int GS_check_cancel(void);
  182. void GS_set_cancel(int);
  183. void GS_set_cxl_func(void (*)(void));
  184. /* GS_util.c */
  185. double GS_geodistance(double *, double *, const char *);
  186. float GS_distance(float *, float *);
  187. float GS_P2distance(float *, float *);
  188. void GS_v3eq(float *, float *);
  189. void GS_v3add(float *, float *);
  190. void GS_v3sub(float *, float *);
  191. void GS_v3mult(float *, float);
  192. int GS_v3norm(float *);
  193. int GS_v2norm(float *);
  194. int GS_dv3norm(double *);
  195. int GS_v3normalize(float *, float *);
  196. int GS_v3dir(float *, float *, float *);
  197. void GS_v2dir(float *, float *, float *);
  198. void GS_v3cross(float *, float *, float *);
  199. void GS_v3mag(float *, float *);
  200. int GS_coordpair_repeats(float *, float *, int);
  201. /* GV2.c */
  202. int GV_vect_exists(int);
  203. int GV_new_vector(void);
  204. int GV_num_vects(void);
  205. int *GV_get_vect_list(int *);
  206. int GV_delete_vector(int);
  207. int GV_load_vector(int, const char *);
  208. int GV_get_vectname(int, char **);
  209. int GV_set_style(int, int, int, int, int);
  210. int GV_get_style(int, int *, int *, int *, int *);
  211. int GV_set_style_thematic(int, int, const char *, const char *, struct Colors *);
  212. int GV_unset_style_thematic(int);
  213. void GV_set_trans(int, float, float, float);
  214. int GV_get_trans(int, float *, float *, float *);
  215. int GV_select_surf(int, int);
  216. int GV_unselect_surf(int, int);
  217. int GV_surf_is_selected(int, int);
  218. void GV_draw_vect(int);
  219. void GV_alldraw_vect(void);
  220. void GV_alldraw_fastvect(void);
  221. void GV_draw_fastvect(int);
  222. int GV_Set_ClientData(int, void *);
  223. void *GV_Get_ClientData(int);
  224. /* GVL2.c */
  225. void GVL_libinit(void);
  226. void GVL_init_region(void);
  227. int GVL_get_region(float *, float *, float *, float *, float *, float *);
  228. void *GVL_get_window();
  229. int GVL_vol_exists(int);
  230. int GVL_new_vol(void);
  231. int GVL_num_vols(void);
  232. int *GVL_get_vol_list(int *);
  233. int GVL_delete_vol(int);
  234. int GVL_load_vol(int, const char *);
  235. int GVL_get_volname(int, char *);
  236. void GVL_set_trans(int, float, float, float);
  237. int GVL_get_trans(int, float *, float *, float *);
  238. void GVL_set_draw_wire(int, int);
  239. void GVL_draw_vol(int);
  240. void GVL_draw_wire(int);
  241. void GVL_alldraw_vol(void);
  242. void GVL_alldraw_wire(void);
  243. int GVL_Set_ClientData(int, void *);
  244. void *GVL_Get_ClientData(int);
  245. void GVL_get_dims(int, int *, int *, int *);
  246. void GVL_set_focus_center_map(int);
  247. int GVL_isosurf_move_up(int, int);
  248. int GVL_isosurf_move_down(int, int);
  249. void GVL_isosurf_get_drawres(int, int *, int *, int *);
  250. int GVL_isosurf_set_drawres(int, int, int, int);
  251. int GVL_isosurf_get_drawmode(int, int *);
  252. int GVL_isosurf_set_drawmode(int, int);
  253. int GVL_isosurf_add(int);
  254. int GVL_isosurf_del(int, int);
  255. int GVL_isosurf_get_att(int, int, int, int *, float *, char *);
  256. int GVL_isosurf_unset_att(int, int, int);
  257. int GVL_isosurf_set_att_const(int, int, int, float);
  258. int GVL_isosurf_set_att_map(int, int, int, const char *);
  259. int GVL_isosurf_get_flags(int, int, int *);
  260. int GVL_isosurf_set_flags(int, int, int);
  261. int GVL_isosurf_num_isosurfs(int);
  262. int GVL_isosurf_set_maskmode(int, int, int);
  263. int GVL_isosurf_get_maskmode(int, int, int *);
  264. int GVL_slice_move_up(int, int);
  265. int GVL_slice_move_down(int, int);
  266. void GVL_slice_get_drawres(int, int *, int *, int *);
  267. int GVL_slice_get_transp(int, int, int *);
  268. int GVL_slice_set_transp(int, int, int);
  269. int GVL_slice_set_drawres(int, int, int, int);
  270. int GVL_slice_get_drawmode(int, int *);
  271. int GVL_slice_set_drawmode(int, int);
  272. int GVL_slice_add(int);
  273. int GVL_slice_del(int, int);
  274. int GVL_slice_num_slices(int);
  275. int GVL_slice_get_pos(int, int, float *, float *, float *, float *, float *,
  276. float *, int *);
  277. int GVL_slice_set_pos(int, int, float, float, float, float, float, float,
  278. int);
  279. /* Gp3.c */
  280. int Gp_set_color(const char *, geopoint *);
  281. geopoint *Gp_load_sites(const char *, int *, int *);
  282. int Gp_load_sites_thematic(geosite *, struct Colors *);
  283. /* Gs3.c */
  284. double Gs_distance(double *, double *);
  285. int Gs_loadmap_as_float(struct Cell_head *, const char *, float *,
  286. struct BM *, int *);
  287. int Gs_loadmap_as_int(struct Cell_head *, const char *, int *, struct BM *,
  288. int *);
  289. int Gs_numtype(const char *, int *);
  290. int Gs_loadmap_as_short(struct Cell_head *, const char *, short *,
  291. struct BM *, int *);
  292. int Gs_loadmap_as_char(struct Cell_head *, const char *, unsigned char *,
  293. struct BM *, int *);
  294. int Gs_loadmap_as_bitmap(struct Cell_head *, const char *, struct BM *);
  295. int Gs_build_256lookup(const char *, int *);
  296. void Gs_pack_colors(const char *, int *, int, int);
  297. void Gs_pack_colors_float(const char *, float *, int *, int, int);
  298. int Gs_get_cat_label(const char *, int, int, char *);
  299. int Gs_save_3dview(const char *, geoview *, geodisplay *, struct Cell_head *,
  300. geosurf *);
  301. int Gs_load_3dview(const char *, geoview *, geodisplay *, struct Cell_head *,
  302. const geosurf *);
  303. int Gs_update_attrange(geosurf *, int);
  304. /* Gv3.c */
  305. geoline *Gv_load_vect(const char *, int *);
  306. int Gv_load_vect_thematic(geovect *, struct Colors *);
  307. void sub_Vectmem(int);
  308. /* gk.c */
  309. Keylist *gk_copy_key(Keylist *);
  310. unsigned long gk_get_mask_sofar(float, Keylist *);
  311. int gk_viable_keys_for_mask(unsigned long, Keylist *, Keylist **);
  312. void gk_follow_frames(Viewnode *, int, Keylist *, int, int, int,
  313. unsigned long);
  314. void gk_free_key(Keylist *);
  315. Viewnode *gk_make_framesfromkeys(Keylist *, int, int, int, float);
  316. double get_key_neighbors(int, double, double, int, Keylist **, Keylist **,
  317. Keylist **, Keylist **, Keylist **, double *,
  318. double *);
  319. double lin_interp(float, float, float);
  320. double get_2key_neighbors(int, float, float, int, Keylist **, Keylist **,
  321. Keylist **);
  322. Viewnode *gk_make_linear_framesfromkeys(Keylist *, int, int, int);
  323. void correct_twist(Keylist *);
  324. int gk_draw_path(Viewnode *, int, Keylist *);
  325. /* gp.c */
  326. geosite *gp_get_site(int);
  327. geosite *gp_get_prev_site(int);
  328. int gp_num_sites(void);
  329. geosite *gp_get_last_site(void);
  330. geosite *gp_get_new_site(void);
  331. void gp_update_drapesurfs(void);
  332. int gp_set_defaults(geosite *);
  333. void print_site_fields(geosite *);
  334. int gp_init_site(geosite *);
  335. void gp_delete_site(int);
  336. int gp_free_site(geosite *);
  337. void gp_free_sitemem(geosite *);
  338. void gp_set_drapesurfs(geosite *, int *, int);
  339. /* gpd.c */
  340. int gs_point_in_region(geosurf *, float *, float *);
  341. void gpd_obj(geosurf *, gvstyle *, Point3);
  342. int gpd_2dsite(geosite *, geosurf *, int);
  343. int gpd_3dsite(geosite *, float, float, int);
  344. /* gs.c */
  345. void gs_err(const char *);
  346. void gs_init(void);
  347. geosurf *gs_get_surf(int);
  348. geosurf *gs_get_prev_surface(int);
  349. int gs_getall_surfaces(geosurf **);
  350. int gs_num_surfaces(void);
  351. int gs_att_is_set(geosurf *, IFLAG);
  352. geosurf *gs_get_last_surface(void);
  353. geosurf *gs_get_new_surface(void);
  354. int gs_init_surf(geosurf *, double, double, int, int, double, double);
  355. int gs_init_normbuff(geosurf *);
  356. void print_frto(float (*)[4]);
  357. void print_realto(float *);
  358. void print_256lookup(int *);
  359. void print_surf_fields(geosurf *);
  360. void print_view_fields(geoview *);
  361. void gs_set_defaults(geosurf *, float *, float *);
  362. void gs_delete_surf(int);
  363. int gs_free_surf(geosurf *);
  364. void gs_free_unshared_buffs(geosurf *);
  365. int gs_num_datah_reused(int);
  366. int gs_get_att_type(geosurf *, int);
  367. int gs_get_att_src(geosurf *, int);
  368. typbuff *gs_get_att_typbuff(geosurf *, int, int);
  369. size_t gs_malloc_att_buff(geosurf *, int, int);
  370. int gs_malloc_lookup(geosurf *, int);
  371. int gs_set_att_type(geosurf *, int, int);
  372. int gs_set_att_src(geosurf *, int, int);
  373. int gs_set_att_const(geosurf *, int, float);
  374. void gs_set_maskmode(int);
  375. int gs_mask_defined(geosurf *);
  376. int gs_masked(typbuff *, int, int, int);
  377. int gs_mapcolor(typbuff *, gsurf_att *, int);
  378. int gs_get_zextents(geosurf *, float *, float *, float *);
  379. int gs_get_xextents(geosurf *, float *, float *);
  380. int gs_get_yextents(geosurf *, float *, float *);
  381. int gs_get_zrange0(float *, float *);
  382. int gs_get_zrange(float *, float *);
  383. int gs_get_xrange(float *, float *);
  384. int gs_get_yrange(float *, float *);
  385. int gs_get_data_avg_zmax(float *);
  386. int gs_get_datacenter(float *);
  387. int gs_setall_norm_needupdate(void);
  388. int gs_point_is_masked(geosurf *, float *);
  389. int gs_distance_onsurf(geosurf *, float *, float *, float *, int);
  390. /* gs_bm.c */
  391. struct BM *gsbm_make_mask(typbuff *, float, int, int);
  392. void gsbm_zero_mask(struct BM *);
  393. int gsbm_or_masks(struct BM *, struct BM *);
  394. int gsbm_ornot_masks(struct BM *, struct BM *);
  395. int gsbm_and_masks(struct BM *, struct BM *);
  396. int gsbm_xor_masks(struct BM *, struct BM *);
  397. int gs_update_curmask(geosurf *);
  398. void print_bm(struct BM *);
  399. /* gs_norms.c */
  400. void init_vars(geosurf *);
  401. int gs_calc_normals(geosurf *);
  402. int calc_norm(geosurf *, int, int, unsigned int);
  403. /* gs_query.c */
  404. int gs_los_intersect1(int, float (*)[3], float *);
  405. int gs_los_intersect(int, float **, float *);
  406. int RayCvxPolyhedronInt(Point3, Point3, double, Point4 *, int, double *,
  407. int *);
  408. void gs_get_databounds_planes(Point4 *);
  409. int gs_setlos_enterdata(Point3 *);
  410. /* gsd_cplane.c */
  411. void gsd_def_cplane(int, float *, float *);
  412. void gsd_update_cplanes(void);
  413. void gsd_cplane_on(int);
  414. void gsd_cplane_off(int);
  415. void gsd_get_cplanes_state(int *);
  416. int gsd_get_cplanes(Point4 *);
  417. void gsd_update_cpnorm(int);
  418. void gsd_cplane_setrot(int, float, float, float);
  419. void gsd_cplane_settrans(int, float, float, float);
  420. void gsd_draw_cplane_fence(geosurf *, geosurf *, int);
  421. void gsd_draw_cplane(int);
  422. /* gsd_fonts.c */
  423. GLuint gsd_set_font(const char *);
  424. int gsd_get_txtwidth(const char *, int);
  425. int gsd_get_txtheight(int size);
  426. void do_label_display(GLuint, float *, const char *);
  427. int get_txtdescender(void);
  428. int get_txtxoffset(void);
  429. /* gsd_img_ppm.c */
  430. int GS_write_ppm(const char *);
  431. /* gsd_img_tif.c */
  432. int GS_write_tif(const char *);
  433. /* gsd_label.c */
  434. void gs_put_label(const char *, GLuint, int, unsigned long, int *);
  435. void gsd_remove_curr(void);
  436. void gsd_remove_all(void);
  437. void gsd_call_label(void);
  438. /* gsd_objs.c */
  439. void gsd_box(float *, int, float *);
  440. void gsd_plus(float *, int, float);
  441. void gsd_line_onsurf(geosurf *, float *, float *);
  442. int gsd_nline_onsurf(geosurf *, float *, float *, float *, int);
  443. void gsd_x(geosurf *, float *, int, float);
  444. void gsd_diamond(float *, unsigned long, float);
  445. void gsd_diamond_lines(void);
  446. void gsd_cube(float *, unsigned long, float);
  447. void gsd_draw_box(float *, unsigned long, float);
  448. void gsd_drawsphere(float *, unsigned long, float);
  449. void gsd_draw_asterisk(float *, unsigned long, float);
  450. void gsd_draw_gyro(float *, unsigned long, float);
  451. void gsd_3dcursor(float *);
  452. void dir_to_slope_aspect(float *, float *, float *, int);
  453. int gsd_north_arrow(float *, float, GLuint, unsigned long, unsigned long);
  454. int gsd_arrow(float *, unsigned long, float, float *, float, geosurf *);
  455. int gsd_arrow_onsurf(float *, float *, unsigned long, int, geosurf *);
  456. void gsd_3darrow(float *, unsigned long, float, float, float *, float);
  457. int gsd_scalebar(float *, float, GLuint, unsigned long, unsigned long);
  458. int gsd_scalebar_v2(float *, float, GLuint, unsigned long, unsigned long);
  459. void primitive_cone(unsigned long);
  460. void primitive_cylinder(unsigned long, int);
  461. /* gsd_prim.c */
  462. void gsd_flush(void);
  463. void gsd_colormode(int);
  464. void show_colormode(void);
  465. void gsd_circ(float, float, float);
  466. void gsd_disc(float, float, float, float);
  467. void gsd_sphere(float *, float);
  468. void gsd_zwritemask(unsigned long);
  469. void gsd_backface(int);
  470. void gsd_linewidth(short);
  471. void gsd_bgnqstrip(void);
  472. void gsd_endqstrip(void);
  473. void gsd_bgntmesh(void);
  474. void gsd_endtmesh(void);
  475. void gsd_bgntstrip(void);
  476. void gsd_endtstrip(void);
  477. void gsd_bgntfan(void);
  478. void gsd_endtfan(void);
  479. void gsd_swaptmesh(void);
  480. void gsd_bgnpolygon(void);
  481. void gsd_endpolygon(void);
  482. void gsd_bgnline(void);
  483. void gsd_endline(void);
  484. void gsd_shademodel(int);
  485. int gsd_getshademodel(void);
  486. void gsd_bothbuffers(void);
  487. void gsd_frontbuffer(void);
  488. void gsd_backbuffer(void);
  489. void gsd_swapbuffers(void);
  490. void gsd_popmatrix(void);
  491. void gsd_pushmatrix(void);
  492. void gsd_scale(float, float, float);
  493. void gsd_translate(float, float, float);
  494. void gsd_rot(float, char);
  495. void gsd_checkwindow(int *, int *, double *, double *);
  496. int gsd_checkpoint(float *, int *, int *, double *, double *);
  497. void gsd_litvert_func(float *, unsigned long, float *);
  498. void gsd_litvert_func2(float *, unsigned long, float *);
  499. void gsd_vert_func(float *);
  500. void gsd_color_func(unsigned int);
  501. void gsd_init_lightmodel(void);
  502. void gsd_set_material(int, int, float, float, int);
  503. void gsd_deflight(int, struct lightdefs *);
  504. void gsd_switchlight(int, int);
  505. int gsd_getimage(unsigned char **, unsigned int *, unsigned int *);
  506. void gsd_blend(int);
  507. void gsd_def_clipplane(int, double *);
  508. void gsd_set_clipplane(int, int);
  509. void gsd_finish(void);
  510. void gsd_viewport(int, int, int, int);
  511. int gsd_makelist(void);
  512. void gsd_bgnlist(int, int);
  513. void gsd_endlist(void);
  514. void gsd_calllist(int);
  515. void gsd_deletelist(GLuint, int);
  516. void gsd_calllists(int);
  517. void gsd_getwindow(int *, int *, double *, double *);
  518. int gsd_writeView(unsigned char **, unsigned int, unsigned int);
  519. /* gsd_surf.c */
  520. int gsd_surf(geosurf *);
  521. int gsd_surf_map(geosurf *);
  522. int gsd_surf_const(geosurf *, float);
  523. int gsd_surf_func(geosurf *, int (*)());
  524. int gsd_triangulated_wall(int, int, geosurf *, geosurf *, Point3 *, Point3 *,
  525. float *);
  526. void gsd_setfc(int);
  527. int gsd_getfc(void);
  528. int gsd_ortho_wall(int, int, geosurf **, Point3 **, float *);
  529. int gsd_wall(float *, float *, float *);
  530. int gsd_norm_arrows(geosurf *);
  531. /* gsd_views.c */
  532. int gsd_get_los(float (*)[3], short, short);
  533. void gsd_set_view(geoview *, geodisplay *);
  534. void gsd_check_focus(geoview *);
  535. void gsd_get_zup(geoview *, double *);
  536. int gsd_zup_twist(geoview *);
  537. void gsd_do_scale(int);
  538. void gsd_real2model(Point3);
  539. void gsd_model2real(Point3);
  540. void gsd_model2surf(geosurf *, Point3);
  541. void gsd_surf2model(Point3);
  542. void gsd_surf2real(geosurf *, Point3);
  543. void gsd_real2surf(geosurf *, Point3);
  544. /* gsd_wire.c */
  545. int gsd_wire_surf(geosurf *);
  546. int gsd_wire_surf_map(geosurf *);
  547. int gsd_coarse_surf_map(geosurf *);
  548. int gsd_wire_surf_const(geosurf *, float);
  549. int gsd_wire_surf_func(geosurf *, int (*)());
  550. int gsd_wire_arrows(geosurf *);
  551. /* gsdiff.c */
  552. void gsdiff_set_SDscale(float);
  553. float gsdiff_get_SDscale(void);
  554. void gsdiff_set_SDref(geosurf *);
  555. geosurf *gsdiff_get_SDref(void);
  556. float gsdiff_do_SD(float, int);
  557. /* gsdrape.c */
  558. int gsdrape_set_surface(geosurf *);
  559. int seg_intersect_vregion(geosurf *, float *, float *);
  560. Point3 *gsdrape_get_segments(geosurf *, float *, float *, int *);
  561. Point3 *gsdrape_get_allsegments(geosurf *, float *, float *, int *);
  562. void interp_first_last(geosurf *, float *, float *, Point3, Point3);
  563. int _viewcell_tri_interp(geosurf *, Point3);
  564. int viewcell_tri_interp(geosurf *, typbuff *, Point3, int);
  565. int in_vregion(geosurf *, float *);
  566. int order_intersects(geosurf *, Point3, Point3, int, int, int);
  567. int get_vert_intersects(geosurf *, float *, float *, float *);
  568. int get_horz_intersects(geosurf *, float *, float *, float *);
  569. int get_diag_intersects(geosurf *, float *, float *, float *);
  570. int segs_intersect(float, float, float, float, float, float, float, float,
  571. float *, float *);
  572. int Point_on_plane(Point3, Point3, Point3, Point3);
  573. int XY_intersect_plane(float *, float *);
  574. int P3toPlane(Point3, Point3, Point3, float *);
  575. int V3Cross(Point3, Point3, Point3);
  576. /* gsds.c */
  577. int gsds_findh(const char *, IFLAG *, IFLAG *, int);
  578. int gsds_newh(const char *);
  579. typbuff *gsds_get_typbuff(int, IFLAG);
  580. char *gsds_get_name(int);
  581. int gsds_free_datah(int);
  582. int gsds_free_data_buff(int, int);
  583. size_t free_data_buffs(dataset *, int);
  584. size_t gsds_alloc_typbuff(int, int *, int, int);
  585. int gsds_get_changed(int);
  586. int gsds_set_changed(int, IFLAG);
  587. int gsds_get_type(int);
  588. /* gsget.c */
  589. int get_mapatt(typbuff *, int, float *);
  590. /* gv.c */
  591. geovect *gv_get_vect(int);
  592. geovect *gv_get_prev_vect(int);
  593. int gv_num_vects(void);
  594. geovect *gv_get_last_vect(void);
  595. geovect *gv_get_new_vect(void);
  596. void gv_update_drapesurfs(void);
  597. int gv_set_defaults(geovect *);
  598. int gv_init_vect(geovect *);
  599. void gv_delete_vect(int);
  600. int gv_free_vect(geovect *);
  601. void gv_free_vectmem(geovect *);
  602. void gv_set_drapesurfs(geovect *, int *, int);
  603. /* gv_quick.c */
  604. float gv_line_length(geoline *);
  605. int gln_num_points(geoline *);
  606. int gv_num_points(geovect *);
  607. int gv_decimate_lines(geovect *);
  608. /* gvd.c */
  609. int gs_clip_segment(geosurf *, float *, float *, float *);
  610. int gvd_vect(geovect *, geosurf *, int);
  611. void gvd_draw_lineonsurf(geosurf *, float *, float *, int);
  612. /* gvl.c */
  613. geovol *gvl_get_vol(int);
  614. geovol *gvl_get_prev_vol(int);
  615. int gvl_getall_vols(geovol **);
  616. int gvl_num_vols(void);
  617. geovol *gvl_get_last_vol(void);
  618. geovol *gvl_get_new_vol(void);
  619. int gvl_init_vol(geovol *, double, double, double, int, int, int,
  620. double, double, double);
  621. void gvl_delete_vol(int);
  622. int gvl_free_vol(geovol *);
  623. void gvl_free_volmem(geovol *);
  624. void print_vol_fields(geovol *);
  625. int gvl_get_xextents(geovol *, float *, float *);
  626. int gvl_get_yextents(geovol *, float *, float *);
  627. int gvl_get_zextents(geovol *, float *, float *);
  628. int gvl_get_xrange(float *, float *);
  629. int gvl_get_yrange(float *, float *);
  630. int gvl_get_zrange(float *, float *);
  631. int gvl_isosurf_init(geovol_isosurf *);
  632. int gvl_isosurf_freemem(geovol_isosurf *);
  633. geovol_isosurf *gvl_isosurf_get_isosurf(int, int);
  634. int gvl_isosurf_get_att_src(geovol_isosurf *, int);
  635. int gvl_isosurf_set_att_src(geovol_isosurf *, int, int);
  636. int gvl_isosurf_set_att_const(geovol_isosurf *, int, float);
  637. int gvl_isosurf_set_att_map(geovol_isosurf *, int, const char *);
  638. int gvl_isosurf_set_att_changed(geovol_isosurf *, int);
  639. int gvl_slice_init(geovol_slice *);
  640. geovol_slice *gvl_slice_get_slice(int, int);
  641. int gvl_slice_freemem(geovol_slice *);
  642. /* trans.c */
  643. void P_scale(float, float, float);
  644. void P_transform(int, float (*)[4], float (*)[4]);
  645. int P_pushmatrix(void);
  646. int P_popmatrix(void);
  647. void P_rot(float, char);
  648. /* gvl_file.c */
  649. geovol_file *gvl_file_get_volfile(int);
  650. char *gvl_file_get_name(int);
  651. int gvl_file_get_file_type(geovol_file *);
  652. int gvl_file_get_data_type(geovol_file *);
  653. int gvl_file_newh(const char *, IFLAG);
  654. int gvl_file_free_datah(int);
  655. int gvl_file_start_read(geovol_file *);
  656. int gvl_file_end_read(geovol_file *);
  657. int gvl_file_get_value(geovol_file *, int, int, int, void *);
  658. int gvl_file_is_null_value(geovol_file *, void *);
  659. int gvl_file_set_mode(geovol_file *, IFLAG);
  660. int gvl_file_set_slices_param(geovol_file *, int, int);
  661. void gvl_file_get_min_max(geovol_file *, double *, double *);
  662. /* Gvl3.c */
  663. int Gvl_load_colors_data(void **, const char *);
  664. int Gvl_unload_colors_data(void *);
  665. int Gvl_get_color_for_value(void *, float *);
  666. /* gvl_calc.c */
  667. int gvl_isosurf_calc(geovol *);
  668. int gvl_slices_calc(geovol *);
  669. void gvl_write_char(int, unsigned char **, unsigned char);
  670. unsigned char gvl_read_char(int, const unsigned char *);
  671. void gvl_align_data(int, unsigned char **);
  672. /* gvld.c */
  673. int gvld_vol(geovol *);
  674. int gvld_wire_vol(geovol *);
  675. int gvld_isosurf(geovol *);
  676. int gvld_wire_isosurf(geovol *);
  677. int gvld_slices(geovol *);
  678. int gvld_slice(geovol *, int);
  679. int gvld_wire_slices(geovol *);
  680. int gvld_wind3_box(geovol *);
  681. /* from gsd_fringe.c */
  682. void gsd_display_fringe(geosurf *, unsigned long, float, int[4]);
  683. void gsd_fringe_horiz_poly(float, geosurf *, int, int);
  684. void gsd_fringe_horiz_line(float, geosurf *, int, int);
  685. void gsd_fringe_vert_poly(float, geosurf *, int, int);
  686. void gsd_fringe_vert_line(float, geosurf *, int, int);
  687. /* from gsd_legend.c */
  688. GLuint gsd_put_legend(const char *, GLuint, int, int *, float *, int *);
  689. void gsd_bgn_legend_viewport(GLint, GLint, GLint, GLint);
  690. void gsd_end_legend_viewport(void);
  691. int gsd_make_nice_number(float *);
  692. #endif /* GRASS_OGSFDEFS_H */