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

- Class List
- Class Hierarchy
- Class Members

Public Types | Static Public Member Functions

# MGeometryUtilities Class Reference
OpenMayaRender - API module for rendering

This reference page is linked to from the following overview topics: Extension for Autodesk Maya 2013, Autodesk Maya 2013, 4.5 Handling custom renderables for object overrides.

Search for all occurrences

## Detailed Description

Utilities for Viewport 2.0.

This class is a utility class for rendering geometry in Viewport 2.0

`#include <MHWGeometryUtilities.h>`

List of all members.

## Public Types
enum | GeometricShape { kDefaultSphere = 0, kDefaultPlane, kDefaultCube }
| Default geometry shapes. More...
## Static Public Member Functions
static MColor | wireframeColor (const MDagPath &path)
| Returns the wireframe color used in Viewport 2.0 for the given DAG path.
static DisplayStatus | displayStatus (const MDagPath &path, MStatus *returnStatus=NULL)
| Returns the display status of the given DAG path.
static MGeometry * | acquireReferenceGeometry (GeometricShape shape, const MGeometryRequirements &requirements)
| Acquire reference geometry with required buffers.
static void | releaseReferenceGeometry (MGeometry *geometry)
| Release a generated reference geometry.
static const char * | className ()
| Returns the name of this class.

## Member Enumeration Documentation

enum GeometricShape

Search for all occurrences

Default geometry shapes.

Enumerator:

  kDefaultSphere | Sphere with radius 1, centered at 0,0,0. Search for all occurrences
  kDefaultPlane | Plane with width and height of 1, centered at 0,0,0. Assuming "Y-Up" orientation: width = x-axis, and height = y-axis. Search for all occurrences
  kDefaultCube | Cube with width, height and depth of 1, centered at 0,0,0. Search for all occurrences

## Member Function Documentation

MColor wireframeColor | ( | const MDagPath & | path | ) | `[static]`

Search for all occurrences

Returns the wireframe color used in Viewport 2.0 for the given DAG path.

Parameters:

  [in] | path | The DAG path to get wireframe color

Returns:
  The wireframe color

Examples:
  footPrintNode.cpp, and swissArmyManip.cpp.

MHWRender::DisplayStatus displayStatus | ( | const MDagPath & | path,
|  | MStatus * | returnStatus = `NULL`
| ) |  | `[static]`

Search for all occurrences

Returns the display status of the given DAG path.

Note that the last selected object will have status kLead instead of kActive and if only one object is selected the status will be kLead.

Parameters:

  [in] | path | the DAG path to get.
  [out] | returnStatus | Status code.

Returns:
  Display status for the DAG

Status Codes:
  - MS::kSuccess Success
  - MS::kFailure The DAG path is invalid

MGeometry * acquireReferenceGeometry | ( | GeometricShape | shape,
|  | const MGeometryRequirements & | requirements
| ) |  | `[static]`

Search for all occurrences

Acquire reference geometry with required buffers.

The user is responsible for releasing the geometry when it is no longer needed, by calling MGeometryUtilities::releaseReferenceGeometry().

Parameters:

  [in] | shape | The shape of the requested geometry
  [in] | requirements | The list of required index and vertex buffers

Returns:
  The generated geometry, NULL on failure.

void releaseReferenceGeometry | ( | MGeometry * | geometry | ) | `[static]`

Search for all occurrences

Release a generated reference geometry.

Parameters:

  [in] | geometry | The geometry to delete

const char * className | ( |  | ) | `[static]`

Search for all occurrences

Returns the name of this class.

Returns:
  The name of this class.

MGeometryUtilities MGeometryUtilities MGeometryUtilities MGeometryUtilities MGeometryUtilities MGeometryUtilities MGeometryUtilities MGeometryUtilities MGeometryUtilities MGeometryUtilities
MGeometryUtilities MGeometryUtilities MGeometryUtilities MGeometryUtilities MGeometryUtilities MGeometryUtilities MGeometryUtilities MGeometryUtilities MGeometryUtilities MGeometryUtilities