TK_Polyhedron Class Reference

Base class for shell and mesh. More...

#include <BPolyhedron.h>

Public Types

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 }
 

Public Member Functions

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
 
virtual TK_Status Read (BStreamFileToolkit &tk)=0
 
virtual void Reset ()
 
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
 
virtual TK_Status Write (BStreamFileToolkit &tk)=0
 
- 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
 

Additional Inherited Members

- 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
 
- 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 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

Base class for shell and mesh.

Shells and Meshes both have attributes that can bind to faces, edges and vertices and may optionally be present. This base class helps allows the two to share the code to parse and execute those features that are common between the two. Refer to ::HC_Insert_Shell and Section 2.8 of the HOOPS/3dGS Programming Guide for more details.

Member Enumeration Documentation

◆ Edge_Exists

Flags for declaring existence of local edge attributes in mp_edge_exists

Enumerator
Edge_None 

no local face attributes

Edge_Color 

self-explanatory

Edge_Index 

face color-by-index

Edge_Any_Color 

multi-bit alias to quickly test for color or color-by-index

Edge_Normal 

self-explanatory

Edge_Visibility 

self-explanatory

Edge_Pattern 

self-explanatory

Edge_Weight 

edge thickness, given as a proportion of the default

◆ Exists

Flags for declaring existence of local vertex attributes in mp_exists

Enumerator
Vertex_None 

no local vertex attributes

Vertex_Normal 

explicit normals

Vertex_Parameter 

parameters (for texturing, etc...)

Vertex_Face_Color 

vertex color, to be applied to interpolated faces

Vertex_Edge_Color 

vertex color, to be applied to interpolated edges

Vertex_Marker_Color 

vertex color, to be applied to marker

Vertex_Face_Index 

vertex color-by-index, to be applied to interpolated faces

Vertex_Edge_Index 

vertex color-by-index, to be applied to interpolated edges

Vertex_Marker_Index 

vertex color-by-index, to be applied to marker

Vertex_Marker_RGBA 

vertex color in rgba format, to be applied to marker

Vertex_Any_Color 

multi-bit alias to quickly test for any color or color-by-index

◆ Face_Exists

Flags for declaring existence of local face attributes in mp_face_exists

Enumerator
Face_None 

no local face attributes

Face_Color 

self-explanatory

Face_Index 

face color-by-index

Face_Any_Color 

multi-bit alias to quickly test for color or color-by-index

Face_Normal 

self-explanatory

Face_Visibility 

self-explanatory

Face_Pattern 

self-explanatory

◆ Opt_Opcode

The supported optional fields for local attributes. Note: Odd values indicate that an attribute is present on all vertices (or all faces or all edges)

Enumerator
OPT_TERMINATE 

terminate the list of optional attributes

OPT_ALL_NORMALS_COMPRESSED 

set compressed normals on all vertices

OPT_NORMALS_COMPRESSED 

set compressed normals on some vertices

OPT_ALL_PARAMETERS_COMPRESSED 

set compressed parameters (texture coordinates) on all vertices

OPT_PARAMETERS_COMPRESSED 

set compressed parameters on some vertices

OPT_ALL_VFCOLORS 

set colors on all vertices, to apply to drawing of interpolated faces

OPT_VERTEX_FCOLORS 

set colors on some vertices, to apply to drawing of interpolated faces

OPT_ALL_VECOLORS 

set colors on all vertices, to apply to drawing of interpolated edges

OPT_VERTEX_ECOLORS 

set colors on some vertices, to apply to drawing of interpolated edges

OPT_ALL_VMCOLORS 

set colors on all vertices, to apply to drawing of vertex_markers

OPT_VERTEX_MCOLORS 

set colors on some vertices, to apply to drawing of vertex_markers

OPT_ALL_VFINDICES 

set colors-by-index on all vertices, to apply to drawing of interpolated faces

OPT_VERTEX_FINDICES 

set colors-by-index on some vertices, to apply to drawing of interpolated faces

OPT_ALL_VEINDICES 

set colors-by-index on all vertices, to apply to drawing of interpolated edges

OPT_VERTEX_EINDICES 

set colors-by-index on some vertices, to apply to drawing of interpolated edges

OPT_ALL_VMINDICES 

set colors-by-index on all vertices, to apply to drawing of vertex_markers

OPT_VERTEX_MINDICES 

set colors-by-index on some vertices, to apply to drawing of vertex_markers

OPT_ALL_NORMALS 

set normals on all vertices

OPT_NORMALS 

set normals on some vertices

OPT_ALL_NORMALS_POLAR 

set normals (specified as polar coordinates) on all vertices

OPT_NORMALS_POLAR 

set normals (specified as polar coordinates) on some vertices

OPT_ALL_VMVISIBILITIES 

put explicit local visibility setting on all vertex markers

OPT_VERTEX_MARKER_VISIBILITIES 

put explicit local visibility setting on some vertex markers

OPT_ALL_VMSYMBOLS 

put explicit local marker symbol setting on all vertices

OPT_VERTEX_MARKER_SYMBOLS 

put explicit local marker symbol setting on some vertices

OPT_ALL_VMSIZES 

put explicit local size setting on all vertex markers

OPT_VERTEX_MARKER_SIZES 

put explicit local size setting on some vertex markers

