Provides HOOPS/3dGS-specific handling of the TKE_Shell opcode. More...

#include <HOpcodeShell.h>

Public Member Functions

TK_Status Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const
 
TK_Status Execute (BStreamFileToolkit &tk)
 
TK_Status Interpret (BStreamFileToolkit &tk, ID_Key key, int variant=-1)
 
TK_Status Interpret (BStreamFileToolkit &tk, ID_Key key, char const *special)
 
bool Match_Instance (BStreamFileToolkit const &tk, Recorded_Instance *instance)
 
- Public Member Functions inherited from TK_Shell
TK_Status Read (BStreamFileToolkit &tk)
 
TK_Status ReadAscii (BStreamFileToolkit &tk)
 Deprecated.
 
void Reset ()
 
void set_flist (int count, int const *list=0)
 obsolete. Provided for compatibility
 
TK_Status Write (BStreamFileToolkit &tk)
 
TK_Status WriteAscii (BStreamFileToolkit &tk)
 Deprecated.
 
- Public Member Functions inherited from TK_Polyhedron
TK_Status AppendObject (BStreamFileToolkit &tk, BBaseOpcodeHandler *obj)
 
const float * GetBounding () const
 
double const * GetDPoints () const
 
double * GetDPoints ()
 
unsigned int const * GetExists () const
 
unsigned int * GetExists ()
 
float const * GetFaceColors () const
 
float * GetFaceColors ()
 
unsigned int const * GetFaceExists () const
 
unsigned int * GetFaceExists ()
 
float const * GetFaceIndices () const
 
float * GetFaceIndices ()
 
int const * GetFaceRegions () const
 
int * GetFaceRegions ()
 
ID_Key GetKey () const
 
int GetPointCount () const
 
float const * GetPoints () const
 
float * GetPoints ()
 
int GetPriority ()
 
unsigned char GetSubop () const
 
unsigned short GetSubop2 () const
 
float const * GetVertexColors () const
 
float * GetVertexColors ()
 
float const * GetVertexEdgeColors () const
 
float * GetVertexEdgeColors ()
 
float const * GetVertexEdgeIndices () const
 
float * GetVertexEdgeIndices ()
 
float const * GetVertexFaceColors () const
 
float * GetVertexFaceColors ()
 
float const * GetVertexFaceIndices () const
 
float * GetVertexFaceIndices ()
 
float const * GetVertexIndices () const
 
float * GetVertexIndices ()
 
float const * GetVertexMarkerColors () const
 
float * GetVertexMarkerColors ()
 
float const * GetVertexMarkerIndices () const
 
float * GetVertexMarkerIndices ()
 
float const * GetVertexMarkerRGBAs () const
 
float * GetVertexMarkerRGBAs ()
 
float const * GetVertexNormals () const
 
float * GetVertexNormals ()
 
float const * GetVertexParameters () const
 
float * GetVertexParameters ()
 
bool HasEdgeAttributes () const
 
bool HasEdgeColors () const
 
bool HasEdgeIndices () const
 
bool HasEdgeNormals () const
 
bool HasEdgePatterns () const
 
bool HasEdgeVisibilities () const
 
bool HasEdgeWeights () const
 
bool HasFaceAttributes () const
 
bool HasFaceAttributesCommunicator () const
 
bool HasFaceColors () const
 
bool HasFaceIndices () const
 
bool HasFaceNormals () const
 
bool HasFacePatterns () const
 
bool HasFaceRegions () const
 
bool HasFaceVisibilities () const
 
bool HasOptionals ()
 
bool HasOptionalsCommunicator ()
 
bool HasVertexAttributes () const
 
bool HasVertexColors () const
 
bool HasVertexEdgeColors () const
 
bool HasVertexEdgeIndices () const
 
bool HasVertexFaceColors () const
 
bool HasVertexFaceIndices () const
 
bool HasVertexIndices () const
 
bool HasVertexMarkerColors () const
 
bool HasVertexMarkerIndices () const
 
bool HasVertexMarkerRGBAs () const
 
bool HasVertexMarkerSizes () const
 
bool HasVertexMarkerSymbols () const
 
bool HasVertexMarkerVisibilities () const
 
bool HasVertexNormals () const
 
bool HasVertexParameters () const
 
TK_Status InitSubop (BStreamFileToolkit &tk, int lodlevel, bool is_firstpass)
 
