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

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# MHUDRender Class Reference
OpenMayaRender - API module for rendering

This reference page is linked to from the following overview topics: Rendering Overrides, 3.8 Render Loop Overrides, 3.9 UI draw manager.

Search for all occurrences

## Detailed Description

Class which defines rendering the 2D heads-up-display.

`#include <MViewport2Renderer.h>`

Inheritance diagram for MHUDRender:
[legend]

List of all members.

## Public Member Functions
| MHUDRender ()
| Default constructor for a HUD render operation.
virtual | ~MHUDRender ()
| Default destructor for a HUD render operation.
const MString & | name () const
| Name for a HUD render operation.
virtual bool | hasUIDrawables () const
| addUIdrawables() will be called only if this method is overridden to return true.
virtual void | addUIDrawables (MUIDrawManager &drawManager2D, const MFrameContext &frameContext)
| Provides access to the 2D version of MUIDrawManager, which can be used to queue up operations to draw simple UI shapes like lines, circles, text, etc.

## Member Function Documentation

const MString & name | ( |  | ) | const`[virtual]`

Search for all occurrences

Name for a HUD render operation.

Note that all HUD operations share the same name since they need not be distinguished from one another.

Returns:
  Unique name for a hud render operation

Reimplemented from MRenderOperation.

bool hasUIDrawables | ( |  | ) | const`[virtual]`

Search for all occurrences

addUIdrawables() will be called only if this method is overridden to return true.

The default implementation returns false.

If addUIDrawables() is not needed, this method should return false in order to avoid extra overhead required for adding UI drawables to the override.

Returns:
  Whether addUIDrawables() will be called or not.

void addUIDrawables | ( | MUIDrawManager & | drawManager2D,
|  | const MFrameContext & | frameContext
| ) |  | `[virtual]`

Search for all occurrences

Provides access to the 2D version of MUIDrawManager, which can be used to queue up operations to draw simple UI shapes like lines, circles, text, etc.

This method will only be called when hasUIDrawables() is overridden to return true.

Parameters:

  [in] | drawManager2D | A UI draw manager which can be used to draw simple 2D geometry, including text. When passing coordinates to the draw manager's methods, only X and Y have meaning. The origin (0, 0) is in the lower-left corner of the view.
  [in] | frameContext | Frame level context information.

MHUDRender MHUDRender MHUDRender MHUDRender MHUDRender MHUDRender MHUDRender MHUDRender MHUDRender MHUDRender
MHUDRender MHUDRender MHUDRender MHUDRender MHUDRender MHUDRender MHUDRender MHUDRender MHUDRender MHUDRender