TK_Matrix

class TK_Matrix

Handles the TKE_Modelling_Matrix and TKE_Texture_Matrix opcodes.

TK_Matrix provides support for writing/reading the TKE_Modelling_Matrix and TKE_Texture_Matrix opcode objects to/from an HSF file.

The HOOPS/3dGS scene-graph supports modelling and texture matrices.

Inherits from: BBaseOpcodeHandler

Methods

TK_Matrix::TK_Matrix(unsigned char opcode)

constructor

TK_Status TK_Matrix::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.
TK_Status TK_Matrix::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.
TK_Status TK_Matrix::Clone(BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const

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.
TK_Status TK_Matrix::ReadAscii(BStreamFileToolkit &tk)

Deprecated.

TK_Status TK_Matrix::WriteAscii(BStreamFileToolkit &tk)

Deprecated.

void TK_Matrix::SetMatrix(float const m[])

Sets the matrix to the specified values

void TK_Matrix::SetDMatrix(double const m[])

Sets the matrix to the specified values

float const *TK_Matrix::GetMatrix() const

const

Returns the matrix as the address of the array of floats

float *TK_Matrix::GetMatrix()

Returns the matrix as the address of the array of floats, which may be modified directly

double const *TK_Matrix::GetDMatrix() const

const

Returns the matrix as the address of the array of doubles

double *TK_Matrix::GetDMatrix()

Returns the matrix as the address of the array of doubles, which may be modified directly

Variables

float TK_Matrix::m_matrix[16]

protected

float

internal use

double TK_Matrix::m_dmatrix[16]

protected

double

internal use