ProcUnit::ModelDataAlloc
Performs registration of model data
int ModelDataAlloc(
int modelNo,
int size
)
Parameters
modelNo
|
Management number of the model to be registered
|
size
|
Size of the model to be registered
|
Return Value
Returns 0 when the model data is successfully registered.
Otherwise returns a non-zero value.
Description
Allocates the model data space of the specified size for the model management number specified by the argument, and performs the registration process.
After completing the registration with this method, you can actually set the model data by getting the storage pointer with GetModelData() method (see "
ProcUnit::GetModelData").
When you execute this method, the managed addresses of model data, figure data, and inner processing units are changed. Therefore, you need to get the above-mentioned storage address again if it is referenced.
Example
int Sample::MeasureProc(ProcUnit *ptrProcUnit)
{
BYTE *modelData;
// Register model data of 100 bytes with model No. 0
ptrProcUnit->ModleDataAlloc(0, 100);
// Get the pointer to the model data of model No. 0
modelData = ptrProcUnit->GetModelData(0);
// Store model data at the address modelData and after
// Delete the model of model No. 0
ptrProcUnit->ModleDataFree(0);
}