3ds Max C++ API Reference
RendProgressCallback Class Referenceabstract

This class is a callback passed in to the renderer. More...

#include <RendProgressCallback.h>

+ Inheritance diagram for RendProgressCallback:

Public Member Functions

virtual ~RendProgressCallback ()
 Destructor. More...
 
virtual void SetTitle (const MCHAR *title)=0
 Allows the plug-in to set the string displayed in renderer dialog. More...
 
virtual int Progress (int done, int total)=0
 Allows the plug-in to update the renderer progress display. More...
 
virtual void SetCurField (int)
 Sets the field number display. More...
 
virtual void SetSceneStats (int, int, int, int, int)
 The plug-in renderer should call this on every frame, passing in values for the various parameters. More...
 
virtual void SetStep (int current, int total)=0
 Sets the current rendering process step. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Detailed 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.

See also
Class Renderer.

Constructor & Destructor Documentation

◆ ~RendProgressCallback()

virtual ~RendProgressCallback ( )
inlinevirtual

Destructor.

41 { }

Member Function Documentation

◆ SetTitle()

virtual void SetTitle ( const MCHAR title)
pure virtual

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

Parameters:
const MCHAR *title

The string to display. Multiple title strings can be provided by separating them with newline ('
') characters. The progress callback is then responsible for displaying these strings correctly, e.g. by alternating them every few seconds.

◆ Progress()

virtual int Progress ( int  done,
int  total 
)
pure virtual

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. For undeterminate (infinite render,...) progress, passing -1 as the total will trigger the marquee mode of the progress bar.
Returns
RENDPROG_CONTINUE

Continue to process.

RENDPROG_ABORT

Stop processing.

◆ SetCurField()

virtual void SetCurField ( int  )
inlinevirtual

Sets the field number display.

Parameters:
int which

FIELD_FIRST

FIELD_SECOND

FIELD_NONE
66 {}

◆ SetSceneStats()

virtual void SetSceneStats ( int  ,
int  ,
int  ,
int  ,
int   
)
inlinevirtual

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.
81 {}

◆ SetStep()

virtual void SetStep ( int  current,
int  total 
)
pure virtual

Sets the current rendering process step.

This is used by the logging to give a global picture of the rendering process progress, not just of the current task. Let's say your rendering process is two steps (Translation and rendering) You would call this function at the beginning of the translation with (1,2) as parameters. Then use the Progress function as usual. Calling SetStep(2,2) at the beginning of the rendering task. This enable 3ds Max to know the total progress of the rendering task.

Parameters:
int current

One based current step number. Passing zero or a negative value here will make the application skip the progress logging. int total

One based total step count. Passing zero, negative value or a value lower than current will make the application skip the progress logging