OPT_PARAMETERS 

set parameters (texture coordinates) on some vertices

OPT_ALL_PARAMETERS 

set parameters (texture coordinates) on all vertices

OPT_ALL_VMRGBAS 

set rgba colors on all vertices, to apply to drawing of vertex_markers

OPT_VERTEX_MRGBAS 

set rgba colors on some vertices, to apply to drawing of vertex_markers

OPT_ALL_FACE_COLORS 

set colors on all faces

OPT_FACE_COLORS 

set colors on some faces

OPT_ALL_FACE_INDICES 

set colors-by-index on all faces

OPT_FACE_INDICES 

set colors-by-index on some faces

OPT_ALL_FACE_NORMALS_POLAR 

set normals (specified as polar coordinates) on all faces

OPT_FACE_NORMALS_POLAR 

set normals (specified as polar coordinates) on some faces

OPT_ALL_FACE_VISIBILITIES 

put explicit local visibility setting on all faces

OPT_FACE_VISIBILITIES 

put explicit local visibility setting on some faces

OPT_ALL_FACE_PATTERNS 

put explicit local pattern setting on all faces

OPT_FACE_PATTERNS 

put explicit local pattern setting on some faces

OPT_FACE_REGIONS 

apply region identifiers to some faces (for the purposes of grouping faces so that their attributes can be set at once)

OPT_ALL_EDGE_COLORS 

set colors on all edges

OPT_EDGE_COLORS 

set colors on some edges

OPT_ALL_EDGE_INDICES 

set colors-by-index on all edges

OPT_EDGE_INDICES 

set colors-by-index on some edges

OPT_ALL_EDGE_NORMALS_POLAR 

set normals (specified as polar coordinates) on all edges

OPT_EDGE_NORMALS_POLAR 

set normals (specified as polar coordinates) on some edges

OPT_ALL_EDGE_VISIBILITIES 

put explicit local visibility setting on all edges

OPT_EDGE_VISIBILITIES 

put explicit local visibility setting on some edges

OPT_ALL_EDGE_PATTERNS 

put explicit local pattern setting on all edges

OPT_EDGE_PATTERNS 

put explicit local pattern setting on some edges

OPT_ALL_EDGE_WEIGHTS 

put explicit local thickness setting on all edges

OPT_EDGE_WEIGHTS 

put explicit local thickness setting on some edges

OPT_ALL_VFCOLORS_UNCOMPRESSED 

set uncompressed colors on all vertices, to apply to drawing of interpolated faces

OPT_VERTEX_FCOLORS_UNCOMPRESSED 

set uncompressed colors on some vertices, to apply to drawing of interpolated faces

OPT_ALL_VECOLORS_UNCOMPRESSED 

set uncompressed colors on all vertices, to apply to drawing of interpolated edges

OPT_VERTEX_ECOLORS_UNCOMPRESSED 

set uncompressed colors on some vertices, to apply to drawing of interpolated edges

OPT_ALL_VMCOLORS_UNCOMPRESSED 

set uncompressed colors on all vertices, to apply to drawing of vertex_markers

OPT_VERTEX_MCOLORS_UNCOMPRESSED 

set uncompressed colors on some vertices, to apply to drawing of vertex_markers

OPT_ALL_VMRGBAS_UNCOMPRESSED 

set uncompressed rgba colors on all vertices, to apply to drawing of vertex_markers

OPT_VERTEX_MRGBAS_UNCOMPRESSED 

set uncompressed rgba colors on some vertices, to apply to drawing of vertex_markers

OPT_ALL_VFINDICES_UNCOMPRESSED 

set uncompressed colors-by-index on all vertices, to apply to drawing of interpolated faces

OPT_VERTEX_FINDICES_UNCOMPRESSED 

set uncompressed colors-by-index on some vertices, to apply to drawing of interpolated faces

OPT_ALL_VEINDICES_UNCOMPRESSED 

set uncompressed colors-by-index on all vertices, to apply to drawing of interpolated edges

OPT_VERTEX_EINDICES_UNCOMPRESSED 

set uncompressed colors-by-index on some vertices, to apply to drawing of interpolated edges

OPT_ALL_VMINDICES_UNCOMPRESSED 

set uncompressed colors-by-index on all vertices, to apply to drawing of vertex_markers

OPT_VERTEX_MINDICES_UNCOMPRESSED 

set uncompressed colors-by-index on some vertices, to apply to drawing of vertex_markers

OPT_ALL_FACE_COLORS_UNCOMPRESSED 

set uncompressed colors on all faces

OPT_FACE_COLORS_UNCOMPRESSED 

set uncompressed colors on some faces

OPT_ALL_FACE_INDICES_UNCOMPRESSED 

set uncompressed colors-by-index on all faces

OPT_FACE_INDICES_UNCOMPRESSED 

set uncompressed colors-by-index on some faces

◆ Suboptions

contains the meanings of the bits put into mp_subop mp_subop is a bit field containing information about the shell or mesh.

Enumerator
TKSH_STANDARD 

no special suboptions

TKSH_COMPRESSED_POINTS 

points are compressed

TKSH_COMPRESSED_FACES 

faces are compressed

TKSH_TRISTRIPS 

face list represents tristrips

TKSH_HAS_OPTIONALS 

optionals exist; refer to Opt_Opcode

