TK_Instance Class Reference

#include <BOpcodeHandler.h>

Inheritance diagram for TK_Instance:

Inheritance graph
[legend]
Collaboration diagram for TK_Instance:

Collaboration graph
[legend]
List of all members.

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.

Definition at line 1417 of file BOpcodeHandler.h.

Public Member Functions

 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 Read (BStreamFileToolkit &tk) alter
TK_Status Write (BStreamFileToolkit &tk) alter
TK_Status Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const
void Reset () alter

Protected Attributes

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


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.

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