7fd59977 |
1 | /*********************************************************************** |
2 | |
3 | FONCTION : |
4 | ---------- |
5 | File OpenGl_togl_triedron : |
6 | |
7 | |
8 | REMARQUES: |
9 | ---------- |
10 | |
11 | |
12 | HISTORIQUE DES MODIFICATIONS : |
13 | -------------------------------- |
14 | 17-09-98 : FMN/BGN ; Creation des points d'entree. |
15 | 14-12-98 : BGN; Developpement (S3989, Phase "triedre") |
16 | 15-12-98 : BGN; Ajout des WSUpdateState . |
17 | |
18 | ************************************************************************/ |
19 | |
20 | /*----------------------------------------------------------------------*/ |
21 | /* |
22 | * Includes |
23 | */ |
24 | |
25 | |
26 | #include <InterfaceGraphic_Graphic3d.hxx> |
27 | #include <InterfaceGraphic_Visual3d.hxx> |
28 | |
29 | /* pour utiliser WSUpdateState et TsmSetWSAttri */ |
30 | #include <OpenGl_tgl_all.hxx> |
31 | #include <OpenGl_tsm_ws.hxx> |
32 | |
33 | #include <OpenGl_triedron.hxx> |
34 | |
35 | /*----------------------------------------------------------------------*/ |
36 | /* |
37 | * Constantes |
38 | */ |
39 | |
40 | #define NO_PRINT |
41 | |
42 | /*----------------------------------------------------------------------*/ |
43 | |
44 | void EXPORT |
45 | call_togl_ztriedron_setup |
46 | ( |
47 | float* xcolor, |
48 | float* ycolor, |
49 | float* zcolor, |
50 | float sizeratio, |
51 | float axisdiameter, |
52 | int nbfacettes |
53 | ) |
54 | { |
55 | call_ztriedron_setup(xcolor, ycolor, zcolor, |
56 | sizeratio, axisdiameter, nbfacettes); |
57 | } |
58 | |
59 | void EXPORT |
60 | call_togl_triedron_display |
61 | ( |
62 | CALL_DEF_VIEW * aview, |
63 | int aPosition, |
64 | float r, |
65 | float g, |
66 | float b, |
67 | float aScale, |
68 | int asWireframe |
69 | ) |
70 | { |
71 | |
72 | CMN_KEY_DATA data; |
73 | TStatus status; |
74 | |
75 | #ifdef PRINT |
76 | printf("call_togl_triedron_display r = %f, g = %f, b = %f", r, g, b); |
77 | printf(", aScale = %f, aPosition = %d \n", aScale, aPosition ); |
78 | #endif |
79 | status = call_triedron_init (aview, aPosition, r, g, b, aScale, asWireframe); |
80 | |
81 | /* Mise a jour de l'update_mode */ |
82 | data.ldata = TNotDone; |
83 | TsmSetWSAttri(aview->WsId, WSUpdateState, &data ); |
84 | |
85 | |
86 | return; |
87 | } |
88 | |
89 | |
90 | void EXPORT |
91 | call_togl_triedron_erase |
92 | ( |
93 | CALL_DEF_VIEW * aview |
94 | ) |
95 | { |
96 | |
97 | CMN_KEY_DATA data; |
98 | |
99 | #ifdef PRINT |
100 | printf("call_togl_triedron_erase \n"); |
101 | #endif |
102 | call_triedron_erase (aview); |
103 | |
104 | /* Mise a jour de l'update_mode */ |
105 | data.ldata = TNotDone; |
106 | TsmSetWSAttri(aview->WsId, WSUpdateState, &data ); |
107 | |
108 | return; |
109 | } |
110 | |
111 | |
112 | void EXPORT |
113 | call_togl_triedron_echo |
114 | ( |
115 | CALL_DEF_VIEW * aview, |
116 | int AType |
117 | ) |
118 | { |
119 | #ifdef PRINT |
120 | printf("call_togl_triedron_echo \n"); |
121 | #endif |
122 | return; |
123 | } |