|
NCBI Home IEB Home C Toolkit docs C++ Toolkit source browser C Toolkit source browser (2) |
NCBI C Toolkit Cross ReferenceC/vibrant/pictur3d.h |
source navigation diff markup identifier search freetext search file search |
1 /* pictur3d.h
2 * ===========================================================================
3 *
4 * PUBLIC DOMAIN NOTICE
5 * National Center for Biotechnology Information (NCBI)
6 *
7 * This software/database is a "United States Government Work" under the
8 * terms of the United States Copyright Act. It was written as part of
9 * the author's official duties as a United States Government employee and
10 * thus cannot be copyrighted. This software/database is freely available
11 * to the public for use. The National Library of Medicine and the U.S.
12 * Government do not place any restriction on its use or reproduction.
13 * We would, however, appreciate having the NCBI and the author cited in
14 * any work or product based on this material
15 *
16 * Although all reasonable efforts have been taken to ensure the accuracy
17 * and reliability of the software and data, the NLM and the U.S.
18 * Government do not and cannot warrant the performance or results that
19 * may be obtained by using this software or data. The NLM and the U.S.
20 * Government disclaim all warranties, express or implied, including
21 * warranties of performance, merchantability or fitness for any particular
22 * purpose.
23 *
24 * ===========================================================================
25 *
26 * File Name: pictur3d.h
27 *
28 * Author: Alex Smirnov
29 *
30 * Version Creation Date: 03/29/95
31 *
32 * $Revision: 6.0 $
33 *
34 * File Description:
35 * 3D picture public header file.
36 *
37 * Modifications:
38 * --------------------------------------------------------------------------
39 * Date Name Description of modification
40 * ------- ---------- -----------------------------------------------------
41 *
42 * ==========================================================================
43 */
44
45 #ifndef _PICTUR3D_
46 #define _PICTUR3D_
47
48 #ifndef _VIBRANT_
49 #include <vibrant.h>
50 #endif
51
52 #ifndef _DIAGNOST_
53 #include <diagnost.h>
54 #endif
55
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59
60 /*****************************************************************************
61 *
62 * DEFINES
63 *
64 *****************************************************************************/
65 /* Primitives type */
66 #define LINE3D 0x1
67 #define CYLINDER3D 0x2
68 #define SPHERE3D 0x4
69 #define TEXT3D 0x8
70 #define POLY3D 0x10
71
72 /* Text3D flags */
73 #define TEXT3D_LEFT 0x1
74 #define TEXT3D_CENTER 0x2
75 #define TEXT3D_RIGTH 0x3
76 #define TEXT3D_UPPER 0x10
77 #define TEXT3D_MIDDLE 0x20
78 #define TEXT3D_LOWER 0x30
79 #define TEXT3D_FRONT 0x100
80
81 /*****************************************************************************
82 *
83 * TYPEDEFS
84 *
85 *****************************************************************************/
86 typedef struct Nlm_picture3d {
87 VoidPtr dummy;
88 }PNTR Nlm_Picture3D;
89
90 typedef struct Nlm_segment3d {
91 VoidPtr dummy;
92 }PNTR Nlm_Segment3D;
93
94 typedef struct Nlm_primitive3d {
95 VoidPtr dummy;
96 }PNTR Nlm_Prim3D;
97
98 typedef struct Nlm_point3d {
99 Int4 x;
100 Int4 y;
101 Int4 z;
102 } Nlm_Point3D, PNTR Nlm_Point3DPtr;
103
104 typedef struct Nlm_box3d {
105 Int4 minX;
106 Int4 minY;
107 Int4 minZ;
108 Int4 maxX;
109 Int4 maxY;
110 Int4 maxZ;
111 } Nlm_Box3D, PNTR Nlm_Box3DPtr;
112
113 typedef struct Nlm_spher3d {
114 Int4 x;
115 Int4 y;
116 Int4 z;
117 Int4 radius;
118 } Nlm_Spher3D, PNTR Nlm_Spher3DPtr;
119
120 /*****************************************************************************
121 *
122 * EXTERN FUNCTION
123 *
124 *****************************************************************************/
125 extern Nlm_Picture3D Nlm_CreatePicture3D PROTO((void));
126 extern void Nlm_DeletePicture3D PROTO((Nlm_Picture3D pic));
127 extern void Nlm_ResetPicture3D PROTO((Nlm_Picture3D pic));
128 /* Colors */
129 extern Boolean Nlm_AllocPalette3D PROTO((Nlm_Picture3D pic,
130 Uint1 totalColors));
131 extern Boolean Nlm_SetColor3D PROTO((Nlm_Picture3D pic,
132 Uint1 color,
133 Uint1 red, Uint1 green, Uint1 blue));
134 extern Boolean Nlm_GetColor3D PROTO((Nlm_Picture3D pic,
135 Uint1 color,
136 Uint1Ptr red, Uint1Ptr green,
137 Uint1Ptr blue));
138 /* Layers */
139 extern void Nlm_SetLayer3D PROTO((Nlm_Picture3D pic,
140 Uint1 layer, Boolean layerOn));
141 extern Boolean Nlm_GetLayerStatus3D PROTO((Nlm_Picture3D pic,
142 Uint1 layer));
143
144 /* Segments */
145 extern Nlm_Segment3D Nlm_AddSegment3D PROTO((Nlm_Picture3D pic,
146 Nlm_Segment3D parent, BigScalar userData,
147 Uint1 layer));
148 extern void Nlm_GetSegmentInfo3D PROTO((Nlm_Picture3D pic,
149 Nlm_Segment3D segment, BigScalar PNTR userData,
150 Uint1Ptr layer, Nlm_Segment3D PNTR parent));
151
152 /* Nlm_GetSegSphere3D() and Nlm_GetSegBox3D() return FALSE if the picture
153 * (or segment) contains no subsegments in currently active layers
154 */
155 extern Nlm_Boolean Nlm_GetSegSphere3D PROTO((Nlm_Picture3D pic,
156 Nlm_Segment3D segment,
157 Nlm_Spher3DPtr sph ));
158 extern Nlm_Boolean Nlm_GetSegBox3D PROTO((Nlm_Picture3D pic,
159 Nlm_Segment3D segment,
160 Nlm_Box3DPtr box));
161
162 extern void Nlm_ChangeSegment3D PROTO((Nlm_Picture3D pic,
163 Nlm_Segment3D segment,
164 BigScalar userData, Uint1 layer));
165 extern void Nlm_DeleteSegment3D PROTO((Nlm_Picture3D pic,
166 Nlm_Segment3D segment));
167 /* Primitives */
168 extern Nlm_Prim3D Nlm_AddLine3D PROTO((Nlm_Picture3D pic,
169 Nlm_Segment3D segment, BigScalar userData,
170 Uint1 layer, Uint1 color,
171 Int4 x1, Int4 y1, Int4 z1,
172 Int4 x2, Int4 y2, Int4 z2));
173 extern Nlm_Prim3D Nlm_AddSphere3D PROTO((Nlm_Picture3D pic,
174 Nlm_Segment3D segment, BigScalar userData,
175 Uint1 layer, Uint1 color,
176 Int4 x, Int4 y, Int4 z, Uint4 radius));
177 extern Nlm_Prim3D Nlm_AddCylinder3D PROTO((Nlm_Picture3D pic,
178 Nlm_Segment3D segment, BigScalar userData,
179 Uint1 layer, Uint1 color,
180 Int4 x1, Int4 y1, Int4 z1,
181 Int4 x2, Int4 y2, Int4 z2, Uint4 radius));
182 extern Nlm_Prim3D Nlm_AddText3D PROTO((Nlm_Picture3D pic,
183 Nlm_Segment3D segment, BigScalar userData,
184 Uint1 layer, Uint1 color,
185 CharPtr string, Int4 x, Int4 y, Int4 z,
186 Uint4 height, Int4 offset, Int2 flags));
187 extern Nlm_Prim3D Nlm_AddPoly3D PROTO((Nlm_Picture3D pic,
188 Nlm_Segment3D segment, BigScalar userData,
189 Uint1 layer, Uint1 color,
190 Int4 x1, Int4 y1, Int4 z1,
191 Int4 x2, Int4 y2, Int4 z2 ));
192 extern Boolean Nlm_AddVertPoly3D PROTO((Nlm_Picture3D pic,
193 Nlm_Prim3D poly,
194 Int4 x, Int4 y, Int4 z ));
195 extern void Nlm_GetPrimInfo3D PROTO((Nlm_Picture3D pic,
196 Nlm_Prim3D prim, BigScalar PNTR userData,
197 Uint1Ptr layer, Uint1Ptr color,
198 Nlm_Segment3D PNTR parent,
199 Uint2Ptr primType));
200 extern void Nlm_ChangePrim3D PROTO((Nlm_Picture3D pic,
201 Nlm_Prim3D prim, BigScalar userData,
202 Uint1 layer, Uint1 color));
203 extern void Nlm_DeletePrim3D PROTO((Nlm_Picture3D pic,
204 Nlm_Prim3D prim));
205
206 /*****************************************************************************
207 *
208 * NAME REDIFINITION
209 *
210 *****************************************************************************/
211 #define Segment3D Nlm_Segment3D
212 #define Prim3D Nlm_Prim3D
213 #define Picture3D Nlm_Picture3D
214 #define Point3D Nlm_Point3D
215 #define Point3DPtr Nlm_Point3DPtr
216 #define Box3D Nlm_Box3D
217 #define Box3DPtr Nlm_Box3DPtr
218 #define Spher3D Nlm_Spher3D
219 #define Spher3DPtr Nlm_Spher3DPtr
220 #define CreatePicture3D Nlm_CreatePicture3D
221 #define ResetPicture3D Nlm_ResetPicture3D
222 #define DeletePicture3D Nlm_DeletePicture3D
223 #define AllocPalette3D Nlm_AllocPalette3D
224 #define SetColor3D Nlm_SetColor3D
225 #define GetColor3D Nlm_GetColor3D
226 #define SetLayer3D Nlm_SetLayer3D
227 #define GetLayerStatus3D Nlm_GetLayerStatus3D
228 #define AddSegment3D Nlm_AddSegment3D
229 #define GetSegmentInfo3D Nlm_GetSegmentInfo3D
230 #define ChangeSegment3D Nlm_ChangeSegment3D
231 #define DeleteSegment3D Nlm_DeleteSegment3D
232 #define AddLine3D Nlm_AddLine3D
233 #define AddSphere3D Nlm_AddSphere3D
234 #define AddCylinder3D Nlm_AddCylinder3D
235 #define AddText3D Nlm_AddText3D
236 #define AddPoly3D Nlm_AddPoly3D
237 #define AddVertPoly3D Nlm_AddVertPoly3D
238 #define GetPrimInfo3D Nlm_GetPrimInfo3D
239 #define ChangePrim3D Nlm_ChangePrim3D
240 #define DeletePrim3D Nlm_DeletePrim3D
241
242 #ifdef __cplusplus
243 }
244 #endif
245
246 #endif
247 |
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more information. |