BBaseOpcodeHandlerPopObject ()
 
TK_Status SetBounding (float const bbox[])
 
TK_Status SetDPoints (int count, double const points[]=0)
 
TK_Status SetEdgeColors (float const colors[]=0)
 
TK_Status SetEdgeExists (unsigned int const vals[]=0)
 
TK_Status SetEdgeIndices (float const indices[]=0)
 
TK_Status SetEdgeNormals (float const normals[]=0)
 
TK_Status SetEdgePatterns (char const *patterns=0)
 
TK_Status SetEdgePatternStrings ()
 
TK_Status SetEdgeVisibilities (char const *visibilities=0)
 
TK_Status SetEdgeWeights (float const weights[]=0)
 
TK_Status SetExists (unsigned int const vals[]=0)
 
TK_Status SetFaceColors (float const colors[]=0)
 
TK_Status SetFaceExists (unsigned int const vals[]=0)
 
TK_Status SetFaceIndices (float const indices[]=0)
 
TK_Status SetFaceNormals (float const normals[]=0)
 
TK_Status SetFacePatterns (char const *patterns=0)
 
TK_Status SetFaceRegions (int const regions[]=0)
 
TK_Status SetFaceVisibilities (char const *visibilities=0)
 
TK_Status SetKey (BStreamFileToolkit &tk, ID_Key key)
 informs the TK_Polyhedron of the id by which this piece of geometry is known
 
TK_Status SetPoints (int count, float const points[]=0)
 
void SetPriority (int priority)
 
TK_Status SetSubop (unsigned char subop)
 
TK_Status SetSubop2 (unsigned short subop2)
 
TK_Status SetVertexColors (float const colors[]=0)
 
TK_Status SetVertexEdgeColors (float const colors[]=0)
 
TK_Status SetVertexEdgeIndices (float const indices[]=0)
 
TK_Status SetVertexFaceColors (float const colors[]=0)
 
TK_Status SetVertexFaceIndices (float const indices[]=0)
 
TK_Status SetVertexIndices (float const indices[]=0)
 
TK_Status SetVertexMarkerColors (float const colors[]=0)
 
TK_Status SetVertexMarkerIndices (float const indices[]=0)
 
TK_Status SetVertexMarkerRGBAs (float const colors[]=0)
 
TK_Status SetVertexMarkerSizes (float const sizes[]=0)
 
TK_Status SetVertexMarkerSymbols (char const *symbols=0)
 
TK_Status SetVertexMarkerSymbolStrings ()
 
TK_Status SetVertexMarkerVisibilities (char const *visibilities=0)
 
TK_Status SetVertexNormals (float const normals[]=0)
 
TK_Status SetVertexParameters (float const parameters[]=0, int width=0)
 
- Public Member Functions inherited from BBaseOpcodeHandler
 BBaseOpcodeHandler (int op)
 
unsigned char General_Flags () const
 
char const * GetLoggingString () const
 
char * GetLoggingString ()
 
bool IsCollectionPart () const
 
void LogDebug (BStreamFileToolkit &tk, char const *string=0)
 
virtual bool NeedsContext (BStreamFileToolkit &tk) const
 
bool NeedsTag () const
 
unsigned char Opcode () const
 
int Pass (BStreamFileToolkit &tk) const
 
void Set_General_Flags (int f)
 
void SetCollectionPart (bool n)
 
void SetLoggingString (char const *segment)
 
void SetLoggingString (int length)
 
void SetNeedsTag (bool n)
 
TK_Status Tag (BStreamFileToolkit &tk, int variant=-1) const
 
bool Tagging (BStreamFileToolkit &tk) const
 
- Public Member Functions inherited from BControlledMemoryObject
void operator delete (void *p)
 force deallocation to happen in the stream toolkit's scope
 
void * operator new (size_t size)
 force allocation to happen in the stream toolkit's scope
 

Protected Member Functions

TK_Status LabelFakeEdges ()
 
TK_Status ProcessRevisits (BStreamFileToolkit &tk, int lod_in, bool *do_continue)
 
TK_Status Revisit (BStreamFileToolkit &tk, float priority=0.0f, int lod=-1) const
 
TK_Status Revisit (BStreamFileToolkit &tk, int lod) const
 variant that doesn't have a priority value (which is used for sorting order)
 
