Class RendProgressCallback

3DS Max Plug-In SDK

Class RendProgressCallback

See Also: Class Renderer.

class RendProgressCallback

Description:

This class is a callback passed in to the renderer. The system passes this callback to the renderer, and the renderer will use these methods whenever it is doing something that is going to take some time. For instance when transforming objects it can update the progress bar. This is also passed in to the shadow buffer code so the shadow buffer can show its progress. All methods of this class are implemented by the system. They are called by a plug-in renderer.

Methods:

Prototype:

virtual void SetTitle(const TCHAR *title)=0;

Remarks:

Allows the plug-in to set the string displayed in renderer dialog.

Parameters:

const TCHAR *title

The string to display.

Prototype:

virtual int Progress(int done, int total)=0;

Remarks:

Allows the plug-in to update the renderer progress display.

Parameters:

int done

The number of items completed so far.

int total

The total number of items to process.

Return Value:

RENDPROG_CONTINUE

Continue to process.

RENDPROG_ABORT

Stop processing.

Prototype:

virtual void SetCurField(int which);

Remarks:

Sets the field number display.

Parameters:

int which

FIELD_FIRST

FIELD_SECOND

FIELD_NONE

Prototype:

virtual void SetSceneStats(int nlights, int nrayTraced, int nshadowed, int nobj, int nfaces)

Remarks:

The plug-in renderer should call this on every frame, passing in values for the various parameters. These are displayed in the rendering in progress dialog.

Parameters:

int nlights

The total number of lights.

int nrayTraced

The number of lights using raytraced shadows.

int nshadowed

The number of lights using shadows.

int nobj

The total number of objects.

int nfaces

The total number of faces.