TKSH_FIRSTPASS 

this is not a refinement of a previously-seen entity

TKSH_BOUNDING_ONLY 

a bounding box representation only.

TKSH_CONNECTIVITY_COMPRESSION 

the polyedra is compressed using the 'connectivity compression' algorithm

TKSH_EXPANDED 

expanded suboptions exist; refer to Suboptions2

◆ Suboptions2

contains the meanings of the bits put into mp_subop2 mp_subop2 is a bit field containing information about the shell or mesh. It is assumed to be zero unless mp_subop contains the TKSH_EXPANDED bit.

Enumerator
TKSH2_COLLECTION 

instead of a shell, this opcode contains a TKE_Terminate-terminated list of opcodes to be inserted into a shell's LOD. Incompatible with TKSH_FIRSTPASS.

TKSH2_NULL 

an empty shell used only as a placeholder for later revisiting

TKSH2_HAS_NEGATIVE_FACES 

negative faces exist

TKSH2_GLOBAL_QUANTIZATION 

polyhedra points are globally quantized

Member Function Documentation

◆ AppendObject()

TK_Status TK_Polyhedron::AppendObject ( BStreamFileToolkit tk,
BBaseOpcodeHandler obj 
)

Adds an object to the set of items to be sent as part of the collection. Caller retains ownership of the object, and is responsible for deleting it during the write phase. This function automatically sets the TKSH2_COLLECTION bit, converting this shell to a collection

Parameters
tkthe toolkit
objthe object to be appended

◆ GetBounding()

const float* TK_Polyhedron::GetBounding ( ) const
inline
Returns
a pointer to the bounding box (x_min, y_min, z_min, x_max, y_max, z_max)

◆ GetDPoints() [1/2]

double const* TK_Polyhedron::GetDPoints ( ) const
inline
Returns
a pointer to the array of vertex locations

◆ GetDPoints() [2/2]

double* TK_Polyhedron::GetDPoints ( )
inline
Returns
a pointer to the array of vertex locations

◆ GetExists() [1/2]

unsigned int const* TK_Polyhedron::GetExists ( ) const
inline
Returns
a pointer to the existence array, a bitmask indicating presence/absence of attributes

◆ GetExists() [2/2]

unsigned int* TK_Polyhedron::GetExists ( )
inline
Returns
a pointer to the existence array, a bitmask indicating presence/absence of attributes

◆ GetFaceColors() [1/2]

float const* TK_Polyhedron::GetFaceColors ( ) const
inline
Returns
a pointer to the array of face colors

◆ GetFaceColors() [2/2]

float* TK_Polyhedron::GetFaceColors ( )
inline
Returns
a pointer to the array of face colors

◆ GetFaceExists() [1/2]

unsigned int const* TK_Polyhedron::GetFaceExists ( ) const
inline
Returns
a pointer to the existence array for faces, mp_face_exists, indicating face attributes

◆ GetFaceExists() [2/2]

unsigned int* TK_Polyhedron::GetFaceExists ( )
inline
Returns
a pointer to the existence array for faces, mp_face_exists, indicating face attributes

◆ GetFaceIndices() [1/2]

float const* TK_Polyhedron::GetFaceIndices ( ) const
inline
Returns
a pointer to the array of face colors-by-index

◆ GetFaceIndices() [2/2]

float* TK_Polyhedron::GetFaceIndices ( )
inline
Returns
a pointer to the array of face colors-by-index

◆ GetFaceRegions() [1/2]

int const* TK_Polyhedron::GetFaceRegions ( ) const
inline
Returns
a pointer to the array of face regiions

◆ GetFaceRegions() [2/2]

int* TK_Polyhedron::GetFaceRegions ( )
inline
Returns
a pointer to the array of face regions, which may be modified in-place

◆ GetKey()

ID_Key TK_Polyhedron::GetKey ( ) const
inline
Returns
the id by which the graphics knows this piece of geometry (could be pointer or integer)

◆ GetPointCount()

int TK_Polyhedron::GetPointCount ( ) const
inline
Returns
the number of points in the polyhedron

◆ GetPoints() [1/2]

float const* TK_Polyhedron::GetPoints ( ) const
inline
Returns
a pointer to the array of vertex locations

◆ GetPoints() [2/2]

float* TK_Polyhedron::GetPoints ( )
inline
Returns
a pointer to the array of vertex locations

◆ GetPriority()

int TK_Polyhedron::GetPriority ( )
inline

Gets the priority to this object

◆ GetSubop()

unsigned char TK_Polyhedron::GetSubop ( ) const
inline
Returns
the suboption that will be transmitted to indicate formatting options

◆ GetSubop2()

unsigned short TK_Polyhedron::GetSubop2 ( ) const
inline
Returns
the 2nd suboption that will be transmitted to indicate formatting options

◆ GetVertexColors() [1/2]

float const* TK_Polyhedron::GetVertexColors ( ) const
inline
Returns
the first non-null pointer it among the following: mp_vmcolors (a.k.a. VertexMarkerColors), mp_vfcolors (a.k.a. VertexFaceColors), mp_vecolors (a.k.a. VertexEdgeColors)

◆ GetVertexColors() [2/2]

