MRenderScriptCallback Class Reference

#include <MViewport2Renderer.h>

Class Description

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

Member Function Documentation

MString name ( ) const
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.

Returns
The name of the script callback.
bool execute ( MRenderParameters params,
MString  arg1,
MString  arg2,
MString  arg3 
)
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.

Parameters
[in]paramsThe renderer's parameter set. These are declared in the fragment and fragment graph XML that is used by an MSceneRender.
[in]arg1An optional string argument to pass runtime data to the callback (in addition to the parameter set)
[in]arg2A second optional string argument to pass runtime data to the callback
[in]arg3A third optional string argument to pass runtime data to the callback
Returns
true if the execution was successful.

The documentation for this class was generated from the following files:
  • MViewport2Renderer.h
  • MViewport2Renderer.cpp