virtual TK_Status Usefulness (BStreamFileToolkit &tk, HC_KEY key, int lod, float &score) const
 Determines the order in which data appears with TK_Priority_Heuristic write flag (the default)
 
- Protected Member Functions inherited from TK_Shell
virtual TK_Status compute_advanced (BStreamFileToolkit &tk)
 
TK_Status compute_advanced_ascii (BStreamFileToolkit &tk)
 
TK_Status EnumerateEdges ()
 
int const * GetFaces () const
 
int GetFacesLength () const
 
int GetLodLevel () const
 
virtual TK_Status read_advanced (BStreamFileToolkit &tk)
 
virtual TK_Status read_advanced_ascii (BStreamFileToolkit &tk)
 
virtual TK_Status read_bounding (BStreamFileToolkit &tk)
 
virtual TK_Status read_bounding_ascii (BStreamFileToolkit &tk)
 
virtual TK_Status read_uncompressed_faces (BStreamFileToolkit &tk)
 
virtual TK_Status read_uncompressed_faces_ascii (BStreamFileToolkit &tk)
 
virtual TK_Status read_uncompressed_points (BStreamFileToolkit &tk)
 
virtual TK_Status read_uncompressed_points_ascii (BStreamFileToolkit &tk)
 
TK_Status SetFaces (int length, int const *face_list=0)
 
TK_Status SetLodLevel (int level)
 Sets the lod level for this representation (as in HOOPS, '0' means original base resolution)
 
virtual TK_Status write_advanced (BStreamFileToolkit &tk)
 
virtual TK_Status write_advanced_ascii (BStreamFileToolkit &tk)
 
virtual TK_Status write_bounding (BStreamFileToolkit &tk)
 
virtual TK_Status write_bounding_ascii (BStreamFileToolkit &tk)
 
TK_Status write_null (BStreamFileToolkit &tk)
 
TK_Status write_null_ascii (BStreamFileToolkit &tk)
 
virtual TK_Status write_uncompressed_faces (BStreamFileToolkit &tk)
 
virtual TK_Status write_uncompressed_faces_ascii (BStreamFileToolkit &tk)
 
virtual TK_Status write_uncompressed_points (BStreamFileToolkit &tk)
 
virtual TK_Status write_uncompressed_points_ascii (BStreamFileToolkit &tk)
 
- Protected Member Functions inherited from BBaseOpcodeHandler
void add_segment (BStreamFileToolkit &tk, ID_Key key)
 for internal use only
 
void adjust_written (BStreamFileToolkit &tk, int count)
 for internal use only
 
void bytes_to_floats (unsigned char const *in, float *out, int count) const
 for internal use only
 
void decrease_nesting (BStreamFileToolkit &tk, int amount=1)
 for internal use only
 
bool Find_Instance (BStreamFileToolkit &tk, int val1, int val2, int val3)
 
bool Find_Item (BStreamFileToolkit &tk, ID_Key key) const
 
void floats_to_bytes (float const *in, unsigned char *out, int count) const
 for internal use only
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, int *rInts, unsigned int n)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, unsigned char &value)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, char &value)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, unsigned short &value)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, short &value)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, int &value)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, float &value)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, float *rFloats, unsigned int n)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, char *m_string, unsigned int n)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, unsigned char *m_string, unsigned int n)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, int *rInts, unsigned int n)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, short *rShorts, unsigned int n)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, unsigned short *rShorts, unsigned int n)
 
TK_Status GetAsciiHex (BStreamFileToolkit &tk, const char *tag, unsigned char &value)
 
TK_Status GetAsciiHex (BStreamFileToolkit &tk, const char *tag, int &value)
 
TK_Status GetAsciiHex (BStreamFileToolkit &tk, const char *tag, char &value)
 
TK_Status GetAsciiHex (BStreamFileToolkit &tk, const char *tag, unsigned short &value)
 
TK_Status GetAsciiImageData (BStreamFileToolkit &tk, const char *tag, unsigned char *rValues, unsigned int n)
 
TK_Status GetGeneral (BStreamFileToolkit &tk)
 
void increase_nesting (BStreamFileToolkit &tk, int amount=1)
 for internal use only
 
ID_Key last_key (BStreamFileToolkit &tk) const
 obsolete
 
void log_opcode (BStreamFileToolkit &tk, unsigned int sequence, unsigned char opcode)
 for internal use only
 
