Alphabetical Class Index   Class Hierarchy   Compound Members   File Members   File List  

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