float* TK_Polyhedron::GetVertexColors ( )
inline
Returns
the first non-null pointer it among the following: mp_vmcolors (a.k.a. VertexMarkerColors), mp_vfcolors (a.k.a. VertexFaceColors), mp_vecolors (a.k.a. VertexEdgeColors)

◆ GetVertexEdgeColors() [1/2]

float const* TK_Polyhedron::GetVertexEdgeColors ( ) const
inline
Returns
a pointer to the array of vertex colors (as applied to the edges)

◆ GetVertexEdgeColors() [2/2]

float* TK_Polyhedron::GetVertexEdgeColors ( )
inline
Returns
a pointer to the array of vertex colors (as applied to the edges)

◆ GetVertexEdgeIndices() [1/2]

float const* TK_Polyhedron::GetVertexEdgeIndices ( ) const
inline
Returns
a pointer to the array of vertex colors-by-index (as applied to the edges)

◆ GetVertexEdgeIndices() [2/2]

float* TK_Polyhedron::GetVertexEdgeIndices ( )
inline
Returns
a pointer to the array of vertex colors-by-index (as applied to the edges)

◆ GetVertexFaceColors() [1/2]

float const* TK_Polyhedron::GetVertexFaceColors ( ) const
inline
Returns
a pointer to the array of vertex colors (as applied to the faces)

◆ GetVertexFaceColors() [2/2]

float* TK_Polyhedron::GetVertexFaceColors ( )
inline
Returns
a pointer to the array of vertex colors (as applied to the faces)

◆ GetVertexFaceIndices() [1/2]

float const* TK_Polyhedron::GetVertexFaceIndices ( ) const
inline
Returns
a pointer to the array of vertex colors-by-index (as applied to the faces)

◆ GetVertexFaceIndices() [2/2]

float* TK_Polyhedron::GetVertexFaceIndices ( )
inline
Returns
a pointer to the array of vertex colors-by-index (as applied to the faces)

◆ GetVertexIndices() [1/2]

float const* TK_Polyhedron::GetVertexIndices ( ) const
inline
Returns
the first non-null pointer it among the following: mp_vmindices (a.k.a. VertexMarkerIndices), mp_vfindices (a.k.a. VertexFaceIndices), mp_veindices (a.k.a. VertexEdgeIndices)

◆ GetVertexIndices() [2/2]

float* TK_Polyhedron::GetVertexIndices ( )
inline
Returns
the first non-null pointer it among the following: mp_vmindices (a.k.a. VertexMarkerIndices), mp_vfindices (a.k.a. VertexFaceIndices), mp_veindices (a.k.a. VertexEdgeIndices)

◆ GetVertexMarkerColors() [1/2]

float const* TK_Polyhedron::GetVertexMarkerColors ( ) const
inline
Returns
a pointer to the array of vertex colors (as applied to the markers)

◆ GetVertexMarkerColors() [2/2]

float* TK_Polyhedron::GetVertexMarkerColors ( )
inline
Returns
a pointer to the array of vertex colors (as applied to the markers)

◆ GetVertexMarkerIndices() [1/2]

float const* TK_Polyhedron::GetVertexMarkerIndices ( ) const
inline
Returns
a pointer to the array of vertex colors-by-index (as applied to the markers)

◆ GetVertexMarkerIndices() [2/2]

float* TK_Polyhedron::GetVertexMarkerIndices ( )
inline
Returns
a pointer to the array of vertex colors-by-index (as applied to the markers)

◆ GetVertexMarkerRGBAs() [1/2]

float const* TK_Polyhedron::GetVertexMarkerRGBAs ( ) const
inline
Returns
a pointer to the array of vertex rgba colors (as applied to the markers)

◆ GetVertexMarkerRGBAs() [2/2]

float* TK_Polyhedron::GetVertexMarkerRGBAs ( )
inline
Returns
a pointer to the array of vertex rgba colors (as applied to the markers)

◆ GetVertexNormals() [1/2]

float const* TK_Polyhedron::GetVertexNormals ( ) const
inline
Returns
a pointer to the array of vertex normals

◆ GetVertexNormals() [2/2]

float* TK_Polyhedron::GetVertexNormals ( )
inline
Returns
a pointer to the array of vertex normals

◆ GetVertexParameters() [1/2]

float const* TK_Polyhedron::GetVertexParameters ( ) const
inline
Returns
a pointer to the array of vertex parameters

◆ GetVertexParameters() [2/2]

float* TK_Polyhedron::GetVertexParameters ( )
inline
Returns
a pointer to the array of vertex parameters

◆ HasEdgeAttributes()

bool TK_Polyhedron::HasEdgeAttributes ( ) const
inline
Returns
true if any edge attributes are set: colors, indices, normals, visibilities, patterns, or weights

◆ HasEdgeColors()

bool TK_Polyhedron::HasEdgeColors ( ) const
inline
Returns
true if there are edge colors set on the polyhedron

◆ HasEdgeIndices()

bool TK_Polyhedron::HasEdgeIndices ( ) const
inline
Returns
true if colors-by-index are set on the polyhedron edges.

◆ HasEdgeNormals()

bool TK_Polyhedron::HasEdgeNormals ( ) const
inline
Returns
true if explicit normals are set on the polyhedron edges

◆ HasEdgePatterns()

bool TK_Polyhedron::HasEdgePatterns ( ) const
inline
Returns
true if edge patterns are set on the polyhedron edges