BBaseOpcodeHandlerOpcode_Handler (BStreamFileToolkit &tk, unsigned char op) const
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, char const *b, int n)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, short const *s, int n)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, int const *i, int n)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, float const *f, int n)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, unsigned char const *b, int n)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, unsigned short const *s, int n)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, unsigned int const *i, int n)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, char const &c)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, short const &s)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, int const &i)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, unsigned char const &b)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, unsigned short const &s)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, unsigned int const &i)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, float const &f)
 
TK_Status PutAsciiFlag (BStreamFileToolkit &tk, char const *tag, int const &i)
 
TK_Status PutAsciiHex (BStreamFileToolkit &tk, char const *tag, int const &i)
 
TK_Status PutAsciiMask (BStreamFileToolkit &tk, char const *tag, int const &i)
 
TK_Status PutAsciiOpcode (BStreamFileToolkit &tk, int adjust=1, bool is_end=false, bool want_newline=true)
 
TK_Status PutEndXMLTag (BStreamFileToolkit &tk, char const *tag)
 
TK_Status PutGeneral (BStreamFileToolkit &tk)
 
TK_Status PutOpcode (BStreamFileToolkit &tk, int adjust=1)
 
TK_Status PutStartXMLTag (BStreamFileToolkit &tk, char const *tag)
 
TK_Status Read_Referenced_Segment (BStreamFileToolkit &tk, int &i_progress)
 
TK_Status ReadAsciiLine (BStreamFileToolkit &tk, unsigned int *readSize=0)
 
TK_Status ReadAsciiWord (BStreamFileToolkit &tk, unsigned int *readSize=0)
 
TK_Status ReadEndOpcode (BStreamFileToolkit &tk)
 
void Record_Instance (BStreamFileToolkit &tk, ID_Key key, int variant, int val1, int val2, int val3) const
 
void Remember_Item (BStreamFileToolkit &tk, ID_Key key) const
 
ID_Key remove_segment (BStreamFileToolkit &tk)
 for internal use only
 
bool RemoveAngularBrackets (char *string)
 
bool RemoveQuotes (char *string)
 
void Revisit (BStreamFileToolkit &tk, float priority=0.0f, int variant=0) const
 
void set_last_key (BStreamFileToolkit &tk, ID_Key key)
 sets the given key as "most recent" on the toolkit for the purposes of associating keys with indices
 
TK_Status SkipNewlineAndTabs (BStreamFileToolkit &tk, unsigned int *readSize=0)
 
bool validate_count (int count, int limit=1<< 24) const
 

Additional Inherited Members

- Public Types inherited from TK_Polyhedron
enum  Edge_Exists {
  Edge_None = 0x0000, Edge_Color = 0x0001, Edge_Index = 0x0002, Edge_Any_Color = 0x0003,
  Edge_Normal = 0x0004, Edge_Visibility = 0x0008, Edge_Pattern = 0x0010, Edge_Weight = 0x0020,
  Fake_Edge = 0x8000
}
 
enum  Exists {
  Vertex_None = 0x0000, Vertex_Normal = 0x0001, Vertex_Parameter = 0x0002, Vertex_Face_Color = 0x0004,
  Vertex_Edge_Color = 0x0008, Vertex_Marker_Color = 0x0010, Vertex_Face_Index = 0x0020, Vertex_Edge_Index = 0x0040,
  Vertex_Marker_Index = 0x0080, Vertex_Marker_Visibility = 0x0100, Vertex_Marker_Size = 0x0200, Vertex_Marker_Symbol = 0x0400,
  Vertex_Marker_RGBA = 0x0800, Vertex_Any_Color = 0x08FC
}
 
enum  Face_Exists {
  Face_None = 0x0000, Face_Color = 0x0001, Face_Index = 0x0002, Face_Any_Color = 0x0003,
  Face_Normal = 0x0004, Face_Visibility = 0x0008, Face_Pattern = 0x0010
}
 
