Alphabetical Class Index   Class Hierarchy   Compound Members   File Members   File List  

Public Member Functions | Protected Member Functions | Protected Attributes
TK_Color_Map Class Reference

Handles the TKE_Color_Map opcode. More...

#include <BOpcodeHandler.h>

List of all members.

Public Member Functions

TK_Status Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const
int GetFormat () const
int GetLength () const
char const * GetString () const
char * GetString ()
float const * GetValues () const
float * GetValues ()
TK_Status Read (BStreamFileToolkit &tk)
TK_Status ReadAscii (BStreamFileToolkit &tk)
 Deprecated.
void Reset ()
void SetFormat (int f)
void SetString (char const *string)
void SetString (int length)
void SetValues (int count, float const values[]=0)
 TK_Color_Map ()
TK_Status Write (BStreamFileToolkit &tk)
TK_Status WriteAscii (BStreamFileToolkit &tk)
 Deprecated.

Protected Member Functions

void set_values (int length, float const values[]=0)
 internal use

Protected Attributes

unsigned char m_format
 internal use
int m_length
 internal use
char * m_string
 internal use
int m_string_length
 internal use
float * m_values
 internal use
int m_values_length
 internal use

Detailed Description

Handles the TKE_Color_Map opcode.

TK_Color_Map provides support for writing/reading the TKE_Color_Map opcode object to/from an HSF file.

The HOOPS/3dGS scene-graph can store local colormaps


Constructor & Destructor Documentation

TK_Color_Map::TK_Color_Map ( ) [inline]

constructor


Member Function Documentation

TK_Status TK_Color_Map::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.

int TK_Color_Map::GetFormat ( ) const [inline]

Returns the format of the color map. The format is specified by TKO_Map_Format.

int TK_Color_Map::GetLength ( ) const [inline]

Returns the size of the color map (or length of the string buffer)

char const* TK_Color_Map::GetString ( ) const [inline]

Get the color map string. Returns a pointer to the current string

char* TK_Color_Map::GetString ( ) [inline]

Get the color map string buffer. Returns a pointer to the current string buffer, which may then be modified directly

float const* TK_Color_Map::GetValues ( ) const [inline]

Returns the color map values (rgb triplets)

float* TK_Color_Map::GetValues ( ) [inline]

Returns the color map values buffer, which may be modified directly

TK_Status TK_Color_Map::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.

void TK_Color_Map::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.

void TK_Color_Map::SetFormat ( int  f) [inline]

Sets the format of the color map. The format is specified by TKO_Map_Format.

void TK_Color_Map::SetString ( char const *  string)

Set the color map string. Makes sure the buffer is big enough to hold the string, and copies it in

void TK_Color_Map::SetString ( int  length)

Set the color map. Makes sure the buffer is big enough to hold a string of 'length' characters

void TK_Color_Map::SetValues ( int  count,
float const  values[] = 0 
) [inline]

Sets the color map values. Allocates a buffer to hold 'count' float triplets of rgb values, and if 'values' is specified, copies the array into the buffer

TK_Status TK_Color_Map::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.


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