Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

BStream.h File Reference


Detailed Description

Contains definitions of global variables, functions and enumerated types.

The HOOPS/Stream Toolkit utilizes several global enumerated types. The functions which black box support for writing and reading HOOPS Stream Files are also global, and are defined in BStream.h

Definition in file BStream.h.

#include "dwf/Toolkit.h"
#include <math.h>
#include <string.h>
#include <stdio.h>
#include "BOpcodeHandler.h"
#include "BStreamFileToolkit.h"

Go to the source code of this file.

Defines

#define BBINFILETK_API
#define TK_File_Format_Version   1000
#define TK_DEFAULT_BUFFER_SIZE   32768
 default amount of the internal memory buffer used for file processing
#define ID_Key   long
#define alter

Enumerations

enum  TK_Status {
  TK_Normal, TK_Error, TK_Pause, TK_Single,
  TK_Pending, TK_Revisit, TK_Complete, TK_Version,
  TK_NotFound, TK_Abort
}
 Codes which can be either passed to various toolkit functions, or indicate the result of a toolkit function call. More...
enum  TK_File_Write_Options {
  TK_Suppress_LOD = 0x00000002, TK_Full_Resolution_Vertices = 0x00000004, TK_Full_Resolution_Normals = 0x00000008, TK_Full_Resolution = (TK_Full_Resolution_Vertices|TK_Full_Resolution_Normals),
  TK_First_LOD_Is_Bounding_Box = 0x00000010, TK_Force_Tags = 0x00000020, TK_Disable_Priority_Heuristic = 0x00000040, TK_Disable_Global_Compression = 0x00000100,
  TK_Disable_Instancing = 0x00000200, TK_Generate_Dictionary = 0x00000400, TK_Connectivity_Compression = 0x00000800, TK_Disable_Tristrips = 0x00001000,
  TK_Disable_Compound_Primitives = 0x00002000, TK_Global_Quantization = 0x00004000
}
 Options which control how the HOOPS Stream File is generated. More...
enum  TK_Dictionary_Options
enum  TK_File_Read_Options { TK_Flag_Unhandled_Opcodes = 0x00000001, TK_Ignore_Version = 0x00000002, TK_Skip_External_References = 0x00000004 }
enum  TK_Debug_Logging_Options { TK_Logging_Sequence = 0x00000001, TK_Logging_Tagging = 0x00000002 }

Functions

TK_Status BBINFILETK_API TK_Read_Stream_File (char const *filename, BStreamFileToolkit *tk)
 Reads a HOOPS Stream File.
TK_Status BBINFILETK_API TK_Read_Stream_File (char const *filename, int flags=0)
 Reads a HOOPS Stream File.
TK_Status BBINFILETK_API TK_Read_Stream_File (char const *filename, int flags, BStreamFileToolkit *tk)
 Deprecated; reads a HOOPS Stream File

Variables