enum  Opt_Opcode {
  OPT_TERMINATE = 0, OPT_ALL_NORMALS_COMPRESSED = 1, OPT_NORMALS_COMPRESSED = 2, OPT_ALL_PARAMETERS_COMPRESSED = 3,
  OPT_PARAMETERS_COMPRESSED = 4, OPT_ALL_VFCOLORS = 5, OPT_VERTEX_FCOLORS = 6, OPT_ALL_VECOLORS = 7,
  OPT_VERTEX_ECOLORS = 8, OPT_ALL_VMCOLORS = 9, OPT_VERTEX_MCOLORS = 10, OPT_ALL_VFINDICES = 11,
  OPT_VERTEX_FINDICES = 12, OPT_ALL_VEINDICES = 13, OPT_VERTEX_EINDICES = 14, OPT_ALL_VMINDICES = 15,
  OPT_VERTEX_MINDICES = 16, OPT_ALL_NORMALS = 17, OPT_NORMALS = 18, OPT_ALL_NORMALS_POLAR = 19,
  OPT_NORMALS_POLAR = 20, OPT_ALL_VMVISIBILITIES = 21, OPT_VERTEX_MARKER_VISIBILITIES = 22, OPT_ALL_VMSYMBOLS = 23,
  OPT_VERTEX_MARKER_SYMBOLS = 24, OPT_ALL_VMSIZES = 25, OPT_VERTEX_MARKER_SIZES = 26, OPT_PARAMETERS = 27,
  OPT_ALL_PARAMETERS = 28, OPT_ALL_VMRGBAS = 29, OPT_VERTEX_MRGBAS = 30, OPT_ALL_FACE_COLORS = 33,
  OPT_FACE_COLORS = 34, OPT_ALL_FACE_INDICES = 35, OPT_FACE_INDICES = 36, OPT_ALL_FACE_NORMALS_POLAR = 37,
  OPT_FACE_NORMALS_POLAR = 38, OPT_ALL_FACE_VISIBILITIES = 39, OPT_FACE_VISIBILITIES = 40, OPT_ALL_FACE_PATTERNS = 41,
  OPT_FACE_PATTERNS = 42, OPT_FACE_REGIONS = 51, OPT_ALL_EDGE_COLORS = 71, OPT_EDGE_COLORS = 72,
  OPT_ALL_EDGE_INDICES = 73, OPT_EDGE_INDICES = 74, OPT_ALL_EDGE_NORMALS_POLAR = 75, OPT_EDGE_NORMALS_POLAR = 76,
  OPT_ALL_EDGE_VISIBILITIES = 77, OPT_EDGE_VISIBILITIES = 78, OPT_ALL_EDGE_PATTERNS = 79, OPT_EDGE_PATTERNS = 80,
  OPT_ALL_EDGE_WEIGHTS = 81, OPT_EDGE_WEIGHTS = 82, OPT_RESERVED_SPATIAL = 90, OPT_ENTITY_ATTRIBUTES = 99,
  OPT_ALL_VFCOLORS_UNCOMPRESSED = 101, OPT_VERTEX_FCOLORS_UNCOMPRESSED = 102, OPT_ALL_VECOLORS_UNCOMPRESSED = 103, OPT_VERTEX_ECOLORS_UNCOMPRESSED = 104,
  OPT_ALL_VMCOLORS_UNCOMPRESSED = 105, OPT_VERTEX_MCOLORS_UNCOMPRESSED = 106, OPT_ALL_VMRGBAS_UNCOMPRESSED = 107, OPT_VERTEX_MRGBAS_UNCOMPRESSED = 108,
  OPT_ALL_VFINDICES_UNCOMPRESSED = 109, OPT_VERTEX_FINDICES_UNCOMPRESSED = 110, OPT_ALL_VEINDICES_UNCOMPRESSED = 111, OPT_VERTEX_EINDICES_UNCOMPRESSED = 112,
  OPT_ALL_VMINDICES_UNCOMPRESSED = 113, OPT_VERTEX_MINDICES_UNCOMPRESSED = 114, OPT_ALL_FACE_COLORS_UNCOMPRESSED = 115, OPT_FACE_COLORS_UNCOMPRESSED = 116,
  OPT_ALL_FACE_INDICES_UNCOMPRESSED = 117, OPT_FACE_INDICES_UNCOMPRESSED = 118
}
 
enum  Suboptions {
  TKSH_STANDARD = 0x00, TKSH_COMPRESSED_POINTS = 0x01, TKSH_COMPRESSED_FACES = 0x02, TKSH_TRISTRIPS = 0x04,
  TKSH_HAS_OPTIONALS = 0x08, TKSH_FIRSTPASS = 0x10, TKSH_BOUNDING_ONLY = 0x20, TKSH_CONNECTIVITY_COMPRESSION = 0x40,
  TKSH_EXPANDED = 0x80
}
 
