C_CreateModel3DViewBitmap

Call C_CreateModel3DViewBitmap to create a handle to a Windows bitmap containing an OrcaFlex 3D View of the specified model. This bitmap handle can then be used, for example, to draw the bitmap on a Window.

The C_SetSimulationDrawTime function can be used to control the way this function behaves. It allows you to produce drawings of the OrcaFlex model at a number of different points of a simulation. See C_SetSimulationDrawTime for details.

void C_CreateModel3DViewBitmap(

TOrcFxAPIHandle ModelHandle,

const TViewParameters *lpViewParameters,

HBITMAP *lpBitmap,

int *lpStatus

);

Parameters

ModelHandle (IN)

The handle of the model.

lpViewParameters (IN)

Points to a structure containing the view parameters.

Before calling the C_CreateModel3DViewBitmap function, set the Size member of the TViewParameters data structure to sizeof(TViewParameters).

If this parameter is passed as NULL then default view parameters are used. These default parameters are the same as those returned by C_GetDefaultViewParameters.

lpBitmap (OUT)

Points to a variable in which the bitmap handle will be returned.

lpStatus (OUT)

Points to a variable in which the status result for the function call will be returned.

Remarks

If the function is successful the lpBitmap will point to a bitmap handle. It is the responsibility of the caller to delete this bitmap handle when it is no longer needed by calling the Windows function DeleteObject. Failure to do this will result in a Windows resource leak.

See Also

TViewParameters, C_GetDefaultViewParameters, C_GetSimulationDrawTime, C_SaveModel3DViewBitmapMem, C_SaveModel3DViewBitmapToFile, C_SetSimulationDrawTime.