◆ HasEdgeVisibilities()

bool TK_Polyhedron::HasEdgeVisibilities ( ) const
inline
Returns
true if explicit edge visibilities are set on the polyhedron edges

◆ HasEdgeWeights()

bool TK_Polyhedron::HasEdgeWeights ( ) const
inline
Returns
true if explicit weights are set on the polyhedron edges

◆ HasFaceAttributes()

bool TK_Polyhedron::HasFaceAttributes ( ) const
inline

◆ HasFaceColors()

bool TK_Polyhedron::HasFaceColors ( ) const
inline
Returns
true if there are face colors set on the current polyhedron

◆ HasFaceIndices()

bool TK_Polyhedron::HasFaceIndices ( ) const
inline
Returns
true if and only if at least one face color-by-index has been set

◆ HasFaceNormals()

bool TK_Polyhedron::HasFaceNormals ( ) const
inline
Returns
true if and only if at least one explicit face normal has been set

◆ HasFacePatterns()

bool TK_Polyhedron::HasFacePatterns ( ) const
inline
Returns
true if and only if at least one face pattern has been set

◆ HasFaceRegions()

bool TK_Polyhedron::HasFaceRegions ( ) const
inline
Returns
true if and only if at least one face region has been set

◆ HasFaceVisibilities()

bool TK_Polyhedron::HasFaceVisibilities ( ) const
inline
Returns
true if and only if at least one explicit face visibility has been set

◆ HasOptionals()

bool TK_Polyhedron::HasOptionals ( )
inline
Returns
true if and only if there are some attributes set on any of the faces or vertices

◆ HasVertexAttributes()

◆ HasVertexColors()

bool TK_Polyhedron::HasVertexColors ( ) const
inline
Returns
true if and only if at least one vertex color has been set (to apply to anything)

◆ HasVertexEdgeColors()

bool TK_Polyhedron::HasVertexEdgeColors ( ) const
inline
Returns
true if and only if at least one vertex color has been set (to apply to an interpolated edge)

◆ HasVertexEdgeIndices()

bool TK_Polyhedron::HasVertexEdgeIndices ( ) const
inline
Returns
true if and only if at least one vertex color-by-index has been set (to apply to an interpolated edge)

◆ HasVertexFaceColors()

bool TK_Polyhedron::HasVertexFaceColors ( ) const
inline
Returns
true if and only if at least one vertex color has been set (to apply to an interpolated face)

◆ HasVertexFaceIndices()

bool TK_Polyhedron::HasVertexFaceIndices ( ) const
inline
Returns
true if and only if at least one vertex color-by-index has been set (to apply to an interpolated face)

◆ HasVertexIndices()

bool TK_Polyhedron::HasVertexIndices ( ) const
inline
Returns
true if and only if at least one vertex color-by-index has been set (to apply to anything)

◆ HasVertexMarkerColors()

bool TK_Polyhedron::HasVertexMarkerColors ( ) const
inline
Returns
true if and only if at least one vertex color has been set (to apply to a marker)

◆ HasVertexMarkerIndices()

bool TK_Polyhedron::HasVertexMarkerIndices ( ) const
inline
Returns
true if and only if at least one vertex color-by-index has been set (to apply to a marker)

◆ HasVertexMarkerRGBAs()

bool TK_Polyhedron::HasVertexMarkerRGBAs ( ) const
inline
Returns
true if and only if at least one vertex rgba color has been set (to apply to a marker)

◆ HasVertexMarkerSizes()

bool TK_Polyhedron::HasVertexMarkerSizes ( ) const
inline
Returns
true if and only if at least one explicit vertex marker size has been set

◆ HasVertexMarkerSymbols()

bool TK_Polyhedron::HasVertexMarkerSymbols ( ) const
inline
Returns
true if and only if at least one explicit vertex marker symbol has been set

◆ HasVertexMarkerVisibilities()

bool TK_Polyhedron::HasVertexMarkerVisibilities ( ) const
inline
Returns
true if and only if at least one explicit vertex marker visibility has been set

◆ HasVertexNormals()

bool TK_Polyhedron::HasVertexNormals ( ) const
inline
Returns
true if and only if at least one vertex normal has been set

◆ HasVertexParameters()

bool TK_Polyhedron::HasVertexParameters ( ) const
inline
Returns
true if and only if at least one vertex parameter has been set

◆ InitSubop()

TK_Status TK_Polyhedron::InitSubop ( BStreamFileToolkit tk,
int  lodlevel,
bool  is_firstpass 
)

initializes some bits in the suboption according to the write flags in the toolkit.

Parameters
tkthe toolkit.
lodlevelwhich lod variant is to be encoded.
is_firstpassindicates whether or not this particular object has been seen before in the file.

◆ PopObject()

BBaseOpcodeHandler* TK_Polyhedron::PopObject ( )

Pops an object off the list of collection parts.

Returns
the object to caller (presumably so that it can be deleted)

◆ SetBounding()

TK_Status TK_Polyhedron::SetBounding ( float const  bbox[])
inline

Set the bounding box for the object.

Parameters
bboxthe bounding volume, in order minx,miny,minz,maxx,maxy,maxz

References TK_Normal.

◆ SetDPoints()