enum  Suboptions2 { TKSH2_COLLECTION = 0x0001, TKSH2_NULL = 0x0002, TKSH2_HAS_NEGATIVE_FACES = 0x0004, TKSH2_GLOBAL_QUANTIZATION = 0x0008 }
 
- Static Protected Member Functions inherited from BBaseOpcodeHandler
static void fix (int *i, int n)
 for internal use only
 
static void fix (short *s, int n)
 for internal use only
 
static void fix_in (float *f, int n)
 for internal use only
 
static void fix_in (double *d, int n)
 for internal use only
 
static void fix_out (float *f, int n)
 for internal use only
 
static void fix_out (double *d, int n)
 for internal use only
 
static short flip (short s)
 for internal use only
 
static int flip (int i)
 for internal use only
 
static TK_Status GetData (BStreamFileToolkit &tk, char *b, int n)
 
static TK_Status GetData (BStreamFileToolkit &tk, short *s, int n)
 
static TK_Status GetData (BStreamFileToolkit &tk, int *i, int n)
 
static TK_Status GetData (BStreamFileToolkit &tk, float *f, int n)
 
static TK_Status GetData (BStreamFileToolkit &tk, double *d, int n)
 
static TK_Status GetData (BStreamFileToolkit &tk, unsigned char *b, int n)
 
static TK_Status GetData (BStreamFileToolkit &tk, unsigned short *s, int n)
 
static TK_Status GetData (BStreamFileToolkit &tk, unsigned int *i, int n)
 
static TK_Status GetData (BStreamFileToolkit &tk, char &c)
 
static TK_Status GetData (BStreamFileToolkit &tk, short &s)
 
static TK_Status GetData (BStreamFileToolkit &tk, int &i)
 
static TK_Status GetData (BStreamFileToolkit &tk, unsigned char &b)
 
static TK_Status GetData (BStreamFileToolkit &tk, unsigned short &s)
 
static TK_Status GetData (BStreamFileToolkit &tk, unsigned int &i)
 
static TK_Status GetData (BStreamFileToolkit &tk, float &f)
 
static TK_Status GetData (BStreamFileToolkit &tk, double &d)
 
static TK_Status LookatData (BStreamFileToolkit &tk, unsigned char &b)
 
static TK_Status PutData (BStreamFileToolkit &tk, char const *b, int n)
 
static TK_Status PutData (BStreamFileToolkit &tk, short const *s, int n)
 
static TK_Status PutData (BStreamFileToolkit &tk, int const *i, int n)
 
static TK_Status PutData (BStreamFileToolkit &tk, float const *f, int n)
 
static TK_Status PutData (BStreamFileToolkit &tk, double const *d, int n)
 
static TK_Status PutData (BStreamFileToolkit &tk, unsigned char const *b, int n)
 
static TK_Status PutData (BStreamFileToolkit &tk, unsigned short const *s, int n)
 
static TK_Status PutData (BStreamFileToolkit &tk, unsigned int const *i, int n)
 
static TK_Status PutData (BStreamFileToolkit &tk, char const &c)
 
static TK_Status PutData (BStreamFileToolkit &tk, short const &s)
 
static TK_Status PutData (BStreamFileToolkit &tk, int const &i)
 
static TK_Status PutData (BStreamFileToolkit &tk, unsigned char const &b)
 
static TK_Status PutData (BStreamFileToolkit &tk, unsigned short const &s)
 
static TK_Status PutData (BStreamFileToolkit &tk, unsigned int const &i)
 
static TK_Status PutData (BStreamFileToolkit &tk, float const &f)
 
static TK_Status PutData (BStreamFileToolkit &tk, double const &d)
 
static float read_float (char const *cp, char const **newcpp=0)
 
static float read_float (char const *cp, char **newcpp)
 for internal use only
 
static char * write_float (char *buffer, double f)
 for internal use only
 
- Protected Attributes inherited from TK_Shell
unsigned char m_compression_scheme
 
int * m_flist
 
int m_flistlen
 
char m_lodlevel
 
int m_substage
 
- Protected Attributes inherited from BBaseOpcodeHandler
char * m_ascii_buffer
 
int m_ascii_length
 
int m_ascii_progress
 Tracks the amount of data that has been read/written so far by GetAscii functions.
 
int m_ascii_size
 
