TK_Instance
-
class
TK_Instance 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.Inherits from:
BBaseOpcodeHandler
Methods
-
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
-
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 theBStreamFileToolkitobject.Returns
The result of the function call.
-
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 theBStreamFileToolkitobject.Returns
The result of the function call.
-
TK_Status
TK_Instance::Clone(BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const const virtual
Copies the opcode handler
Parameters
tk: A reference to the
BStreamFileToolkitobject.handler: A pointer to the opcode handler object. Passed by reference.
Returns
The result of the function call.
-
TK_Status
TK_Instance::ReadAscii(BStreamFileToolkit &tk) Deprecated.
-
TK_Status
TK_Instance::WriteAscii(BStreamFileToolkit &tk) Deprecated.
-
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.
Variables
-
int
TK_Instance::m_from_index protected
intinternal use
-
int
TK_Instance::m_from_variant protected
intinternal use
-
int
TK_Instance::m_to_index protected
intinternal use
-
int
TK_Instance::m_to_variant protected
intinternal use
-
int
TK_Instance::m_options protected
intinternal use
-
float
TK_Instance::m_matrix[16] protected
floatinternal use