Handles the TKE_Shell opcode. More...

#include <BOpcodeShell.h>

Public Member Functions

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)
 
virtual TK_Status Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const
 
virtual TK_Status Execute (BStreamFileToolkit &tk)
 
unsigned char General_Flags () const
 
char const * GetLoggingString () const
 
char * GetLoggingString ()
 
virtual TK_Status Interpret (BStreamFileToolkit &tk, ID_Key key, int variant=0)
 
virtual TK_Status Interpret (BStreamFileToolkit &tk, ID_Key key, char const *special)
 
bool IsCollectionPart () const
 
void LogDebug (BStreamFileToolkit &tk, char const *string=0)
 
virtual bool Match_Instance (BStreamFileToolkit const &tk, Recorded_Instance *instance)
 
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

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
 

Protected Attributes

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
 

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
 

Detailed Description

Handles the TKE_Shell opcode.

TK_Shell provides support for writing/reading the TKE_Shell opcode object to/from an HSF file.

The HOOPS/3dGS scene-graph can contain 'shell' primitives which consist of a points array and a connectivity list to define the facets of the shell.

Member Function Documentation

◆ EnumerateEdges()

TK_Status TK_Shell::EnumerateEdges ( )
protected

overloads from TK_Polyhedron. Creates the mp_edge_enumeration array that lists all of the pairs of vertices that connect together as edges.

◆ GetFaces()

int const* TK_Shell::GetFaces ( ) const
inlineprotected
Returns
a pointer to the face list, an array of integers

◆ GetFacesLength()

int TK_Shell::GetFacesLength ( ) const
inlineprotected
Returns
the length of the face list (as in HOOPS, '0' means original base resolution)

◆ GetLodLevel()

int TK_Shell::GetLodLevel ( ) const
inlineprotected
Returns
the LOD level

◆ Read()

TK_Status TK_Shell::Read ( BStreamFileToolkit tk)
virtual

Reads data from the toolkit buffer, decodes/decompresses it, and maps it to the opcode handlers data members. User-defined classes which need to write out custom data should utilize one of the available GetData() methods.

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

Implements BBaseOpcodeHandler.

◆ Reset()

void TK_Shell::Reset ( )
virtual

Resets the current opcode handler. This is called by the toolkit when it is done processing an opcode. This method reinitializes any opcode handler variables and frees up temporary data.

Reimplemented from BBaseOpcodeHandler.

◆ SetFaces()

TK_Status TK_Shell::SetFaces ( int  length,
int const *  face_list = 0 
)
protected

Allocate an array of the provided length for the face list, and set values if given. The face_list is an array of integers. The first integer is the number of vertices that should be connected to form the first face. For example, "3" for a triangle. The next three integers (in this example) are the offsets into the points array at which the three x-y-z's can be found. The first point in the points array is considered to be at offset zero, so "0, 1, 2" in the face_list array would form the triangle from the first three entries in points.

Continuing with the example, a second triangle might be specified as "3, 0, 1, 3", meaning "form a face using three vertices. The vertices are at offsets zero, one, and three in the points array". So this second face happens to share an edge—the (0, 1) edge—with the first face. A third face might be "4, 1, 2, 11, 12", forming a quadrilateral. Faces continue being formed until an flist_length number of integers in face_list have been processed.

One special case: if a vertex count in the list is negative, that means "continue with the previous face and subtract a polygon formed from the following vertices". This allows you to build faces with true holes in them. Multiple holes get an "even-odd" rule applied. A region is part of the face if there are an odd number of edges between it and infinity in the plane of the face. Otherwise a region is considered exterior and is not drawn. The edges of the hole receive the usual edge attributes. For face-numbering purposes (for example, Edit_Shell_Faces) the hole is not counted separately—it's a part of the face it's in.

If the TKSH_TRISTRIPS bit is set in suboptions (e.g. via the functoin TK_Polyhedron::SetSubop), the shell is assumed to contain triangles only and may not contain holes, and the "faces" are actually the way that vertices are connected into triangle strips. Start with the length of the strip, followed by the vertex indices to be connected. The first 3 vertices form a triangle, and every additional vertex is combined with the two previous ones to define one additional triangle. Exactly as with OpenGL's GL_TRIANGLE_STRIP primitive, the orientation of every even triangle is reversed, beginning with the second.

◆ Write()

TK_Status TK_Shell::Write ( BStreamFileToolkit tk)
virtual

Encodes/compresses data and writes data to the toolkit buffer. User-defined classes which need to write out custom data should utilize one of the available PutData() methods, and first write out the opcode associated with the group of binary data followed by the data itself.

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

Implements BBaseOpcodeHandler.

Member Data Documentation

◆ m_compression_scheme

unsigned char TK_Shell::m_compression_scheme
protected

The compression scheme currently in use

◆ m_flist

int* TK_Shell::m_flist
protected

Facelist array; could be in tristrips format if (mp_subop & TKSH_TRISTRIPS)

◆ m_flistlen

int TK_Shell::m_flistlen
protected

Length of the face list

◆ m_lodlevel

char TK_Shell::m_lodlevel
protected

The current lod level. LOD level identifiers are numbers between 0 and 7, inclusive

◆ m_substage

int TK_Shell::m_substage
protected

Tracks progress in subroutines


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