int m_ascii_stage
 
unsigned char m_byte
 temporary
 
char m_char
 temporary
 
bool m_collection_part
 Indicates if this object is part of a LOD collection.
 
int m_debug_allocated
 
char * m_debug_string
 
unsigned char m_general_flags
 Basic flags common to many handlers.
 
int m_int
 temporary
 
bool m_needs_tag
 Indicate if this object explicitly needs tagging.
 
unsigned char m_opcode
 The opcode being handled by this particular object.
 
int m_progress
 Tracks the amount of data that has been read/written so far.
 
int m_stage
 The writing stage.
 
unsigned short m_unsigned_short
 temporary
 

Detailed Description

Provides HOOPS/3dGS-specific handling of the TKE_Shell opcode.

This class complements the read/write functionality implemented in the base class by overloading the Interpret and Execute methods to provide HOOPS/3dGS-specific opcode handling.
Writing: The HOOPS/3dGS database is queried in the Interpret method, and this data is then written to the HSF file by the Write method Reading: The data is read from the HSF file by the Read method, and is mapped to the HOOPS/3dGS scene-graph within the Execute method.

Export/import of additional user-data (which is associated with this HSF object) would typically be done by overloading the Write and Read methods.

Member Function Documentation

◆ Clone()

TK_Status HTK_Shell::Clone ( BStreamFileToolkit tk,
BBaseOpcodeHandler **  handler 
) const
virtual

Copies the opcode handler

Parameters
tkA reference to the BStreamFileToolkit object.
handlerA pointer to the opcode handler object. Passed by reference.
Returns
The result of the function call.

Reimplemented from BBaseOpcodeHandler.

◆ Execute()

TK_Status HTK_Shell::Execute ( BStreamFileToolkit tk)
virtual

Processes the binary data that has been read for the current object, which involves passing the data to application-specific data structures.

Parameters
tkA reference to the BStreamFileToolkit object.
Returns
The result of the function call.

Reimplemented from BBaseOpcodeHandler.

◆ Interpret() [1/2]

TK_Status HTK_Shell::Interpret ( BStreamFileToolkit tk,
ID_Key  key,
int  variant = -1 
)
virtual

Extracts graphics data (typically from the application's scene-graph) and maps it to the opcode handler's data members in preparation for writing out an object to the file.

Parameters
tkA reference to the BStreamFileToolkit object.
keyAn identifier to the object (for example, the HOOPS key of a geometry item)
variantoptional specification of an alternate form, such as a Level-of-Detail representation
Returns
The result of the function call.

Reimplemented from BBaseOpcodeHandler.

◆ Interpret() [2/2]

TK_Status HTK_Shell::Interpret ( BStreamFileToolkit tk,
ID_Key  key,
char const *  special 
)
inlinevirtual

Extracts graphics data (typically from the application's scene-graph) and maps it to the opcode handler's data members in preparation for writing out an object to the file.

Parameters
tkA reference to the BStreamFileToolkit object.
keyAn identifier to the object (for example, the HOOPS key of a geometry item)
specialA string value of particular data
Returns
The result of the function call.

Reimplemented from BBaseOpcodeHandler.

References BBaseOpcodeHandler::Interpret().

◆ LabelFakeEdges()

TK_Status HTK_Shell::LabelFakeEdges ( )
protected

There are some edges that will appear on the read side (due to triangulation) that don't actually exist on the write side. We need to enumerate the edges again not by tristrips so that we can discover and flag the appropriate fake edges, and they can then be skipped by HPolyhedron::HInterpret

◆ Match_Instance()

bool HTK_Shell::Match_Instance ( BStreamFileToolkit const &  tk,
Recorded_Instance *  instance 
)
virtual

Determines whether a stored instance of an object is compatible with the current object, and if it is, prepares the object to write the instance instead.

Reimplemented from BBaseOpcodeHandler.

◆ ProcessRevisits()

TK_Status HTK_Shell::ProcessRevisits ( BStreamFileToolkit tk,
int  lod_in,
bool *  do_continue 
)
protected

figure out what revisits are required during this pass.

Parameters
tkthe toolkit
lod_inthe lod level requested by the caller
do_continuereturn value to indicate whether the interpret process is complete
Returns
TK_Error on failure, TK_Revisit to completely suppress all writing, otherwise TK_Normal

The documentation for this class was generated from the following file: