Alphabetical Class Index   Class Hierarchy   Compound Members   File Members   File List  

TK_Instance Class Reference

Handles the TKE_Repeat_Object opcode. More...

#include <BOpcodeHandler.h>

Inheritance diagram for TK_Instance:

BBaseOpcodeHandler BControlledMemoryObject HTK_Instance

List of all members.

Public Member Functions

TK_Status Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const
TK_Status Read (BStreamFileToolkit &tk)
TK_Status ReadAscii (BStreamFileToolkit &tk)
 Deprecated.
void Reset ()
 TK_Instance (int from_index=0, int from_variant=0, int to_index=0, int to_variant=0, int options=0, float const *xform=0)
TK_Status Write (BStreamFileToolkit &tk)
TK_Status WriteAscii (BStreamFileToolkit &tk)
 Deprecated.

Protected Attributes

int m_from_index
 internal use
int m_from_variant
 internal use
float m_matrix [16]
 internal use
int m_options
 internal use
int m_to_index
 internal use
int m_to_variant
 internal use


Detailed Description

Handles the TKE_Repeat_Object opcode.

As its name implies, the TKE_Repeat_Object is an instruction to make a copy of a previously given object. Given an index and a modelling matrix, make a copy of an object, transform the points and reinsert. If you would like to ignore it, you can just implement a subclass that just returns TK_Normal on TK_Instance::Execute(). Of course, a better solution is to provide a real implementation, so that there will be no missing geometry. An example of such an implementation is provided in source form in HTK_Instance::Execute, which currently lives in HOpcodeHandler.cpp.


Constructor & Destructor Documentation

TK_Instance::TK_Instance ( int  from_index = 0,
int  from_variant = 0,
int  to_index = 0,
int  to_variant = 0,
int  options = 0,
float const *  xform = 0 
)

constructor


Member Function Documentation

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

Reimplemented in HTK_Instance.

TK_Status TK_Instance::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_Instance::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.

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