- Main Page
- Related Pages
- Modules
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# MDrawProcedureBase Class Reference
OpenMayaRender - API module for rendering

Search for all occurrences

## Detailed Description

Base user draw procedure class.

This class provides an interface through which a plug-in can be writen to implement a class to provide custom hardware drawing effects.

The derived class can be added, removed, or reordered in a list of draw procedures used by the hardware renderer. Please refer to documentation for MhardwareRenderer for more details.

Each procedure has a user defined string name and can be enabled or disabled. Name, and enabling methods must be defined.

All derived classes must over the execute() method. This is the method that will be called by the hardware renderer to which the procedure is attached. The call will only be made if the procedure is enabled.

Examples:

  hwRenderPostEffect.cpp.

`#include <MDrawProcedureBase.h>`

List of all members.

## Public Member Functions
| MDrawProcedureBase (const MString &name)
| Constructor for a draw procedure.
virtual | ~MDrawProcedureBase ()
| Default destructor for a draw procedure.
virtual bool | execute ()=0
| This method gets called by the renderer to execture the draw procedure.
void | setEnabled (bool value)
| This method sets whether the draw procedure is enabled or not.
bool | enabled () const
| This method returns whether the draw procedure is enabled or not.
void | setName (const MString &name)
| This method sets the name for the draw procedure.
const MString & | name () const
| This method returns the name of the draw procedure. Search for all occurrences

## Constructor & Destructor Documentation

MDrawProcedureBase | ( | const MString & | name | ) |

Constructor for a draw procedure.

By default the procedure is disabled.

Parameters:

  [in] | name | name of the procedure. This is a required argument.

## Member Function Documentation

bool execute | ( |  | ) | `[pure virtual]`

Search for all occurrences

This method gets called by the renderer to execture the draw procedure.

Derived class of MDrawProcedureBase must implement this method as it defined as a pure virtual method on this class. The implementation is free to perform any drawing functionality from within this method.

Returns:
  True if execution was successful.

Examples:
  hwRenderPostEffect.cpp.

void setEnabled | ( | bool | value | ) |

Search for all occurrences

This method sets whether the draw procedure is enabled or not.

Parameters:

  [in] | value | Boolean value to set the enabling state.

bool enabled | ( |  | ) | const

Search for all occurrences

This method returns whether the draw procedure is enabled or not.

Returns:
  Boolean indicating enable state.

void setName | ( | const MString & | name | ) |

Search for all occurrences

This method sets the name for the draw procedure.

Parameters:

  [in] | name | Name to set.

MDrawProcedureBase MDrawProcedureBase MDrawProcedureBase MDrawProcedureBase MDrawProcedureBase MDrawProcedureBase MDrawProcedureBase MDrawProcedureBase MDrawProcedureBase MDrawProcedureBase
MDrawProcedureBase MDrawProcedureBase MDrawProcedureBase MDrawProcedureBase MDrawProcedureBase MDrawProcedureBase MDrawProcedureBase MDrawProcedureBase MDrawProcedureBase MDrawProcedureBase