#include <MViewport2Renderer.h>
Class which defines a callback that can be executed from a script fragment.
An MRenderScriptCallback is a class that can be implemented and executed from a script fragment. Derived instances of this class can be registered and deregistered with the MRenderer class. Once registered they can be called by name using the "Call" script command in script fragments used by an MSceneRender. The renderer's parameter set plus up to three additional script arguments can be passed into the callback from the script.
Public Member Functions | |
MRenderScriptCallback () | |
Default constructor for this base class. | |
virtual | ~MRenderScriptCallback () |
Virtual destructor for this base class. | |
virtual MString | name () const =0 |
Method used to acquire the name of the script callback. More... | |
virtual bool | execute (MRenderParameters *params, MString arg1, MString arg2, MString arg3)=0 |
A virtual method callable from a script fragment. More... | |
|
pure virtual |
Method used to acquire the name of the script callback.
This is the name that can be used to reference the callback from a script fragment.
|
pure virtual |
A virtual method callable from a script fragment.
The incoming parameter set and optional string arguments can be used to pass and receive data and options to the script callback. The implementation of the callback can get and set parameters on the renderer to influence the rendering.
[in] | params | The renderer's parameter set. These are declared in the fragment and fragment graph XML that is used by an MSceneRender. |
[in] | arg1 | An optional string argument to pass runtime data to the callback (in addition to the parameter set) |
[in] | arg2 | A second optional string argument to pass runtime data to the callback |
[in] | arg3 | A third optional string argument to pass runtime data to the callback |