GRASS 8 Programmer's Manual 8.6.0dev(2026)-8843f13794
Loading...
Searching...
No Matches
gsd_wire.c
Go to the documentation of this file.
1/*!
2 \file lib/ogsf/gsd_wire.c
3
4 \brief OGSF library -
5
6 GRASS OpenGL gsurf OGSF Library
7
8 SPDX-FileCopyrightText: 1999-2008 GRASS Development Team
9 SPDX-License-Identifier: GPL-2.0-or-later
10
11 \author Bill Brown USACERL (January 1993)
12 \author Doxygenized by Martin Landa <landa.martin gmail.com> (May 2008)
13 */
14
15#include <grass/gis.h>
16#include <grass/ogsf.h>
17
18#include "gsget.h"
19#include "rowcol.h"
20
21#define DO_ARROWS
22
23/************************************************************************/
24/* Notes on exaggeration:
25 vertical exaggeration is of two forms:
26 1) global exaggeration (from geoview struct)
27 2) vertical exaggeration for each surface - not implemented
28 */
29
30/************************************************************************/
31/* may need to add more parameters to tell it which window or off_screen
32 * pixmap to draw into. nah - just have one current (OpenGL limitation)
33 */
34
35/*!
36 \brief Draw surface wire
37
38 \param surf surface (geosurf)
39
40 \return
41 */
43{
44 int desc, ret;
45
46 G_debug(3, "gsd_wire_surf(): id=%d", surf->gsurf_id);
47
48 desc = ATT_TOPO;
49
50 switch (gs_get_att_src(surf, desc)) {
51 case NOTSET_ATT:
52 ret = (-1);
53
54 break;
55
56 case MAP_ATT:
57 if (surf->draw_mode & DM_GRID_WIRE)
58 ret = (gsd_wire_surf_map(surf)); /* draw mesh */
59 else
60 ret = (gsd_coarse_surf_map(surf)); /* draw coarse surf */
61
62#ifdef DO_ARROWS
63 /*
64 gsd_wire_arrows(surf);
65 */
66#endif
67
68 break;
69
70 case CONST_ATT:
71 ret = (gsd_wire_surf_const(surf, surf->att[desc].constant));
72 break;
73
74 case FUNC_ATT:
75 ret = (gsd_wire_surf_func(surf, surf->att[desc].user_func));
76
77 break;
78
79 default:
80 ret = (-1);
81
82 break;
83 }
84
85 return (ret);
86}
87
88/*!
89 \brief ADD
90
91 \param surf surface (geosurf)
92
93 \return
94 */
96{
98 typbuff *buff, *cobuff;
99 int xmod, ymod, row, col, cnt, xcnt, ycnt, x1off;
100 long offset, y1off;
101 float pt[4], xres, yres, ymax, zexag;
102 int col_src, curcolor;
104
105 G_debug(3, "gsd_wire_surf_map");
106
107 buff = gs_get_att_typbuff(surf, ATT_TOPO, 0);
109
111 check_mask = surf->curmask ? 1 : 0;
112
113 /*
114 checks ATT_TOPO & ATT_COLOR no_zero flags, make a mask from each,
115 combine it/them with any current mask, put in typbuff:
116 if(surf->att[ATT_TOPO].constant)
117 */
118
119 xmod = surf->x_modw;
120 ymod = surf->y_modw;
121 xres = xmod * surf->xres;
122 yres = ymod * surf->yres;
123 ymax = (surf->rows - 1) * surf->yres;
124 xcnt = 1 + (surf->cols - 1) / xmod;
125 ycnt = 1 + (surf->rows - 1) / ymod;
126
128 gsd_do_scale(1);
129 gsd_translate(surf->x_trans, surf->y_trans, surf->z_trans);
130
131 zexag = surf->z_exag;
132
134
135 /* will need to check for color source of FUNC_ATT & NOTSET_ATT,
136 or else use more general and inefficient gets */
137
138 check_color = (surf->wire_color == WC_COLOR_ATT);
139
140 if (check_color) {
141 coloratt = &(surf->att[ATT_COLOR]);
142 col_src = surf->att[ATT_COLOR].att_src;
143
144 if (col_src != MAP_ATT) {
145 if (col_src == CONST_ATT) {
146 gsd_color_func((int)surf->att[ATT_COLOR].constant);
147 }
148 else {
149 gsd_color_func(surf->wire_color);
150 }
151
152 check_color = 0;
153 }
154 }
155 else {
156 gsd_color_func(surf->wire_color);
157 }
158
159 /* would also be good to check if colormap == surfmap, to increase speed */
160 for (row = 0; row < ycnt; row++) {
161 pt[Y] = ymax - row * yres;
162 y1off = (long)row * ymod * surf->cols;
163
164 gsd_bgnline();
165 cnt = 0;
166
167 for (col = 0; col < xcnt; col++) {
168 pt[X] = col * xres;
169 x1off = col * xmod;
170 offset = x1off + y1off;
171
172 if (check_mask) {
173 if (BM_get(surf->curmask, col * xmod, row * ymod)) {
174 gsd_endline();
175 gsd_bgnline();
176 cnt = 0;
177 continue;
178 }
179 }
180
181 GET_MAPATT(buff, offset, pt[Z]);
182
183 if (check_color) {
186 /* could use this & skip the GET if colordata == elevdata
187 gsd_color_func(gs_fastmapcolor(cobuff, coloratt, offset,
188 (int)pt[Z]));
189 */
190 }
191
192 pt[Z] = pt[Z] * zexag;
193
195
196 if (cnt == 255) {
197 gsd_endline();
198 gsd_bgnline();
199 cnt = 0;
201 }
202
203 cnt++;
204 }
205
206 gsd_endline();
207 }
208
209 for (col = 0; col < xcnt; col++) {
210 pt[X] = col * xres;
211 x1off = col * xmod;
212
213 gsd_bgnline();
214 cnt = 0;
215
216 for (row = 0; row < ycnt; row++) {
217 pt[Y] = ymax - row * yres;
218 y1off = (long)row * ymod * surf->cols;
219 offset = x1off + y1off;
220
221 if (check_mask) {
222 if (BM_get(surf->curmask, col * xmod, row * ymod)) {
223 gsd_endline();
224 gsd_bgnline();
225 cnt = 0;
226 continue;
227 }
228 }
229
230 GET_MAPATT(buff, offset, pt[Z]);
231
232 if (check_color) {
235 /* could use this & skip the GET if colordata == elevdata
236 gsd_color_func(gs_fastmapcolor(coloratt, offset,
237 (int)pt[Z]));
238 */
239 }
240
241 pt[Z] = pt[Z] * zexag;
242
244
245 if (cnt == 255) {
246 gsd_endline();
247 gsd_bgnline();
248 cnt = 0;
250 }
251
252 cnt++;
253 }
254
255 gsd_endline();
256 }
257
260
261 return (1);
262}
263
264/*!
265 \brief ADD
266
267 \param surf surface (geosurf)
268 \param k
269
270 \return
271 */
273{
275 int xmod, ymod, row, col, cnt, xcnt, ycnt, x1off;
276 long offset, y1off;
277 float pt[4], xres, yres, ymax, zexag;
278 int col_src;
281
282 G_debug(3, "gsd_wire_surf_const");
283
285
287 check_mask = surf->curmask ? 1 : 0;
288
290
291 xmod = surf->x_modw;
292 ymod = surf->y_modw;
293 xres = xmod * surf->xres;
294 yres = ymod * surf->yres;
295
296 xcnt = 1 + (surf->cols - 1) / xmod;
297 ycnt = 1 + (surf->rows - 1) / ymod;
298 ymax = (surf->rows - 1) * surf->yres;
299
301 gsd_do_scale(1);
302 gsd_translate(surf->x_trans, surf->y_trans, surf->z_trans);
303
304 zexag = surf->z_exag;
305
307
308 /* will need to check for color source of FUNC_ATT & NOTSET_ATT,
309 or else use more general and inefficient gets */
310
311 check_color = (surf->wire_color == WC_COLOR_ATT);
312
313 if (check_color) {
314 coloratt = &(surf->att[ATT_COLOR]);
315 col_src = surf->att[ATT_COLOR].att_src;
316
317 if (col_src != MAP_ATT) {
318 if (col_src == CONST_ATT) {
319 gsd_color_func((int)surf->att[ATT_COLOR].constant);
320 }
321 else {
322 gsd_color_func(surf->wire_color);
323 }
324
325 check_color = 0;
326 }
327 }
328 else {
329 gsd_color_func(surf->wire_color);
330 }
331
332 pt[Z] = k * zexag;
333
334 for (row = 0; row < ycnt; row++) {
335 pt[Y] = ymax - row * yres;
336 y1off = (long)row * ymod * surf->cols;
337
338 gsd_bgnline();
339 cnt = 0;
340
341 for (col = 0; col < xcnt; col++) {
342 pt[X] = col * xres;
343 x1off = col * xmod;
344 offset = x1off + y1off;
345
346 if (check_mask) {
347 if (BM_get(surf->curmask, col * xmod, row * ymod)) {
348 gsd_endline();
349 gsd_bgnline();
350 cnt = 0;
351 continue;
352 }
353 }
354
355 if (check_color) {
357 }
358
359 if (do_diff) {
360 pt[Z] = gsdiff_do_SD(k * zexag, offset);
361 }
362
364
365 if (cnt == 255) {
366 gsd_endline();
367 gsd_bgnline();
368 cnt = 0;
370 }
371
372 cnt++;
373 }
374
375 gsd_endline();
376 }
377
378 for (col = 0; col < xcnt; col++) {
379 pt[X] = col * xres;
380 x1off = col * xmod;
381
382 gsd_bgnline();
383 cnt = 0;
384
385 for (row = 0; row < ycnt; row++) {
386 pt[Y] = ymax - row * yres;
387 y1off = (long)row * ymod * surf->cols;
388 offset = x1off + y1off;
389
390 if (check_mask) {
391 if (BM_get(surf->curmask, col * xmod, row * ymod)) {
392 gsd_endline();
393 gsd_bgnline();
394 cnt = 0;
395 continue;
396 }
397 }
398
399 if (check_color) {
401 }
402
403 if (do_diff) {
404 pt[Z] = gsdiff_do_SD(k * zexag, offset);
405 }
406
408
409 if (cnt == 255) {
410 gsd_endline();
411 gsd_bgnline();
412 cnt = 0;
414 }
415
416 cnt++;
417 }
418
419 gsd_endline();
420 }
421
424
425 return (1);
426}
427
428/*!
429 \brief ADD
430
431 Not yet implemented.
432
433 \param gs surface (geosurf) [unused]
434 \param user_func user defined function [unused]
435
436 \return 1
437 */
438int gsd_wire_surf_func(geosurf *gs G_UNUSED, int (*user_func)(void) G_UNUSED)
439{
440 return (1);
441}
442
443/*!
444 \brief ADD
445
446 Need to do Zexag scale of normal for arrow direction, drawing
447 routine unexags z for arrow
448
449 \param surf surface (geosurf)
450
451 \return
452 */
454{
455 typbuff *buff, *cobuff;
457 int xmod, ymod, row, col, xcnt, ycnt;
458 long offset, y1off;
459 float tx, ty, tz, sz;
460 float n[3], pt[4], xres, yres, ymax, zexag;
461 int col_src, curcolor;
463
464 G_debug(3, "gsd_norm_arrows");
465
466 /* avoid scaling by zero */
467 GS_get_scale(&tx, &ty, &tz, 1);
468
469 if (tz == 0.0) {
470 return (0);
471 }
472
473 sz = GS_global_exag();
474
476 check_mask = surf->curmask ? 1 : 0;
477
478 /*
479 checks ATT_TOPO & ATT_COLOR no_zero flags, make a mask from each,
480 combine it/them with any current mask, put in surf->curmask:
481 */
482
483 check_color = 1;
484 curcolor = 0;
485 coloratt = &(surf->att[ATT_COLOR]);
486 col_src = surf->att[ATT_COLOR].att_src;
487
488 if (col_src != MAP_ATT) {
489 if (col_src == CONST_ATT) {
490 curcolor = (int)surf->att[ATT_COLOR].constant;
491 }
492 else {
493 curcolor = surf->wire_color;
494 }
495
496 check_color = 0;
497 }
498
499 buff = gs_get_att_typbuff(surf, ATT_TOPO, 0);
501
502 xmod = surf->x_modw;
503 ymod = surf->y_modw;
504 xres = xmod * surf->xres;
505 yres = ymod * surf->yres;
506 ymax = (surf->rows - 1) * surf->yres;
507 xcnt = 1 + (surf->cols - 1) / xmod;
508 ycnt = 1 + (surf->rows - 1) / ymod;
509
511 gsd_do_scale(1);
512 gsd_translate(surf->x_trans, surf->y_trans, surf->z_trans);
513
514 zexag = surf->z_exag;
515 /* CURRENTLY ALWAYS 1.0 */
516
518
519 for (row = 0; row < ycnt; row++) {
520 pt[Y] = ymax - row * yres;
521 y1off = (long)row * ymod * surf->cols;
522
523 for (col = 0; col < xcnt; col++) {
524 pt[X] = col * xres;
525 offset = (long)col * xmod + y1off;
526
527 if (check_mask) {
528 if (BM_get(surf->curmask, col * xmod, row * ymod)) {
529 continue;
530 }
531 }
532
533 FNORM(surf->norms[offset], n);
534 GET_MAPATT(buff, offset, pt[Z]);
535 pt[Z] *= zexag;
536
537 if (check_color) {
539 }
540
541 gsd_arrow(pt, curcolor, xres * 2, n, sz, surf);
542 } /* ea col */
543 } /* ea row */
544
547
548 return (1);
549}
550
551/*!
552 \brief Draw coarse surface
553
554 New (TEST) wire routine that draws low res surface
555 Based on new Triangle Fan routine
556 Resolution is a function of current surface resolution
557 times wire resolution
558
559 \todo normals have to be recalculated before proper low
560 res surface can be drawn
561
562 In window optimization has been removed
563
564 \param surf surface (geosurf)
565
566 \return
567 */
569{
570 int /* check_mask, */ check_color, check_transp;
572 typbuff *buff, *cobuff, *trbuff, *embuff, *shbuff;
573 int xmod, ymod;
574 int row, col, xcnt, ycnt;
575 long y1off, y2off, y3off;
576 long offset2[10];
577 float pt2[10][2];
578 int ii;
579 float x1, x2, x3, y1, y2, y3, tx, ty, tz, ttr;
580 float n[3], pt[4], xres, yres, ymax, zexag;
583
585
586 /* int datarow1, datarow2, datarow3; */
587
588 float kem, ksh, pkem, pksh;
589 unsigned int ktrans;
590
591 int step_val = 2 * surf->x_modw; /* should always be factor of 2 for fan */
592 int start_val = surf->x_modw;
593
594 /* ensure normals are correct */
596
597 /* avoid scaling by zero */
598 GS_get_scale(&tx, &ty, &tz, 1);
599
600 if (tz == 0.0) {
601 return (gsd_surf_const(surf, 0.0));
602 }
603 /* else if (surf->z_exag == 0.0)
604 {
605 return(gsd_surf_const(surf, surf->z_min));
606 }
607 NOT YET IMPLEMENTED */
608
609 buff = gs_get_att_typbuff(surf, ATT_TOPO, 0);
611
613 /* check_mask = surf->curmask ? 1 : 0; */
614
615 /*
616 checks ATT_TOPO & ATT_COLOR no_zero flags, make a mask from each,
617 combine it/them with any current mask, put in surf->curmask:
618 */
619 xmod = surf->x_mod;
620 ymod = surf->y_mod;
621 xres = xmod * surf->xres;
622 yres = ymod * surf->yres;
623 ymax = (surf->rows - 1) * surf->yres;
624
625 xcnt = VCOLS(surf);
626 ycnt = VROWS(surf);
627
629 gsd_do_scale(1);
630 gsd_translate(surf->x_trans, surf->y_trans, surf->z_trans);
631 zexag = surf->z_exag;
632
634
635 /* CURRENTLY ALWAYS 1.0 */
636#ifdef CALC_AREA
637 sz = GS_global_exag();
638#endif
639
640 /* TODO: get rid of (define) these magic numbers scaling the attribute vals
641 */
642 check_transp = 0;
643 tratt = &(surf->att[ATT_TRANSP]);
644 ktrans = (255U << 24);
645 trans_src = surf->att[ATT_TRANSP].att_src;
646
647 if (CONST_ATT == trans_src && surf->att[ATT_TRANSP].constant != 0.0) {
648 ktrans = (255 - (int)surf->att[ATT_TRANSP].constant) << 24;
649 gsd_blend(1);
650 gsd_zwritemask(0x0);
651 }
652 else if (MAP_ATT == trans_src) {
654 check_transp = trbuff ? 1 : 0;
655 gsd_blend(1);
656 gsd_zwritemask(0x0);
657 }
658
659 check_emis = 0;
660 ematt = &(surf->att[ATT_EMIT]);
661 kem = 0.0;
662 pkem = 1.0;
663 em_src = surf->att[ATT_EMIT].att_src;
664
665 if (CONST_ATT == em_src) {
666 kem = surf->att[ATT_EMIT].constant / 255.;
667 }
668 else if (MAP_ATT == em_src) {
670 check_emis = embuff ? 1 : 0;
671 }
672
673 check_shin = 0;
674 shatt = &(surf->att[ATT_SHINE]);
675 ksh = 0.0;
676 pksh = 1.0;
677 sh_src = surf->att[ATT_SHINE].att_src;
678
679 if (CONST_ATT == sh_src) {
680 ksh = surf->att[ATT_SHINE].constant / 255.;
681 gsd_set_material(1, 0, ksh, kem, 0x0);
682 }
683 else if (MAP_ATT == sh_src) {
685 check_shin = shbuff ? 1 : 0;
686 }
687
688 /* will need to check for color source of FUNC_ATT & NOTSET_ATT,
689 or else use more general and inefficient gets */
690 check_color = 1;
691 curcolor = 0;
692 coloratt = &(surf->att[ATT_COLOR]);
693 col_src = surf->att[ATT_COLOR].att_src;
694
695 if (col_src != MAP_ATT) {
696 if (col_src == CONST_ATT) {
697 curcolor = (int)surf->att[ATT_COLOR].constant;
698 }
699 else {
700 curcolor = surf->wire_color;
701 }
702
703 check_color = 0;
704 }
705
707
708 /* would also be good to check if colormap == surfmap, to increase speed */
709 /* will also need to set check_transp, check_shine, etc & fix material */
710 for (row = start_val; row <= ycnt - start_val; row += step_val) {
711
712 /*
713 datarow1 = row * ymod;
714 datarow2 = (row - (step_val / 2)) * ymod;
715 datarow3 = (row + (step_val / 2)) * ymod;
716 */
717
718 y1 = ymax - row * yres;
719 y2 = ymax - (row - (step_val / 2)) * yres;
720 y3 = ymax - (row + (step_val / 2)) * yres;
721
722 y1off = (long)row * ymod * surf->cols;
723 y2off = (long)(row - (step_val / 2)) * ymod * surf->cols;
724 y3off = (long)(row + (step_val / 2)) * ymod * surf->cols;
725
726 for (col = start_val; col <= xcnt - start_val; col += step_val) {
727
728 datacol1 = col * xmod;
729 datacol2 = (col - (step_val / 2)) * xmod;
730 datacol3 = (col + (step_val / 2)) * xmod;
731
732 x1 = col * xres;
733 x2 = (col - (step_val / 2)) * xres;
734 x3 = (col + (step_val / 2)) * xres;
735
736 /* Do not need BM_get because GET_MAPATT calls
737 * same and returns zero if masked
738 */
739 offset2[0] = y1off + datacol1; /* fan center */
740 pt2[0][X] = x1;
741 pt2[0][Y] = y1; /* fan center */
742 pt[X] = pt2[0][X];
743 pt[Y] = pt2[0][Y];
744 if (!GET_MAPATT(buff, offset2[0], pt[Z]))
745 continue; /* masked */
746 pt[Z] *= zexag;
747
748 offset2[1] = y2off + datacol2;
749 offset2[2] = y2off + datacol1;
750 offset2[3] = y2off + datacol3;
751 offset2[4] = y1off + datacol3;
752 offset2[5] = y3off + datacol3;
753 offset2[6] = y3off + datacol1;
754 offset2[7] = y3off + datacol2;
755 offset2[8] = y1off + datacol2;
756 offset2[9] = y2off + datacol2; /* repeat 1st corner to close */
757
758 pt2[1][X] = x2;
759 pt2[1][Y] = y2;
760 pt2[2][X] = x1;
761 pt2[2][Y] = y2;
762 pt2[3][X] = x3;
763 pt2[3][Y] = y2;
764 pt2[4][X] = x3;
765 pt2[4][Y] = y1;
766 pt2[5][X] = x3;
767 pt2[5][Y] = y3;
768 pt2[6][X] = x1;
769 pt2[6][Y] = y3;
770 pt2[7][X] = x2;
771 pt2[7][Y] = y3;
772 pt2[8][X] = x2;
773 pt2[8][Y] = y1;
774 pt2[9][X] = x2;
775 pt2[9][Y] = y2; /* repeat 1st corner to close */
776
777 /* Run through triangle fan */
778 gsd_bgntfan();
779 for (ii = 0; ii < 10; ii++) {
780
781 if (ii > 0) {
782 pt[X] = pt2[ii][X];
783 pt[Y] = pt2[ii][Y];
784 if (!GET_MAPATT(buff, offset2[ii], pt[Z]))
785 continue;
786 pt[Z] *= zexag;
787 }
788
789 FNORM(surf->norms[offset2[ii]], n);
790
791 if (check_color)
793
794 if (check_transp) {
796 ktrans = (char)SCALE_ATT(tratt, ttr, 0, 255);
797 ktrans = (char)(255U - ktrans) << 24;
798 }
799
800 if (check_material) {
801 if (check_emis) {
803 kem = SCALE_ATT(ematt, kem, 0., 1.);
804 }
805
806 if (check_shin) {
808 ksh = SCALE_ATT(shatt, ksh, 0., 1.);
809 }
810
811 if (pksh != ksh || pkem != kem || (kem && check_color)) {
812 pksh = ksh;
813 pkem = kem;
815 curcolor);
816 }
817 }
818
820
821 } /* close ii loop */
822 gsd_endtfan();
823
824 } /* end col */
825
826 } /* end row */
827
829 /*
830 gsd_colormode(CM_DIFFUSE);
831 */
832 gsd_blend(0);
833 gsd_zwritemask(0xffffffff);
834
835 return (0);
836}
#define NULL
Definition ccmath.h:32
int BM_get(struct BM *, int, int)
Gets 'val' from the bitmap.
Definition bitmap.c:213
int G_debug(int, const char *,...) __attribute__((format(printf
void gsd_endtfan(void)
ADD.
Definition gsd_prim.c:343
void gsd_pushmatrix(void)
Push the current matrix stack.
Definition gsd_prim.c:507
void gsd_do_scale(int)
Set current scale.
Definition gsd_views.c:351
int gs_get_att_src(geosurf *, int)
Get attribute source.
Definition gs.c:652
int gs_calc_normals(geosurf *)
Calculate normals.
Definition gs_norms.c:120
int gs_mapcolor(typbuff *, gsurf_att *, int)
Call this one when you already know att_src is MAP_ATT.
Definition gs.c:964
int gs_update_curmask(geosurf *)
Update current maps.
Definition gs_bm.c:224
void gsd_color_func(unsigned int)
Set current color.
Definition gsd_prim.c:694
void gsd_translate(float, float, float)
Multiply the current matrix by a translation matrix.
Definition gsd_prim.c:535
void gsd_popmatrix(void)
Pop the current matrix stack.
Definition gsd_prim.c:497
void gsd_zwritemask(unsigned long)
Write out z-mask.
Definition gsd_prim.c:237
void gsd_endline(void)
End line.
Definition gsd_prim.c:403
int gsd_surf_const(geosurf *, float)
Using tmesh - not confident with qstrips portability.
Definition gsd_surf.c:725
void gsd_colormode(int)
Set color mode.
Definition gsd_prim.c:94
typbuff * gs_get_att_typbuff(geosurf *, int, int)
Get attribute data buffer.
Definition gs.c:677
void GS_get_scale(float *, float *, float *, int)
Get axis scale.
Definition gs2.c:3235
void gsd_bgntfan(void)
ADD.
Definition gsd_prim.c:333
void gsd_set_material(int, int, float, float, int)
Set material.
Definition gsd_prim.c:799
void gsd_bgnline(void)
Begin line.
Definition gsd_prim.c:393
float gsdiff_do_SD(float, int)
ADD.
Definition gsdiff.c:90
void gsd_blend(int)
Specify pixel arithmetic.
Definition gsd_prim.c:990
void gsd_vert_func(float *)
ADD.
Definition gsd_prim.c:682
int gsd_arrow(float *, unsigned long, float, float *, float, geosurf *)
Draws an arrow.
Definition gsd_objs.c:944
geosurf * gsdiff_get_SDref(void)
ADD.
Definition gsdiff.c:73
void gsd_litvert_func(float *, unsigned long, float *)
Set the current normal vector & specify vertex.
Definition gsd_prim.c:653
float GS_global_exag(void)
Get global z-exag value.
Definition gs2.c:1996
#define G_UNUSED
A macro for an attribute, if attached to a variable, indicating that the variable is not used.
Definition gis.h:43
int gsd_wire_arrows(geosurf *surf)
ADD.
Definition gsd_wire.c:453
int gsd_wire_surf_func(geosurf *gs, int(*user_func)(void))
ADD.
Definition gsd_wire.c:438
int gsd_wire_surf(geosurf *surf)
Draw surface wire.
Definition gsd_wire.c:42
int gsd_coarse_surf_map(geosurf *surf)
Draw coarse surface.
Definition gsd_wire.c:568
int gsd_wire_surf_const(geosurf *surf, float k)
ADD.
Definition gsd_wire.c:272
int gsd_wire_surf_map(geosurf *surf)
ADD.
Definition gsd_wire.c:95
#define FNORM(i, nv)
Definition gsget.h:51
#define SCALE_ATT(att, val, low, high)
Definition gsget.h:24
#define GET_MAPATT(buff, offset, att)
Definition gsget.h:29
OGSF header file (structures)
#define NOTSET_ATT
Definition ogsf.h:85
#define DM_GRID_WIRE
Definition ogsf.h:67
#define CM_DIFFUSE
Definition ogsf.h:152
#define X
Definition ogsf.h:141
#define ATT_TOPO
Definition ogsf.h:76
#define ATT_COLOR
Definition ogsf.h:77
#define ATT_EMIT
Definition ogsf.h:81
#define Z
Definition ogsf.h:143
#define ATT_SHINE
Definition ogsf.h:80
#define Y
Definition ogsf.h:142
#define MAP_ATT
Definition ogsf.h:86
#define WC_COLOR_ATT
Definition ogsf.h:70
#define CM_COLOR
Definition ogsf.h:149
#define FUNC_ATT
Definition ogsf.h:88
#define CONST_ATT
Definition ogsf.h:87
#define ATT_TRANSP
Definition ogsf.h:79
#define VCOLS(gs)
Definition rowcol.h:14
#define VROWS(gs)
Definition rowcol.h:13
Definition ogsf.h:267