TK_Status TK_Polyhedron::SetDPoints ( int  count,
double const  points[] = 0 
)

Allocates the vertex locations, and fills them with the specified values. Be careful not to call this function more than once, as it can cause a memory leak.

Parameters
countthe number of points in the polyhedron
pointsa pointer to an array of xyz triplets to specify vertex locations.

◆ SetEdgeColors()

TK_Status TK_Polyhedron::SetEdgeColors ( float const  colors[] = 0)

Allocates the edge colors, and fills with values and sets the flags in mp_edge_exists. Allocates length of mp_edgecount, regardless of the number of values that are intended to be specified. Note (as with all SetEdge* methods) that if the value for mp_edgecount is unknown (left at its initial value of -1), it is calculated during the process of EnumerateEdges, called from SetEdgeExists, called automatically from this function if necessary.

Parameters
colorscan be null, in which case colors are left untouched (assumed to be specified at a later point). If non-null, it should be of length mp_edgecount.
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetEdgeExists()

TK_Status TK_Polyhedron::SetEdgeExists ( unsigned int const  vals[] = 0)

Allocates the array of integers on which bits indicate the presence of attributes on edges. Allocates length of mp_edgecount, regardless of the number of values that are intended to be specified. Note that if the value for mp_edgecount is unknown (left at its initial value of -1), it is calculated during the process of EnumerateEdges, which is called from within this function.

Parameters
valscan be null, in which case colors are left untouched. If non-null, it should be of length mp_edgecount.
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetEdgeIndices()

TK_Status TK_Polyhedron::SetEdgeIndices ( float const  indices[] = 0)

Allocates the edge colors-by-index, and fills with values and sets the flags in mp_edge_exists. Allocates length of mp_edgecount, regardless of the number of values that are intended to be specified.

Parameters
indicescan be null, in which case colors-by-index are left untouched (assumed to be specified at a later point). If non-null, it should be of length mp_edgecount.
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetEdgeNormals()

TK_Status TK_Polyhedron::SetEdgeNormals ( float const  normals[] = 0)

Allocates the edge normals, and fills with values and sets the flags in mp_edge_exists. Allocates length of mp_edgecount, regardless of the number of values that are intended to be specified.

Parameters
normalscan be null, in which case normals are left untouched (assumed to be specified at a later point). If non-null, it should be of length mp_edgecount.
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetEdgePatterns()

TK_Status TK_Polyhedron::SetEdgePatterns ( char const *  patterns = 0)

Allocates the edge patterns, and fills with values and sets the flags in mp_edge_exists. Allocates length of mp_edgecount, regardless of the number of values that are intended to be specified.

Parameters
patternscan be null, in which case patterns are left untouched (assumed to be specified at a later point). If non-null, it should be of length mp_edgecount.
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetEdgePatternStrings()

TK_Status TK_Polyhedron::SetEdgePatternStrings ( )

Allocates the edge pattern strings, and initializes to empty. Allocates length of mp_edgecount, regardless of the number of values that are intended to be specified.

Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetEdgeVisibilities()

TK_Status TK_Polyhedron::SetEdgeVisibilities ( char const *  visibilities = 0)

Allocates the edge visibility settings, and fills with values and sets the flags in mp_edge_exists. For each edge, non-zero indicates that that edge is visibile. Allocates length of mp_edgecount, regardless of the number of values that are intended to be specified.

Parameters
visibilitiescan be null, in which case visibility settings are left untouched (assumed to be specified at a later point). If non-null, it should be of length mp_edgecount.
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetEdgeWeights()

TK_Status TK_Polyhedron::SetEdgeWeights ( float const  weights[] = 0)

Allocates the edge weights, and fills with values and sets the flags in mp_edge_exists. Allocates length of mp_edgecount, regardless of the number of values that are intended to be specified.

Parameters
weightscan be null, in which case weights are left untouched (assumed to be specified at a later point). If non-null, it should be of length mp_edgecount.
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetExists()

TK_Status TK_Polyhedron::SetExists ( unsigned int const  vals[] = 0)

Allocates the array of integers on which bits indicate the presence of attributes on vertices. Allocates length of mp_pointcount, regardless of the number of values that are intended to be specified.

Parameters
valscan be null, in which case colors are left untouched. If non-null, it should be of length mp_pointcount.
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetFaceColors()

TK_Status TK_Polyhedron::SetFaceColors ( float const  colors[] = 0)

Allocates the face colors, and fills with values and sets the flags in mp_face_exists. Allocates length of mp_facecount, regardless of the number of values that are intended to be specified.

Parameters
colorscan be null, in which case colors are left untouched (assumed to be specified at a later point). If non-null, it should be of length mp_facecount
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetFaceExists()

TK_Status TK_Polyhedron::SetFaceExists ( unsigned int const  vals[] = 0)

Allocates the array of integers on which bits indicate the presence of attributes on faces. Allocates length of mp_facecount, regardless of the number of values that are intended to be specified.

Parameters
valscan be null, in which case colors are left untouched. If non-null, it should be of length mp_facecount.
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetFaceIndices()

TK_Status TK_Polyhedron::SetFaceIndices ( float const  indices[] = 0)

Allocates the face colors-by-index, and fills with values and sets the flags in mp_face_exists. Allocates length of mp_facecount, regardless of the number of values that are intended to be specified (thus the array size is mp_facecount*sizeof(float))).

Parameters
indicescan be null, in which case indices are left untouched (assumed to be specified at a later point). If non-null, These values will be copied, and the appropriate bits in mp_face_exists will be updated.
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetFaceNormals()

TK_Status TK_Polyhedron::SetFaceNormals ( float const  normals[] = 0)

Allocates the face normals, and fills with values and sets the flags in mp_face_exists. Allocates length of mp_facecount, regardless of the number of values that are intended to be specified.

Parameters
normalscan be null, in which case the normals are left untouched (assumed to be specified at a later point). If non-null, it should be of length mp_facecount
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetFacePatterns()

TK_Status TK_Polyhedron::SetFacePatterns ( char const *  patterns = 0)

Allocates the face pattern settings (i.e. per face, which pattern to choose), fills with values and sets the flags in mp_face_exists. Allocates length of mp_facecount, regardless of the number of values that are intended to be specified.

Parameters
patternscan be null, in which case colors are left untouched (assumed to be specified at a later point). If non-null, it should be of length mp_facecount
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetFaceRegions()

TK_Status TK_Polyhedron::SetFaceRegions ( int const  regions[] = 0)

Allocates an array of integers to specify a region identifier per face.

Parameters
regionsare the identifiers. If set as null, the array will default to all zero

◆ SetFaceVisibilities()

TK_Status TK_Polyhedron::SetFaceVisibilities ( char const *  visibilities = 0)

Allocates the face visibility settings, fills with values and sets the flags in mp_face_exists. Allocates length of mp_facecount, regardless of the number of values that are intended to be specified.

Parameters
visibilitiescan be null, in which case colors are left untouched (assumed to be specified at a later point). If non-null, it should be of length mp_facecount
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetPoints()

TK_Status TK_Polyhedron::SetPoints ( int  count,
float const  points[] = 0 
)

Allocates the vertex locations, and fills them with the specified values. Be careful not to call this function more than once, as it can cause a memory leak.

Parameters
countthe number of points in the polyhedron
pointsa pointer to an array of xyz triplets to specify vertex locations.

◆ SetPriority()

void TK_Polyhedron::SetPriority ( int  priority)
inline

Sets priority to this object

◆ SetSubop()

TK_Status TK_Polyhedron::SetSubop ( unsigned char  subop)
inline

sets the suboption to be used when transmitting. See also InitSubop

Parameters
subopa set of bit flags as documented in enum TK_Polyhedron::Suboptions

References TK_Normal.

◆ SetSubop2()

TK_Status TK_Polyhedron::SetSubop2 ( unsigned short  subop2)
inline

sets the 2nd suboption to be used when transmitting. See also InitSubop

Parameters
subop2a set of bit flags as documented in enum TK_Polyhedron::Suboptions2

References TK_Normal.

◆ SetVertexColors()

TK_Status TK_Polyhedron::SetVertexColors ( float const  colors[] = 0)

Allocates the vertex colors in all 3 arrays (faces, edges, markers). Also handles setting bits in mp_exists (the existence array) if input is non-null. Equivalent to SetVertexFaceColors, SetVertexFaceColors and SetVertexMarkerColors called in succession. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.

Parameters
colorscan be null, in which case colors are left untouched (assumed to be specified at a later point. Normally, however, "colors" should refer to the rgb triplets for the values of the vertex colors. These values will be copied, and the appropriate bits in mp_exists will be updated.
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetVertexEdgeColors()

TK_Status TK_Polyhedron::SetVertexEdgeColors ( float const  colors[] = 0)

Allocates the vertex colors (as applied to edges), and fills with values and sets the flags in mp_exists. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.

Parameters
colorscan be null, in which case colors are left untouched (assumed to be specified at a later point. Normally, however, "colors" should refer to the rgb triplets for the values of the vertex colors. These values will be copied, and the appropriate bits in mp_exists will be updated.
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetVertexEdgeIndices()

TK_Status TK_Polyhedron::SetVertexEdgeIndices ( float const  indices[] = 0)

Allocates the vertex colors-by-index (as applied to edges), and fills with values and sets the flags in mp_exists. Assumes the prior existence of a color table in the current segment. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.

Parameters
indicescan be null, in which case indices are left untouched (assumed to be specified at a later point. Normally, however, "indices" should refer to the color indices (individual floats. Thus, the array size is mp_pointcount*sizeof(float)). These values will be copied, and the appropriate bits in mp_exists will be updated.
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetVertexFaceColors()

TK_Status TK_Polyhedron::SetVertexFaceColors ( float const  colors[] = 0)

Allocates the vertex colors (as applied to faces), and fills with values and sets the flags in mp_exists. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.

Parameters
colorscan be null, in which case colors are left untouched (assumed to be specified at a later point. Normally, however, "colors" should refer to the rgb triplets for the values of the vertex colors. These values will be copied, and the appropriate bits in mp_exists will be updated.
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetVertexFaceIndices()

TK_Status TK_Polyhedron::SetVertexFaceIndices ( float const  indices[] = 0)

Allocates the vertex colors-by-index (as applied to faces), and fills with values and sets the flags in mp_exists. Assumes the prior existence of a color table in the current segment. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.

Parameters
indicescan be null, in which case the indices are left untouched (assumed to be specified at a later point. Normally, however, "indices" should refer to the color indices (individual floats. Thus, the array size is mp_pointcount*sizeof(float)). These values will be copied, and the appropriate bits in mp_exists will be updated.
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetVertexIndices()

TK_Status TK_Polyhedron::SetVertexIndices ( float const  indices[] = 0)

Allocates the vertex colors-by-index in all 3 arrays (faces, edges, markers). Also handles setting bits in mp_exists (the existence array) if input is non-null. Equivalent to SetVertexFaceIndices, SetVertexFaceIndices and SetVertexMarkerIndices called in succession. All arrays allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.

Parameters
indicescan be null, in which case indices are left untouched (assumed to be specified at a later point. Normally, however, "indices" should refer to the color indices (individual floats. Thus, the array size is mp_pointcount*sizeof(float)). These values will be copied, and the appropriate bits in mp_exists will be updated.
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetVertexMarkerColors()

TK_Status TK_Polyhedron::SetVertexMarkerColors ( float const  colors[] = 0)

Allocates the vertex colors (as applied to markers), and fills with values and sets the flags in mp_exists. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.

Parameters
colorscan be null, in which case colors are left untouched (assumed to be specified at a later point. Normally, however, "colors" should refer to the rgb triplets for the values of the vertex colors. These values will be copied, and the appropriate bits in mp_exists will be updated.
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetVertexMarkerIndices()

TK_Status TK_Polyhedron::SetVertexMarkerIndices ( float const  indices[] = 0)

Allocates the vertex colors-by-index (as applied to markers), and fills with values and sets the flags in mp_exists. Assumes the prior existence of a color table either in or inherited by the current segment. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.

Parameters
indicescan be null, in which case indices are left untouched (assumed to be specified at a later point. Normally, however, "indices" should refer to the color indices (individual floats. Thus, the array size is mp_pointcount*sizeof(float)). These values will be copied, and the appropriate bits in mp_exists will be updated.
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetVertexMarkerRGBAs()

TK_Status TK_Polyhedron::SetVertexMarkerRGBAs ( float const  colors[] = 0)

Allocates the vertex rgba colors (as applied to markers), and fills with values and sets the flags in mp_exists. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.

Parameters
colorscan be null, in which case colors are left untouched (assumed to be specified at a later point. Normally, however, "colors" should refer to the rgba quads for the values of the vertex colors. These values will be copied, and the appropriate bits in mp_exists will be updated.
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetVertexMarkerSizes()

TK_Status TK_Polyhedron::SetVertexMarkerSizes ( float const  sizes[] = 0)

Allocates the vertex marker sizes, and fills with values and sets the flags in mp_exists. Marker sizes are specified as a proportion of their default size. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.

Parameters
sizescan be null, in which case the contents of the sizes array are left untouched (assumed to be specified at a later point). If non-null, should to be at least of length mp_pointcount
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetVertexMarkerSymbols()

TK_Status TK_Polyhedron::SetVertexMarkerSymbols ( char const *  symbols = 0)

Allocates the vertex marker symbols, and fills with values and sets the flags in mp_exists. Symbol interpretations are as specified in TKE_Marker_Symbol. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.

Parameters
symbolscan be null, in which case the contents of the symbols array are left untouched (assumed to be specified at a later point). If non-null, should to be at least of length mp_pointcount
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetVertexMarkerSymbolStrings()

TK_Status TK_Polyhedron::SetVertexMarkerSymbolStrings ( )

Allocates the vertex marker symbol strings, and initializes to empty. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.

Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetVertexMarkerVisibilities()

TK_Status TK_Polyhedron::SetVertexMarkerVisibilities ( char const *  visibilities = 0)

Allocates the vertex marker visibilities, and fills with values and sets the flags in mp_exists. Allocated to a length of mp_pointcount, regardless of the number of values that are intended to be specified.

Parameters
visibilitiescan be null, in which case the contents of the visibility array are left untouched (assumed to be specified at a later point). If non-null, should to be at least of length mp_pointcount
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetVertexNormals()

TK_Status TK_Polyhedron::SetVertexNormals ( float const  normals[] = 0)

Allocates the vertex normals, and fills with values, and sets the flags in mp_exists.

Parameters
normalscan be null, in which case normals are left untouched (assumed to be specified at a later point. Normally, however, "normals" should refer to the xyz triplets for the values of the vertex normals. These values will be copied, and the appropriate bits in mp_exists will be updated.
Returns
TK_Normal or TK_Error to indicate success or failure.

◆ SetVertexParameters()

TK_Status TK_Polyhedron::SetVertexParameters ( float const  parameters[] = 0,
int  width = 0 
)

Allocates the vertex parameters (a.k.a. texture coordinates), and fills with values and sets mp_exists.

Parameters
parameterscan be null, in which case parameters are left untouched (assumed to be specified at a later point. Normally, however, "parameters" should refer to the stu triplets (again, triplets, not pairs) for the values of the vertex parameters. These values will be copied, and the appropriate bits in mp_exists will be updated. If "width" is <= 0, this function will use the value from mp_paramwidth.
widthspecifies the number of floating point values per parameter. For example, a single 2d texture will have 2, whereas two 3d textures will have 6.
Returns
TK_Normal or TK_Error to indicate success or failure.

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