Alphabetical Class Index   Class Hierarchy   Compound Members   File Members   File List  

BStream.h
Go to the documentation of this file.
1 // Copyright (c) 1998-2014 by Tech Soft 3D, Inc.
2 //
3 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc.,
4 // and considered a trade secret as defined under civil and criminal statutes.
5 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of
6 // unauthorized use or misappropriation of its trade secrets. Use of this information
7 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under
8 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use.
9 
11 
16 #ifndef BBINFILETKHEADER
17 #define BBINFILETKHEADER
18 
19 #ifndef _MSC_VER
20 #define __wchar_t wchar_t
21 #endif
22 
23 #ifdef __ia64
24  #ifndef __HP_aCC
25  #error C++ compiler required
26  #endif
27 #else
28  #ifndef __cplusplus
29  #error C++ compiler required
30  #endif
31 #endif
32 
37 #if defined(_MSC_VER) && !defined(BSTREAM_STATIC_LIB)
38  #ifdef BBINFILETK_EXPORTS
39  #define BBINFILETK_API2 __declspec (dllexport)
40  #else
41  #define BBINFILETK_API2 __declspec (dllimport)
42  #endif
43 #else
44  #define BBINFILETK_API2
45 #endif
46 
47 
51 #ifdef TEST_RIG_1
52  #define BBINFILETK_API
53 #else
54  #define BBINFILETK_API BBINFILETK_API2
55 #endif
56 
57 
61 #define TK_File_Format_Version 2000 // 20.00
62 
64 // but are mentioned in the spec as test points for format changes)
65 #ifdef CREATE_FILE_FORMAT_HISTORY_TABLE
66  BBINFILETK_API int TK_File_Format_History[] = {
67  // Format Release Notes
68  //------------------------------------------------------------------------------------------
69  // 2000 // depth peeling algorithm
70  1980, // 1980 initial 20 release
71  // 1975 // double precision
72  // 1950 // text font layout
73  1910, // mask transform "offset"
74  1905, // object space clip region
75  1900, // 1900
76  // 1840 // text region fitting
77  // 1835 // png and texture source dimensions
78  // 1830 // texture camera
79  // 1825 // conditional actions
80  // 1820 // separate edge join cutoff
81  // 1815 // named styles
82  // 1810 // material shaders
83  // 1805 // compressed images directly supported in graphics system (jpeg, targa, dxt, luminance8)
84  1800, // 1800
85  // 1790 // hlr transparency cutoff
86  // 1785 // contour and isoline options, diffuse texture tint, diffuse color tint
87  // 1780 // new indexed user data
88  // 1775 // new text alignment format, explicit patterns
89  // 1770 // text character color & horizontal offset, vertex displacement, hlr render text, max extent level
90  // 1765 // force defer, vertex decimation, model type
91  // 1760 // transparency depth writing
92  // 1755 // rgba vertex colors
93  // 1750 // hard extent culling
94  1715, // 17.1 vertex displacement backport
95  1710, // ignore subsegment locks
96  1700, // 1700
97  // 1660 // camera relative lights
98  // 1655 // reflection visibility
99  // 1650 // ambient up vector, separate ambient colors, gooch options, marker index interpolation
100  1615, // anti-alias
101  1610, // 1610
102  // 1605 // infinite ray, zsort options, geometry options
103  1600, // 1600
104  // 1555 // fix to some color types
105  // 1550 // colors can now have Geo_Extended2, shadow map/simple reflection rendering options
106  // 1520 // geometry reference
107  // 1515 // shadow map options, selection level, display list levels, simple reflection, infinite line opcode
108  // 1510 // maximum extent mode
109  // 1505 // screen range, depth images
110  1500, // 1500
111  // 1415 // obscuration use octree
112  // 1410 // simple shadow opacity, anisotropic texture filter
113  // 1405 // join cutoff angle, ordered drawing heuristics
114  1401, // 1410 internal polyline selection limit
115  1400, // 1400
116  // 1345 // string format color maps
117  // 1340 // rgba image compression
118  // 1335 // general displacement
119  // 1330 // priority
120  // 1325 // text greeking mode, extended text renderer & text preference
121  // 1320 // Heuristic_Detail_Selection, nonculled edge visibility
122  // 1315 // distance threshold LOD option, new fallback type "bounding none"
123  // 1310 // depth peeling
124  // 1305 // cutting section, adjacent edge visibility, force grayscale
125  1300, // 1300
126  // 1220 // font bold/italic/renderer, cut geometry color locks
127  // 1215 // circular center
128  // 1210 // geometry-level attributes, text character attributes, unicode32, image tint
129  // 1205 // obscuration pixel threshold, subpixel culling, hard edge angle
130  1200, // 1200
131  // 1175 // explicit parameter width, uncompressed parameters
132  // 1170 // camera relative lights, simple shadow mode
133  // 1165 // extended texture definitions
134  // 1160 // glyph definitions & line styles
135  // 1155 // spheres, texture downsamping, compressed dictionary, image reference
136  // 1150 // conditions, new hlr options (color, weight)
137  1105, // additional polyhedron attributes
138  1100, // 1100
139  // 1002 // simple shadow options, text region
140  // 1001 // camera near_limit, mask transform, image size/scale, new texture options
141  1000, // 1000
142  // 908 // threshold type in LOD options
143  // 907 // polar normals
144  // 906 // edgebreaker changes
145  // 905 // hlr silhouette cleanup, unicode_options
146  900, // 900
147  // 806 // bounding box inheritance, cut geometry options, fast hidden line,
148  // hidden line render faces, depth range, gradient window patterns,
149  // additional NURBS surface controls
150  // 805 // polycylinder attributes, ExRef, URL
151  800, // 800
152  710, // 760 new transparency controls, dictionary format 2
153  // 705, // PolyCylinder, Extended Heuristics, XML, LoD collections, Shell Regions
154  // 702, // PolyPolypoint
155  700, // 700
156  // 652, // null shell
157  651, // 661
158  // 650, // NURBS Surface, Cylinder, Extended Rendering_Options, Defined Fonts, Selectability
159  // extensive polyhedron data & compression changes
160  // 610, // View
161  // 600, // Stream version generally synched to Hoops version
162  // 601, // support longer text string
163  105, // 600 Generate_Dictionary changed to Suppress_Dictionary
164  100, // 500 Initial release
165  0 // [list termination]
166  };
167 #else
168  extern BBINFILETK_API int TK_File_Format_History[];
169 #endif
170 
171 
172 #define TK_DEFAULT_BUFFER_SIZE 32768
173 
174 
175 
176 #ifdef HSTREAM_READONLY
177  #ifndef BSTREAM_READONLY
178  #define BSTREAM_READONLY
179  #endif
180 #endif
181 #ifdef BSTREAM_READONLY
182  extern char const stream_readonly[];
183 #endif
184 #ifdef BSTREAM_DISABLE_QUANTIZATION
185  extern char const stream_disable_quantization[];
186 #endif
187 #ifdef BSTREAM_DISABLE_EDGEBREAKER
188  extern char const stream_disable_edgebreaker[];
189 #endif
190 #ifdef BSTREAM_DISABLE_REPULSE_COMPRESSION
191  extern char const stream_disable_repulse_compression[];
192 #endif
193 #ifdef BSTREAM_DISABLE_ASCII
194  extern char const stream_disable_ascii[];
195 #endif
196 
197 
198 #include <math.h>
199 #include <string.h>
200 #include <stdio.h>
201 
202 #ifdef NEED_BOOL_TYPE
203  #undef NEED_BOOL_TYPE
204  typedef int bool;
205 
206  const bool true = !0;
207  const bool false = 0;
208 #endif
209 
210 
215 #if defined(WIN64) || defined(_WIN64)
216 # define ID_Key __int64
217 #else
218 # define ID_Key long
219 #endif
220 
221 
222 
223 #ifndef alter
224 # define alter
225 #endif
226 
227 
228 #ifndef HPS_CORE_BUILD
229 template <typename T> void Swap (T & a, T & b) { T tmp = a; a = b; b = tmp; }
230 #endif
231 
232 
237 
242 enum TK_Status {
243  TK_Normal = 0,
244  TK_Error = 1,
245  TK_Pause = 2,
246  TK_Single = 3,
252  TK_Abort = 9,
254 };
258 
266  TK_Suppress_LOD = 0x00000002,
270  TK_Force_Tags = 0x00000020,
273  TK_Disable_Instancing = 0x00000200,
274  TK_Generate_Dictionary = 0x00000400,
276  TK_Disable_Tristrips = 0x00001000,
278  TK_Global_Quantization = 0x00004000,
282  TK_Communicator_Mode = 0x00040000,
284 };
285 
286 
292 };
293 
294 
300  TK_Ignore_Version = 0x00000002,
303 };
304 
309  TK_Logging_Sequence = 0x00000001,
310  TK_Logging_Tagging = 0x00000002,
312 };
313 
314 
319  // for Geometryoes and some attributes
321 
322  // for includes and styles
325 };
326 
327 
328 #include "BOpcodeHandler.h"
329 #include "BStreamFileToolkit.h"
330 
336 
347 #ifndef SWIG
348 TK_Status BBINFILETK_API TK_Read_Stream_File (char const * filename, BStreamFileToolkit * tk);
349 #endif
350 
352 
361 #ifndef SWIG
362 TK_Status BBINFILETK_API TK_Read_Stream_File (char const * filename, int flags = 0);
363 #endif
364 
365 
366 
367 
369 TK_Status BBINFILETK_API TK_Read_Stream_File (__wchar_t const * filename, BStreamFileToolkit * tk);
370 #ifdef _MSC_VER
371 TK_Status BBINFILETK_API TK_Read_Stream_File (unsigned short const * filename, BStreamFileToolkit * tk);
372 #endif
373 
375 TK_Status BBINFILETK_API TK_Read_Stream_File (__wchar_t const * filename, int flags = 0);
376 #ifdef _MSC_VER
377 TK_Status BBINFILETK_API TK_Read_Stream_File (unsigned short const * filename, int flags = 0);
378 #endif
379 
380 
382 
389 #ifndef SWIG
390 TK_Status BBINFILETK_API TK_Read_Stream_File (char const * filename, int flags, BStreamFileToolkit * tk);
391 #endif
392 
394 #endif
395 
Definition: BStream.h:250
Definition: BStream.h:273
TK_File_Read_Options
Definition: BStream.h:298
Definition: BStream.h:277
Contains data types which are used by BBaseOpcodeHandler.
Definition: BStream.h:276
TK_Debug_Logging_Options
Definition: BStream.h:308
Definition: BStream.h:309
Definition: BStream.h:247
The BStreamFileToolkit class provides support for importing/exporting HOOPS Stream File information...
Definition: BStreamFileToolkit.h:367
Definition: BStream.h:299
TK_Dictionary_Options
Definition: BStream.h:290
Definition: BStream.h:278
Definition: BStream.h:270
Definition: BStream.h:244
TK_Status BBINFILETK_API TK_Read_Stream_File(char const *filename, BStreamFileToolkit *tk)
Reads a HOOPS Stream File.
Definition: BStream.h:268
Definition: BStream.h:283
BBINFILETK_API int TK_File_Format_History[]
Table of format changes, commented values are informational (were never included in a release...
Definition: BStream.h:301
Definition: BStream.h:248
Definition: BStream.h:267
Definition: BStream.h:243
Definition: BStream.h:266
Definition: BStream.h:245
entity has an associated condition
Definition: BStream.h:323
TK_File_Write_Options
Options which control how the HOOPS Stream File is generated.
Definition: BStream.h:265
Definition: BStream.h:310
TK_General_Flags
Definition: BStream.h:318
Definition: BStream.h:279
Definition: BStream.h:272
entity has an associated filter
Definition: BStream.h:324
TK_Status
Codes which can be either passed to various toolkit functions, or indicate the result of a toolkit fu...
Definition: BStream.h:242
Definition: BStream.h:280
dictionary entries include bounding volume info
Definition: BStream.h:291
Definition: BStream.h:311
Definition: BStream.h:275
Definition: BStream.h:252
Definition: BStream.h:271
Definition: BStream.h:253
Definition: BStream.h:251
Definition: BStream.h:246
Definition: BStream.h:302
Definition: BStream.h:300
Definition: BStream.h:282
Definition: BStream.h:281
Definition: BStream.h:274
Definition: BStream.h:249
Definition: BStream.h:269
entity is double precision
Definition: BStream.h:320