TK_Color_Map Class Reference

#include <BOpcodeHandler.h>

Inheritance diagram for TK_Color_Map:

Inheritance graph
[legend]
Collaboration diagram for TK_Color_Map:

Collaboration graph
[legend]
List of all members.

Detailed Description

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

Definition at line 2450 of file BOpcodeHandler.h.

Public Member Functions

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

Protected Types

enum  TKO_Map_Format { TKO_Map_RGB_Values }

Protected Member Functions

void set_values (int length, float const *values=0) alter
 internal use

Protected Attributes

int m_length
 internal use
float m_values [3 *256]
 internal use
char * m_string
 internal use
unsigned char m_format
 internal use


Member Enumeration Documentation

enum TK_Color_Map::TKO_Map_Format [protected]
 

Defines colormap format

Enumerator:
TKO_Map_RGB_Values  self-explanatory; only this one is supported for now; the rest are possible future formats

Definition at line 2464 of file BOpcodeHandler.h.


Constructor & Destructor Documentation

TK_Color_Map::TK_Color_Map  )  [inline]
 

constructor

Definition at line 2476 of file BOpcodeHandler.h.


Member Function Documentation

TK_Status TK_Color_Map::Clone BStreamFileToolkit tk,
BBaseOpcodeHandler **  handler
const [virtual]
 

Copies the opcode handler

Parameters:
tk A reference to the BStreamFileToolkit object.
handler A pointer to the opcode handler object. Passed by reference.
Returns:
The result of the function call.

Reimplemented from BBaseOpcodeHandler.

int TK_Color_Map::GetFormat void   )  const [inline]
 

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

Definition at line 2492 of file BOpcodeHandler.h.

int TK_Color_Map::GetLength void   )  const [inline]
 

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

Definition at line 2504 of file BOpcodeHandler.h.

char alter* TK_Color_Map::GetString void   )  [inline]
 

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

Definition at line 2524 of file BOpcodeHandler.h.

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

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

Definition at line 2519 of file BOpcodeHandler.h.

float alter* TK_Color_Map::GetValues void   )  [inline]
 

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

Definition at line 2502 of file BOpcodeHandler.h.

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

Returns the color map values (rgb triplets)

Definition at line 2500 of file BOpcodeHandler.h.

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:
tk A reference to the BStreamFileToolkit object.
Returns:
The result of the function call.

Implements BBaseOpcodeHandler.

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

Definition at line 2490 of file BOpcodeHandler.h.

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

Definition at line 2498 of file BOpcodeHandler.h.

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:
tk A 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:
Generated on Tue Jan 6 22:41:42 2009 for Autodesk DWF 3D Toolkit by  doxygen 1.4.5