Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

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 1702 of file BOpcodeHandler.h.

Public Member Functions

 TK_Color_Map ()
TK_Status Read (BStreamFileToolkit &tk) alter
TK_Status Write (BStreamFileToolkit &tk) 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

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
unsigned char m_format
 internal use


Member Enumeration Documentation

enum TK_Color_Map::TKO_Map_Format [protected]
 

Defines colormap format

Enumeration values:
TKO_Map_RGB_Values  only this one is supported for now; the rest are possible future formats

Definition at line 1715 of file BOpcodeHandler.h.


Constructor & Destructor Documentation

TK_Color_Map::TK_Color_Map  )  [inline]
 

constructor

Definition at line 1727 of file BOpcodeHandler.h.


Member Function Documentation

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 1736 of file BOpcodeHandler.h.

int TK_Color_Map::GetLength void   )  const [inline]
 

Returns the size of the color map

Definition at line 1748 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 1746 of file BOpcodeHandler.h.

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

Returns the color map values (rgb triplets)

Definition at line 1744 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::SetFormat int  f  )  [inline]
 

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

Definition at line 1734 of file BOpcodeHandler.h.

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 1742 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 May 17 12:06:06 2005 for Autodesk DWF 3D Toolkit by  doxygen 1.4.1