1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
/***********************************************************************
FONCTION :
----------
file OpenGl_tgl_util :
REMARQUES:
----------
HISTORIQUE DES MODIFICATIONS :
--------------------------------
xx-xx-xx : xxx ; Creation.
06-03-96 : FMN ; Suppression code inutile:
01-04-96 : CAL ; Integration MINSK portage WNT
29-04-96 : FMN ; Correction Warning.
30-01-97 : FMN ; Suppression call_util_init_indexes()
************************************************************************/
/*----------------------------------------------------------------------*/
/*
* Includes
*/
#include <OpenGl_tgl_all.hxx>
#include <stdlib.h>
#include <string.h>
#include <InterfaceGraphic_Graphic3d.hxx>
#include <InterfaceGraphic_Visual3d.hxx>
#include <OpenGl_tsm.hxx>
#include <OpenGl_tgl_util.hxx>
#include <OpenGl_tgl_pick.hxx>
#include <OpenGl_telem_filters.hxx>
#include <OpenGl_context.hxx>
#ifdef WNT
#include <OpenGl_Extension.hxx>
#include <InterfaceGraphic_wntio.hxx>
#endif /* WNT */
/*----------------------------------------------------------------------*/
Tintlst inc_pick_filter;
Tintlst exc_pick_filter;
Tintlst inc_highl_filter;
Tintlst exc_highl_filter;
Tintlst inc_invis_filter;
Tintlst exc_invis_filter;
/*----------------------------------------------------------------------*/
void
call_util_init_filters( Tint wsid )
{
Tint pick_inc_names[1] = { CALL_DEF_STRUCTPICKABLE };
Tint highl_inc_names[1] = { CALL_DEF_STRUCTHIGHLIGHTED };
Tint invis_inc_names[1] = { CALL_DEF_STRUCTNOVISIBLE };
Tint pick_excl_names[1] = { CALL_DEF_STRUCTNOPICKABLE };
inc_highl_filter.number = 1;
inc_highl_filter.integers = highl_inc_names;
exc_highl_filter.number = 0;
exc_highl_filter.integers = 0;
TglSetHighlFilter( wsid, 1, highl_inc_names, 0, 0 );
inc_pick_filter.number = 1;
inc_pick_filter.integers = pick_inc_names;
exc_pick_filter.number = 1;
exc_pick_filter.integers = pick_excl_names;
TglSetPickFilter( wsid, 1, pick_inc_names, 1, pick_excl_names );
inc_invis_filter.number = 1;
inc_invis_filter.integers = invis_inc_names;
exc_invis_filter.number = 0;
exc_invis_filter.integers = 0;
TglSetInvisFilter( wsid, 1, invis_inc_names, 0, 0 );
return;
}
/*----------------------------------------------------------------------*/
Tint
call_util_test_structure( Tint stid )
{
TStatus stat;
Tint num;
tsm_node ptr;
stat = TsmGetStructure( stid, &num, &ptr );
if( stat == TSuccess )
{
if( num )
return 2;
return 1;
}
return 0;
}
/*----------------------------------------------------------------------*/
/*
call_util_osd_getenv (symbol, value)
char *symbol, *value
Gets an environment variable.
*/
EXPORT extern int call_util_osd_getenv ( const char *symbol,
char *value,
int lval )
{
char *s;
if ((s = getenv (symbol)) == NULL) return (0);
if ((int)strlen (s) > lval) return (0);
strcpy (value, s);
return (1);
}
/*----------------------------------------------------------------------*/
|