BBINFILETK_API int TK_File_Format_History []
 Table of format changes, commented values are informational (were never included in a release,.


Define Documentation

#define alter
 

complementary to const, indicates we thought about it instead of a forgotten "const"

Definition at line 191 of file BStream.h.

#define BBINFILETK_API
 

BBINFILETK_API resolves to whatever special keywords are required to make a function or class part of the externally supported API

Definition at line 98 of file BStream.h.

#define ID_Key   long
 

ID_Key is just a generic long integer by which it is assumed that the graphics system can uniquely identify its contents. Declared as 64-bit on win64 systems because a long is not big enough to store a pointer there (unlike all other 64-bit systems we have supported in the past

Definition at line 186 of file BStream.h.

#define TK_File_Format_Version   1000
 

the HSF specification version that this toolkit supports (along with any previous versions)

Definition at line 104 of file BStream.h.


Enumeration Type Documentation

enum TK_Debug_Logging_Options
 

Options which control what data is collected when creating a debug log

Enumeration values:
TK_Logging_Sequence  Record sequence numbers
TK_Logging_Tagging  Record tag indices

Definition at line 260 of file BStream.h.

enum TK_Dictionary_Options
 

This enumerated type gives the user control of specific options to include if a dictionary is generated

Definition at line 241 of file BStream.h.

enum TK_File_Read_Options
 

Options which control how the HOOPS Stream File is read

Enumeration values:
TK_Flag_Unhandled_Opcodes  Instructs toolkit to return an error for opcodes which are not handled by a custom toolkit during reading; the default is to silently skip over unhandled opcodes
TK_Ignore_Version  Version checking will be bypassed
TK_Skip_External_References  TKE_External_Reference filespecs will not be read (the strings will still be stored in toolkit by the default handler)

Definition at line 249 of file BStream.h.

enum TK_File_Write_Options
 

Options which control how the HOOPS Stream File is generated.

An HSF file has a variety of properties, and the toolkit utilizes default logic when generating a file. This enumerated type gives the user high-level control over file compression, tagging and content. These options are set by calling BStreamFileToolkit::SetWriteFlags

Enumeration values:
TK_Suppress_LOD  No LODS are exported, only the original shells are written out (single pass); implicitly disables dictionary
TK_Full_Resolution_Vertices  Data fidelity is required for geometry; this causes the full single-precision floating point information to be exported; does not affect LODs or lossless compression of connectivity information
TK_Full_Resolution_Normals  Data fidelity is required for normals; as in above description of TK_Full_Resolution_Points
TK_Full_Resolution  for convenience, a combination of 2 other options.
TK_First_LOD_Is_Bounding_Box  Adds a new LOD to represent the lowest resolution of objects, which is a bounding box representation
TK_Force_Tags  All appropriate objects (geometries,segments,includes) will be tagged
TK_Disable_Priority_Heuristic  Disables organization of multiresolution objects according to heuristic cost/benifit.
TK_Disable_Global_Compression  Inline lossless compression will not be used
TK_Disable_Instancing  Object instancing will not be used
TK_Generate_Dictionary  Enables random-access by creation of the file dictionary
TK_Connectivity_Compression  Enables connectivity compression
TK_Disable_Tristrips  Disables triangle strips, and the triangulation it requires, in shells. Incurs a heavy read-time computational cost.
TK_Disable_Compound_Primitives  Disables the use of OpcodeHandlers that encode multiple primitives (since they cannot be properly tagged)
TK_Global_Quantization  Causes any required quantization to be global (bbox of scene) instead of local (bbox of individual geometry) . Regardless of this flag, however, local quantization applies until the first TKE_Bounding_Info. HStreamFiletoolkit sends a TKE_Bounding_Info automatically, but BStreamFiletoolkit does not.

Definition at line 221 of file BStream.h.

enum TK_Status
 

Codes which can be either passed to various toolkit functions, or indicate the result of a toolkit function call.

Various toolkit functions can take arguments which control processing behavior. Most functions also provide a return value of type TK_Status to indicate success, failure or other information about processing status.

Enumeration values:
TK_Normal  When used as input: read through to a 'termination' code. When used as output: function call succeeded
TK_Error  A return value; function call failed
TK_Pause  An input value; instructs toolkit to stop reading at a 'pause' code
TK_Single  An input value; instructs toolkit to stop reading after the first object is completed
TK_Pending  A return value; the toolkit is waiting for (needs) more data
TK_Revisit  A return value; interpret function succeeded, but we will run it through again later
TK_Complete  A return value; processing is complete
TK_Version  A return value; version mis-match detected, processing halted
TK_NotFound  A return value; failed to find a match
TK_Abort  A return value; non-fatal error. callback requested stop, or fall back to plan B (internal)

Definition at line 200 of file BStream.h.


Function Documentation

TK_Status BBINFILETK_API TK_Read_Stream_File char const *  filename,
int  flags,
BStreamFileToolkit tk
 

Deprecated; reads a HOOPS Stream File

The contents of the HOOPS Stream File are read in. Opcodes are handled via either the default handlers registered with the toolkit, or using the custom handlers which have been registered by the developer. Typically, the HSF data is mapped to application data structures within the custom opcode handler's Execute method. This form of the function is provided for backward compatibility.

TK_Status BBINFILETK_API TK_Read_Stream_File char const *  filename,
int  flags = 0
 

Reads a HOOPS Stream File.

The contents of the HOOPS Stream File are read in. Opcodes are handled via either the default handlers registered with the toolkit, or using the custom handlers which have been registered by the developer. Typically, the HSF data is mapped to application data structures within the custom opcode handler's Execute method.

Parameters:
filename A character pointer denoting the name of the file to read in.
flags Bitwise encoding of options which control how the file is read. TK_File_Read_Options provides a list of supported options.

TK_Status BBINFILETK_API TK_Read_Stream_File char const *  filename,
BStreamFileToolkit tk
 

Reads a HOOPS Stream File.

The contents of the HOOPS Stream File are read in. Opcodes are handled via either the default handlers registered with the toolkit, or using the custom handlers which have been registered by the developer. Typically, the HSF data is mapped to application data structures within the custom opcode handler's Execute method.

Parameters:
filename A character pointer denoting the name of the file to read in.
tk A pointer to the BStreamFileToolkit to use as a basis for reading the file. This would be passed in to read in a customized file that contains user-specified data. Options to control how the file is read may be specified using the SetReadFlags() method on the toolkit.


Generated on Tue May 17 12:06:00 2005 for Autodesk DWF 3D Toolkit by  doxygen 1.4.1